/* NodeStay public site, after nodestay-old. Tokens first (AGENTS.md colour system); add a variable here rather than a hex in a rule. */
:root {
    --ink: #0B1B2B;
    --ink-2: #13293D;
    --ink-line: #1E3A5F;
    --accent: #0F766E;
    --accent-hover: #115E59;
    --accent-soft: #CCFBF1;
    --signal: #2DD4BF;
    --link: #2563EB;
    --link-hover: #1D4ED8;
    --success: #16A34A;
    --success-soft: #DCFCE7;
    --success-line: #86EFAC;
    --warning: #B45309;
    --warning-soft: #FEF3C7;
    --warning-line: #FCD34D;
    --error: #DC2626;
    --error-soft: #FEE2E2;
    --error-line: #FCA5A5;
    --bg: #F6F8FA;
    --surface: #FFFFFF;
    --subtle: #EEF2F5;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --text: #1E293B;
    --text-2: #64748B;
    --muted: #94A3B8;
    --on-ink: #CBD5E1;
    --code-bg: #0B1B2B;
    --code-text: #E2E8F0;
    --code-key: #5EEAD4;
    --radius: 10px;
    --backdrop: rgba(11, 27, 43, 0.55);
    --shadow: 0 1px 2px rgba(11, 27, 43, 0.06), 0 4px 16px rgba(11, 27, 43, 0.06);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
/* The scrollbar always shows, so short pages do not shift sideways. */
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }
/* The footer sits at the bottom of short pages. dvh follows mobile browser bars; vh is the fallback. */
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 2px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--text-2); font-size: 0.9rem; }

/* Header */
.site-header { background: var(--ink); color: #fff; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.wordmark { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; letter-spacing: -0.01em; }
.wordmark:hover { color: #fff; }
.wordmark__mark { display: block; flex: none; }
.wordmark__mark path { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wordmark__mark circle { fill: var(--signal); }
.wordmark__mark .wordmark__home { fill: #fff; }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--on-ink); text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 8px; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 0.9rem; margin-top: 4rem; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding-block: 1.5rem; }
.site-footer p { margin: 0; }
.site-footer__links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.site-footer__links a { color: var(--text-2); white-space: nowrap; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 600; padding: 0.7rem 1.15rem; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background 0.15s; white-space: nowrap; }
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-hover); color: #fff; }
.button--outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.button--outline:hover { background: var(--subtle); color: var(--ink); }
.button--ghost { background: transparent; color: #fff; border-color: var(--ink-line); }
.button--ghost:hover { background: var(--ink-2); color: #fff; }

/* Sections and cards */
.section { padding-block: 3.5rem; }
.section--subtle { background: var(--subtle); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 0.6rem; }
.section--ink .eyebrow { color: var(--signal); }
.lede { font-size: 1.15rem; color: var(--text-2); }
.section--ink .lede { color: var(--on-ink); }
.section__head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section__head .lede { margin-bottom: 0; }

/* Hero */
.hero { padding-block: 4.5rem 3.5rem; }
/* Top-aligned, so the eyebrow and heading sit where they do on single-column heroes (/hosts/). */
.hero__split { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; align-items: start; }
.hero__split > * { min-width: 0; }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero_button_gap { margin-top: 3.3rem; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
/* In the hero the chips sit straight under the lede, with a wider gap to the buttons. */
.hero .chips + .hero__actions { margin-top: 2.25rem; }
.chips li { font-size: 0.82rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--ink-2); color: #fff; border: 1px solid var(--ink-line); }
.chips--light li { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; }

/* Dialogs (the OTA list on the home page) */
.dialog-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.2em; }
.modal { border: 0; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow); width: min(26rem, 100% - 32px); color: var(--text); background: var(--surface); }
.modal::backdrop { background: var(--backdrop); }
.modal__body { padding: 1.4rem 1.4rem 1.2rem; }
.modal__body h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.modal__body p { margin: 0 0 0.9rem; color: var(--text-2); }
.modal__actions { margin: 1.3rem 0 0; display: flex; justify-content: flex-end; }
pre.code { background: var(--code-bg); color: var(--code-text); padding: 1rem 1.1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; font-size: 0.82rem; margin: 0 0 1rem; }
.section--ink pre.code { background: var(--ink-2); border: 1px solid var(--ink-line); }
pre.code .k { color: var(--code-key); }
pre.code .c { color: var(--muted); }
/* The OTAs covered, in the hero above the figures. */
.ota-panel { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 1.25rem 1.3rem; margin: 0 0 1rem; text-align: center;}
.ota-panel__title { color: #fff; font-weight: 700; margin: 0 0 0.85rem; }
.ota-panel__list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; justify-content: center;}
.ota-panel__list li { color: #fff; font-weight: 600; font-size: 0.98rem; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--ink); border: 1px solid var(--ink-line); }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat { background: var(--ink-2); border-radius: var(--radius); padding: 1rem; text-align: center;}
.stat__value { font-size: 1.6rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat__label { font-size: 0.82rem; color: var(--muted); }
#ota-dialog-title { margin-bottom: 1.5rem; }

/* Lookup */
.lookup-section { padding-block: 3rem 1rem; padding-bottom: 3rem;}
.lookup-head { margin-bottom: 1.25rem; }
.lookup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; }
.lookup label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; }
.lookup__row { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.lookup input { flex: 1; min-width: 0; font: inherit; color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; padding: 0.7rem 0.85rem; background: var(--surface); }
.lookup input:focus { border-color: var(--link); outline: 3px solid rgba(37, 99, 235, 0.2); }
/*.lookup__hint { color: var(--text-2); font-size: 0.88rem; margin: 0.5rem 0 0; }*/
.result { margin-top: 1rem; border-radius: var(--radius); padding: 1.1rem 1.2rem; border: 1px solid var(--border); background: var(--surface); }
.result h2 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.result p:last-child { margin-bottom: 0; }
.result--found { border-color: var(--success-line); background: var(--success-soft); }
.result--warn { border-color: var(--warning-line); background: var(--warning-soft); }
.result--bad { border-color: var(--error-line); background: var(--error-soft); }
.result__label { margin: 0.75rem 0 0; font-size: 0.85rem; line-height: 1.35; font-weight: 700; color: var(--ink); }
.result__url { margin: 0; font-size: 0.85rem; line-height: 1.35; color: var(--text-2); overflow-wrap: anywhere; }
.result__action { margin: 1.5rem 0 0; }
/* More than one direct booking page: a line before each one after the first. */
.result__action + .result__url { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--success-line); }
.result__note { margin-top: 1rem; }
.result__reason { margin-top: 0.9rem; }

/* Content blocks */
.pillar__num { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.flow { list-style: none; padding: 0; margin: 0; counter-reset: flow; display: grid; gap: 0.6rem; }
.flow li { counter-increment: flow; display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; align-items: start; }
.flow li::before { content: counter(flow); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hover); font-weight: 700; font-size: 0.85rem; }
.flow code { color: var(--accent-hover); }
.plain-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; }
code.inline { background: var(--subtle); padding: 0.1rem 0.35rem; border-radius: 5px; color: var(--ink); overflow-wrap: anywhere; }

/* Docs */
.docs { padding-block: 2.5rem 1rem; }
.docs h2 { margin-top: 2.2rem; }
.docs h3 { margin-top: 1.4rem; }
.docs code { background: var(--subtle); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
.docs pre { background: var(--code-bg); color: var(--code-text); padding: 0.9rem 1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; margin: 0 0 1.2rem; }
.docs pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
.docs table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; font-size: 0.95rem; }
.docs th, .docs td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs th { background: var(--subtle); color: var(--ink); }
.docs tr:last-child td { border-bottom: 0; }
/* Contact */
.contact-form { display: grid; gap: 1rem; margin-top: 1.5rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.contact-form__field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; }
.contact-form input, .contact-form select, .contact-form textarea { display: block; width: 100%; font: inherit; color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; padding: 0.7rem 0.85rem; background: var(--surface); }
.contact-form input, .contact-form select { max-width: 36rem; }
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--link); outline: 3px solid rgba(37, 99, 235, 0.2); }
.contact-form .button { justify-self: start; }
.contact-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { max-width: 36rem; margin-top: 1.5rem; padding: 0.9rem 1.1rem; border: 1px solid var(--error-line); background: var(--error-soft); border-radius: var(--radius); }
.form-errors p, .form-errors ul { margin: 0; }
.form-errors ul { padding-left: 1.2rem; margin-top: 0.4rem; }
.toc { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.toc a { text-decoration: none; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--subtle); color: var(--text); font-size: 0.9rem; }
.callout { background: var(--accent-soft); border: 1px solid #99F6E4; border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1.2rem; }
.callout code { background: rgba(255, 255, 255, 0.7); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

@media (max-width: 860px) {
    .grid-3, .grid-2, .hero__split, .section__head { grid-template-columns: minmax(0, 1fr); }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-footer__links { justify-content: flex-start; }
    .hero { padding-block: 2rem 1.5rem;}
    .hero__split {gap: 1rem;}
    .hero__actions { display: none; justify-content: center;}
    .hero_button_gap { margin-top: 2rem; }
    .hero_button { width: 250px; }
    .stat-row {display: none;}
}

@media (max-width: 560px) {
    .wrap { width: calc(100% - 32px); }
    .lookup__row { flex-direction: column; }
    .lookup .button, .result__action .button { width: 100%; }
    .stat__value { font-size: 1.35rem; }
    .site-footer__links { gap: 0.75rem; font-size: 0.85rem; }
}
