/* Hatchway marketing site. Colours, type and spacing come from tokens.css
   (the Hatchway design system); this file is layout only. */

:root { --wrap: 1120px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
body { margin: 0; background: var(--surface-100); color: var(--ink); font: 400 16px/1.6 var(--font-sans); }
img, svg { max-width: 100%; }
a { color: var(--link); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
code { font: 400 0.9em/1.4 var(--font-mono); background: var(--surface-200); padding: 1px 5px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; }

/* Theme follows the OS. tokens.css keys dark values to [data-theme="dark"],
   so mirror them for prefers-color-scheme here. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-000: #161d2b; --surface-100: #0e131d; --surface-200: #1f2839; --line: #2c3649; --line-strong: #64718a;
    --ink: #e8edf5; --ink-muted: #9ba7bb; --brand: #2f4778; --beacon: #f5b023; --link: #93b2ff; --focus: #93b2ff;
    --ok: #3fcfa9; --ok-tint: #123a33; --warn: #f5b84a; --danger: #ff8f7f;
    --shadow-raised: 0 1px 2px rgba(0,0,0,0.5);
  }
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface-000); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); font: 600 16px/1 var(--font-sans); text-decoration: none; border: 1px solid transparent; transition: filter .12s ease, background-color .12s ease; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn--primary { background: var(--beacon); color: var(--on-beacon); }
.btn--primary:hover { filter: brightness(1.06); color: var(--on-beacon); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-200); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface-100) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 21px/1 var(--font-display); letter-spacing: -0.01em; }
.mark { width: 30px; height: 30px; }
.mark__bg { fill: var(--brand); }
.mark__door { fill: none; stroke: #ffffff; stroke-width: 2.5; stroke-linejoin: round; }
.mark__in { fill: var(--beacon); }
.nav { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav { display: none; } .top__inner { justify-content: space-between; } }

/* Hero: the navy "doorway" band */
.hero { background: var(--brand); color: #ffffff; padding-block: 72px 80px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -260px; width: 560px; height: 560px; border-radius: 50%; border: 28px solid rgba(255,255,255,0.06); box-shadow: 0 0 0 80px rgba(255,255,255,0.03); pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .hero { padding-block: 48px 56px; } }
.eyebrow { margin: 0 0 14px; font: 600 13px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--beacon); }
.hero h1 { margin: 0; font: 700 clamp(36px, 5.2vw, 58px)/1.04 var(--font-display); letter-spacing: -0.02em; }
.lead { margin: 20px 0 0; font-size: 19px; line-height: 1.55; color: rgba(255,255,255,0.86); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .btn--ghost { color: #ffffff; border-color: rgba(255,255,255,0.45); }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.1); }
.hero .fine { color: rgba(255,255,255,0.72); }
.fine { margin: 16px 0 0; font-size: 14px; color: var(--ink-muted); }
.center { text-align: center; }

.term { margin: 0; background: #0b111c; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 60px rgba(0,0,0,0.35); overflow: hidden; min-width: 0; }
.term__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.term__bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.term__bar b { margin-left: 8px; font: 500 12px/1 var(--font-mono); color: rgba(255,255,255,0.55); }
.term__body { margin: 0; padding: 18px 20px 22px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 14px/1.75 var(--font-mono); color: #d7deea; }
.term__body code { background: none; padding: 0; font: inherit; overflow-wrap: normal; }
.term .p { color: #f5b023; }
.term .ok { color: #3fcfa9; }

/* Definition block, for readers and answer engines */
.define { background: var(--surface-000); border-bottom: 1px solid var(--line); }
.define__inner { padding-block: 48px; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 32px; }
.define h2 { margin: 0; font: 700 28px/1.15 var(--font-display); }
.define p { margin: 0; font-size: 18px; line-height: 1.65; max-width: 65ch; }
@media (max-width: 760px) { .define__inner { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 36px; } }

.section { padding-block: 80px; }
.section--tint { background: var(--surface-000); border-block: 1px solid var(--line); }
.section__title { margin: 0 0 12px; font: 700 clamp(28px, 3.6vw, 40px)/1.1 var(--font-display); letter-spacing: -0.015em; max-width: 22ch; }
.section__lead { margin: 0 0 36px; font-size: 18px; color: var(--ink-muted); max-width: 60ch; }
@media (max-width: 760px) { .section { padding-block: 56px; } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.feature p { margin: 0; color: var(--ink-muted); }
.feature--accent { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.feature--accent p { color: rgba(255,255,255,0.85); }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: step; padding-top: 56px; position: relative; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--beacon); color: var(--on-beacon); font: 700 18px/1 var(--font-display); }
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--ink-muted); }
.usecases { margin-top: 48px; padding: 28px; border-radius: var(--radius-lg); background: var(--surface-100); border: 1px solid var(--line); }
.usecases h3 { margin: 0 0 12px; font-size: 18px; }
.usecases ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }
.plan { background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan--featured { border: 2px solid var(--brand); box-shadow: var(--shadow-raised); }
.plan__badge { position: absolute; top: -13px; left: 24px; margin: 0; background: var(--brand); color: #ffffff; font: 600 12px/1 var(--font-sans); padding: 7px 10px; border-radius: var(--radius-pill); letter-spacing: .03em; }
.plan h3 { margin: 0; font: 700 22px/1.2 var(--font-display); }
.plan__price { margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__price b { font: 700 44px/1 var(--font-display); letter-spacing: -0.02em; }
.plan__price span { color: var(--ink-muted); }
.plan__price s { color: var(--ink-muted); font-size: 18px; }
.plan__who { margin: 0; color: var(--ink-muted); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; flex: 1; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .btn { margin-top: 8px; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-muted); font: 400 24px/1 var(--font-sans); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-muted); max-width: 70ch; }

.final { background: var(--brand); color: #ffffff; }
.final__inner { padding-block: 72px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final h2 { margin: 0; font: 700 clamp(28px, 4vw, 42px)/1.1 var(--font-display); }
.final p { margin: 0 0 8px; color: rgba(255,255,255,0.82); font-size: 18px; }

.foot { padding-block: 32px; color: var(--ink-muted); font-size: 14px; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--ink-muted); }
