/* Shared chrome for every page: tokens, base type, buttons, nav and footer.
   Everything down to the sub-page layout section was moved out of index.html rule for
   rule, so the main page renders exactly as it did; the two panel/control radius tokens
   are the only additions. The sub-page layout, card, grid and form sections below it are
   new and the main page uses none of them. */

/* ── tokens ─────────────────────────────────────────────────────────── */
:root{
  --bg:#09090b;
  --bg-elev:#0c0c0e;
  --bg-card:#111113;
  --fg:#fafafa;
  --fg-muted:#a1a1aa;
  --fg-dim:#8d8d97;
  --fg-faint:#52525b;
  /* the colour Fusion paints an unaccepted suggestion; todo: Kevin to tune */
  --ghost:oklch(.64 .09 22);
  --border:#ffffff14;
  --border-strong:#ffffff24;
  --accent-h:250;
  --accent:oklch(.68 .17 var(--accent-h));
  --accent-dim:oklch(.68 .17 var(--accent-h) / .15);
  --ok:oklch(.72 .16 150);
  --warn:oklch(.76 .15 75);
  --radius:12px;
  --radius-sm:8px;
  /* panel 10 and control 8 are the main page's card and button radii */
  --radius-panel:10px;
  --radius-control:8px;
  --font-sans:"DM Sans",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;
}

html{color-scheme:dark;scroll-behavior:smooth}
*,*::before,*::after{box-sizing:border-box}
body{
  margin:0;
  position:relative;
  /* the grid is sized to the body box, so a page shorter than the screen still has to fill it */
  min-height:100vh;
  min-height:100svh;
  /* clears the footer's 28px bottom padding and a little; index.html raises it over its title block */
  --grid-fade-b:48px;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font-sans);
  font-weight:400;
  font-size:20px;
  line-height:1.5;
  letter-spacing:-.005em;
  font-feature-settings:"ss01","ss02";
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* one drafting grid behind every page; z-index -1 puts it under sections but over the canvas */
body::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  /* tiled, not repeating-linear-gradient: Chrome drops some 1px stops of a page-long repeating gradient */
  background-image:
    linear-gradient(to right,#ffffff16 1px,transparent 1px),
    linear-gradient(to bottom,#ffffff16 1px,transparent 1px),
    linear-gradient(to right,#ffffff09 1px,transparent 1px),
    linear-gradient(to bottom,#ffffff09 1px,transparent 1px);
  background-size:240px 240px,240px 240px,48px 48px,48px 48px;
  /* two masks intersected, so all four edges fade while the middle stays fully opaque */
  -webkit-mask-image:
    linear-gradient(to bottom,transparent 0,#000 140px,#000 calc(100% - var(--grid-fade-b)),transparent 100%),
    linear-gradient(to right,transparent 0,#000 14vw,#000 calc(100% - 14vw),transparent 100%);
  -webkit-mask-composite:source-in;
  mask-image:
    linear-gradient(to bottom,transparent 0,#000 140px,#000 calc(100% - var(--grid-fade-b)),transparent 100%),
    linear-gradient(to right,transparent 0,#000 14vw,#000 calc(100% - 14vw),transparent 100%);
  mask-composite:intersect;
}

/* film grain over the whole viewport — does most of the "expensive" feel */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:9999;
  opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:256px 256px;
}

:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

h1,h2,h3{margin:0;font-weight:500;letter-spacing:-.035em;line-height:1.05}
p{margin:0}
ul{margin:0;padding:0;list-style:none}
a{color:inherit;text-decoration:none}
svg{display:block}
strong{font-weight:600;color:var(--fg)}

/* a headline of short sentences should only ever break where one ends */
.nobr{white-space:nowrap}
/* anywhere, not break-word: only anywhere shrinks the token's min-content so a phone column fits it */
code{font-family:var(--font-mono);font-size:.9em;color:var(--fg-muted);background:var(--bg-card);padding:1px 5px;border-radius:4px;border:1px solid var(--border);overflow-wrap:anywhere}
.wrap{max-width:1240px;margin:0 auto;padding:0 32px}
section{padding:96px 0}

/* ── shared type blocks ─────────────────────────────────────────────── */
.eyebrow{
  font-family:var(--font-mono);
  font-size:15px;
  font-weight:500;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--fg-dim);
  margin-bottom:20px;
}
.head{max-width:720px;margin-bottom:56px}
.head.center{margin-left:auto;margin-right:auto;text-align:center}
.head h2{font-size:clamp(40px,5.05vw,61px)}
.head p{
  max-width:620px;
  margin-top:20px;
  font-size:23px;
  color:var(--fg-muted);
  letter-spacing:-.005em;
}
.head.center p{margin-left:auto;margin-right:auto}

/* ── buttons ────────────────────────────────────────────────────────── */
.btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:18px;
  font-weight:500;
  letter-spacing:-.01em;
  border-radius:var(--radius-sm);
  padding:11px 18px;
  border:1px solid var(--border);
  color:var(--fg);
  transition:background .18s ease-out,border-color .18s ease-out,transform .18s ease-out,box-shadow .18s ease-out,color .18s ease-out,opacity .18s ease-out;
}
.btn-primary{
  background:#fafafa;
  color:#09090b;
  border-color:transparent;
  font-weight:600;
}
.btn-primary svg{transition:transform .18s ease-out}
.btn-primary:hover,.btn-primary:focus-visible{background:#fff;transform:translateY(-2px);box-shadow:0 10px 30px rgba(255,255,255,.22)}
/* the arrow leans into the download it triggers */
.btn-primary:hover svg,.btn-primary:focus-visible svg{transform:translateY(3px)}
.btn-lg{font-size:19px;padding:14px 22px;border-radius:10px}


.tertiary{font-size:17px;color:var(--fg-dim);letter-spacing:-.005em}

/* ── nav ────────────────────────────────────────────────────────────── */
.nav-in{
  max-width:1240px;
  margin:0 auto;
  padding:14px 32px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  /* no row gap: below 1200 the menu wraps onto its own line and must add nothing while closed */
  column-gap:28px;
  row-gap:0;
}
/* the lockup takes the slack, so the links and the CTA stay one group at the right edge */
.wordmark{display:flex;align-items:center;margin-right:auto}
/* baked 200px tall, over twice the largest size it is shown at, so it stays crisp on a retina panel */
.wordmark .mark{display:block;height:80px;width:auto}
.nav-links{display:flex;align-items:center;gap:22px}
.nav-links a{font-size:17.5px;color:var(--fg-muted);transition:color .18s ease}
.nav-links a:hover{color:var(--fg)}
/* the live site's two-bar mark, in a 44px box; shown only once the links collapse */
.nav-toggle{
  display:none;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  background:none;
  color:var(--fg-muted);
  cursor:pointer;
}
.nav-toggle:hover{color:var(--fg)}
.nav-toggle .bars{position:relative;display:block;width:20px;height:2px}
.nav-toggle .bars::before,.nav-toggle .bars::after{
  content:"";
  position:absolute;
  left:0;
  width:20px;
  height:2px;
  border-radius:10px;
  background:currentColor;
  transition:transform .2s ease-out;
}
.nav-toggle .bars::before{top:-4px}
.nav-toggle .bars::after{top:4px}
.nav.is-open .nav-toggle .bars::before{transform:translateY(4px) rotate(45deg)}
.nav.is-open .nav-toggle .bars::after{transform:translateY(-4px) rotate(-45deg)}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--fg-dim);
  white-space:nowrap;
}
.pill-ok{color:var(--ok);border-color:color-mix(in srgb,var(--ok) 32%,transparent)}
a.pill{text-decoration:none}
a.pill:hover,a.pill:focus-visible{color:var(--fg);border-color:var(--border-strong)}
/* the green pill keeps its colour on hover; the generic rule would turn it white */
a.pill-ok:hover,a.pill-ok:focus-visible{color:var(--ok);border-color:var(--ok)}
.btn-sm{font-size:16px;padding:8px 12px;border-radius:var(--radius-sm)}

/* ── footer ─────────────────────────────────────────────────────────── */
footer{border-top:1px solid var(--border);padding:28px 0}
.foot-in{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
/* centred, not top-aligned: logo and text share one centre line however many lines the text takes */
.foot-left{display:flex;align-items:center;gap:14px;font-size:17px;color:var(--fg-dim)}
.foot-left .mark{display:block;height:52px;width:auto}
/* balanced, so a wrapped line never strands its last word */
.foot-id{display:flex;flex-direction:column;gap:2px;text-wrap:balance}
.foot-id b{font-weight:500;color:var(--fg-muted);letter-spacing:-.03em}
.foot-links{display:flex;flex-wrap:wrap;gap:20px}
.foot-links a{font-size:17px;color:var(--fg-dim);transition:color .18s ease}
.foot-links a:hover{color:var(--fg)}

@media (width <= 1199px){
  .nav-menu{order:9;flex-basis:100%}
  /* a boxed panel under the button, so the open list reads as a menu and not as page text;
     the edge is a shadow, not a border, so the closed accordion still adds no height */
  .nav-links{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    width:fit-content;
    margin-left:auto;
    background:var(--bg-card);
    box-shadow:inset 0 0 0 1px var(--fg-dim);
  }
  .nav-links a{display:flex;flex:none;align-items:center;justify-content:flex-end;height:44px;padding:0 18px 0 28px;font-size:20px}
  .nav-links a + a{border-top:1px solid var(--border-strong)}
  /* the nav CTA is a touch target here, not a 42px desktop chip */
  .nav-cta{padding-top:9px;padding-bottom:9px}
  /* JS owns the accordion; with none, the button would be inert so it stays gone and the list renders open */
  html.js-nav .nav-toggle{display:grid}
  html.js-nav .nav-menu{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-out}
  html.js-nav .nav-links{overflow:hidden;min-height:0;visibility:hidden;transition:visibility 0s .2s}
  html.js-nav .nav.is-open .nav-menu{grid-template-rows:1fr}
  html.js-nav .nav.is-open .nav-links{visibility:visible;transition:visibility 0s}
  /* touch hit areas: 44px, or the largest the cell that holds them allows */
  .foot-links{row-gap:0}
  .foot-links a{padding:10px 0}
}

@media (width <= 820px){
  .wrap,.nav-in{padding-left:20px;padding-right:20px}
  .wordmark .mark{height:60px}
  section{padding:64px 0}
  .head{margin-bottom:40px}
}
/* a 360px phone holds the logo, the CTA and the menu button on one row only at this size and gap */
@media (width <= 480px){
  .nav-in{column-gap:12px}
  .wordmark .mark{height:52px}
}

@media (prefers-reduced-motion: reduce){
  .btn-primary:hover,
  .btn-primary:focus-visible{transform:none}
  .btn-primary:hover svg,
  .btn-primary:focus-visible svg{transform:none}
  *{transition-duration:.01ms !important}
  html{scroll-behavior:auto}
}

/* ── sub-page layout ────────────────────────────────────────────────── */
/* the sub-pages lead with an h1 where the main page leads with an h2, at the same scale */
.head h1{font-size:clamp(40px,5.05vw,61px)}
.prose{max-width:760px;display:flex;flex-direction:column;gap:18px}
.prose p{font-size:19px;color:var(--fg-muted);line-height:1.5}
.prose h2{font-size:clamp(28px,3.2vw,34px)}
.prose h3{font-size:24px;margin-top:22px}
.prose a{color:var(--fg);border-bottom:1px solid var(--fg-dim)}
.prose a:hover{border-bottom-color:var(--fg)}
/* a sub-page section is its own measure; the class would otherwise win the padding shorthand */
section.wrap{padding:96px 32px}
section.sub-lead{padding-top:72px;padding-bottom:0}
.card{
  border:1px solid var(--border);
  border-radius:var(--radius-panel);
  background:linear-gradient(#ffffff04,transparent);
  overflow:hidden;
  transition:background .18s ease,border-color .18s ease;
}
.card:hover{background:#ffffff08;border-color:var(--border-strong)}
.grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
@media (width <= 820px){
  section.wrap{padding:64px 20px}
}

/* ── forms ──────────────────────────────────────────────────────────── */
.form{display:flex;flex-direction:column;gap:20px;max-width:620px}
/* display:flex above outranks the browser's own [hidden] rule */
.form[hidden]{display:none}
.field{display:flex;flex-direction:column;gap:8px}
.field > span{font-size:17px;color:var(--fg-muted)}
.field input,.field select,.field textarea{
  font-family:var(--font-sans);
  font-size:18px;
  color:var(--fg);
  background:#ffffff08;
  border:1px solid var(--border-strong);
  border-radius:var(--radius-control);
  padding:12px 14px;
  transition:border-color .18s ease,background .18s ease;
}
.field textarea{min-height:120px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--accent);background:#ffffff0d}
/* an unanswered select reads as placeholder text until a real option is picked */
.field select:invalid{color:var(--fg-dim)}
/* honeypot: off-screen rather than hidden or display:none, both of which a bot skips */
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.form button{align-self:flex-start;cursor:pointer;font-family:var(--font-sans)}
.form-done{
  max-width:620px;
  font-size:18px;
  padding:22px 24px;
  border:1px solid var(--border);
  border-radius:var(--radius-panel);
  background:linear-gradient(#ffffff04,transparent);
}
.form-note{font-size:17px;color:var(--fg-muted)}
.form-note.is-error{color:var(--warn)}
