/* ==========================================================================
   clearAMS marketing site — components
   Built on tokens.css. Layout and effects follow a dark, mono-display
   editorial style; colors, type families, radii and easing come from the app.
   ========================================================================== */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--field-0);
  color: var(--on-field);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01", "ss02", "cv11";     /* app body */
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--orange); color: var(--ink); padding: 8px 12px; border-radius: var(--r-btn); }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section.tight { padding-block: calc(var(--section) * .6); }
.rule { border: 0; border-top: 1px solid var(--hair); margin: 0; }

/* ---------- Type ---------------------------------------------------------- */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-optical-sizing: auto; }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; font-weight: 600; color: var(--on-field-muted); margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow.accent { color: var(--orange); }
.eyebrow.accent::before { content: ""; width: 7px; height: 7px; background: var(--orange); }
.display {
  font-family: var(--font-mono); font-weight: 700; text-transform: uppercase;
  font-size: var(--fs-display); line-height: .9; letter-spacing: -0.05em; margin: 0;
}
.display > span { display: block; }
.display .hollow { color: transparent; -webkit-text-stroke: 1.5px var(--on-field); }
.display .serif { text-transform: none; letter-spacing: -0.03em; font-weight: 400; color: var(--orange); }
.display-2 {
  font-family: var(--font-mono); font-weight: 700; text-transform: uppercase;
  font-size: var(--fs-display-2); line-height: .92; letter-spacing: -0.045em; margin: 0;
}
.display-2 .serif { text-transform: none; font-weight: 400; letter-spacing: -0.02em; color: var(--orange); }
h2, .h2 { font-family: var(--font-mono); font-size: var(--fs-h2); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; margin: 0; }
h3, .h3 { font-family: var(--font-mono); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.lead { font-family: var(--font-mono); font-size: var(--fs-lead); font-weight: 500; line-height: 1.35; letter-spacing: -0.025em; margin: 0; }
.lead em, .h2 em, h2 em { font-style: normal; color: var(--orange); }
.body-2 { color: var(--on-field-2); }
.muted { color: var(--on-field-muted); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Buttons (app .btn: 8px radius, 500 weight) --------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 13px 18px; border-radius: var(--r-btn); white-space: nowrap; border: 1px solid var(--hair-strong);
  background: var(--field-1); color: var(--on-field); text-decoration: none; cursor: pointer; line-height: 1;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { border-color: var(--on-field); }
.btn .arr { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #FF8C3A; border-color: #FF8C3A; }
.btn-light { background: var(--surface); border-color: var(--surface); color: var(--navy); }
.btn-light:hover { background: var(--orange-soft); border-color: var(--orange-soft); }
.btn-icon { width: 44px; height: 44px; padding: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Brand mark (app favicon: navy cA on white tile) ----------------- */
.mark {
  /* Tile grew with the type floor: "cA" at 16px needs 34px to breathe. */
  width: 34px; height: 34px; border-radius: 8px; background: var(--surface); color: var(--navy);
  display: inline-grid; place-items: center; flex: none;
  font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-micro); letter-spacing: -0.06em;
  box-shadow: inset 0 0 0 1.25px var(--navy);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-body); letter-spacing: -0.02em; }

/* ---------- Nav: full bar at the top, floating pill once scrolled ----------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.nav-links { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; align-items: center; }
.nav-link {
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; color: var(--on-field); opacity: .8; transition: opacity var(--dur-fast), color var(--dur-fast);
}
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; color: var(--orange); }
.nav .btn { padding: 10px 14px; }
.menu-btn { display: none; }
body.scrolled .nav { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.pill {
  position: fixed; z-index: 41; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translate(-50%, -150%); transition: transform var(--dur) var(--ease);
  display: flex; align-items: center; gap: 14px; padding: 7px 8px 7px 7px; border-radius: var(--r-pill);
  background: rgba(18, 42, 77, .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--hair); box-shadow: 0 18px 40px -18px rgba(0,0,0,.7);
}
.pill .mark { width: 36px; height: 36px; }
.pill .nav-link { font-size: var(--fs-micro); }
.pill .btn { padding: 9px 13px; border-radius: var(--r-pill); font-size: var(--fs-micro); }
body.scrolled .pill { transform: translate(-50%, 0); }

.drawer {
  position: fixed; inset: 0; z-index: 60; background: rgba(2, 8, 15, .96); backdrop-filter: blur(8px);
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex; flex-direction: column;
}
[hidden] { display: none !important; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; }
.drawer ul { list-style: none; margin: 48px 0 auto; padding: 0; }
.drawer li a { display: block; text-decoration: none; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; font-size: clamp(30px, 9vw, 44px); letter-spacing: -0.04em; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.drawer li a:hover { color: var(--orange); }

/* ---------- Hero -------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--field-gradient); }
.hero.short { min-height: 72svh; }
.dot-field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(48px, 9vh, 110px); padding-top: 140px; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(28px, 5vh, 56px); flex-wrap: wrap; }
.hero-meta p { max-width: 46ch; color: var(--on-field-2); margin: 0; font-size: var(--fs-body); }
.scroll-cue { position: absolute; right: var(--gutter); top: 50%; z-index: 2; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--on-field-muted); writing-mode: vertical-rl; }

/* ---------- Section head ------------------------------------------------------ */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.sec-head .intro { max-width: 52ch; color: var(--on-field-2); margin: 14px 0 0; }

/* ---------- Split intro ------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.split.even { grid-template-columns: 1fr 1fr; align-items: center; }
.split.top { align-items: start; }

/* ---------- Shelf of covers (horizontal carousel) ------------------------------- */
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(280px, 26vw, 360px); gap: clamp(18px, 2vw, 28px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) 14px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
}
.shelf::-webkit-scrollbar { display: none; }
.shelf-card { scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; }
.shelf-card .tag { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--on-field-muted); margin-bottom: 8px; }
.shelf-card p { color: var(--on-field-muted); font-size: var(--fs-small); margin: 0; }
.shelf-card h3 { margin-top: 16px; }
.shelf-card .more { margin-top: 12px; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; color: var(--on-field); }
.shelf-card:hover .more { color: var(--orange); }

.cover {
  position: relative; aspect-ratio: 3 / 4; padding: 22px 20px; overflow: hidden; border-radius: 4px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.85);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  transform-style: preserve-3d;
}
.shelf-card:hover .cover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 40px 70px -28px rgba(0,0,0,.9), var(--shadow-glow); }
.cover .cA { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-micro); letter-spacing: -0.06em; }
.cover .kicker { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.cover .big { font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; line-height: .88; letter-spacing: -0.055em; font-size: clamp(32px, 3.1vw, 44px); position: relative; z-index: 1; }
.cover .big .serif { text-transform: none; letter-spacing: -0.02em; font-weight: 400; }
/* .6em of a 26px .big would land at 15.6px, under the floor — max() holds it. */
.cover .chip { display: inline-block; padding: 2px 8px 3px; margin: 5px 0; font-size: max(var(--fs-micro), .6em); letter-spacing: -0.02em; }
.cover .foot { font-size: var(--fs-micro); line-height: 1.35; opacity: .85; position: relative; z-index: 1; max-width: 22ch; }
.cover .art { position: absolute; right: -8%; bottom: -6%; width: 68%; pointer-events: none; }
.cover::after { /* paper sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 35%);
}
.c-ink    { background: var(--field-2); color: var(--on-field); border: 1px solid var(--hair); }
.c-ink .cA, .c-navy .cA { background: var(--surface); color: var(--navy); }
.c-ink .chip { background: var(--orange); color: var(--ink); }
.c-paper  { background: #F4F1EA; color: var(--ink); }
.c-paper .cA { background: var(--navy); color: var(--surface); }
.c-paper .chip { background: var(--navy); color: var(--surface); }
.c-orange { background: var(--orange); color: #1A0B00; }
.c-orange .cA { background: #1A0B00; color: var(--orange); }
.c-orange .chip { background: #1A0B00; color: var(--orange); }
.c-navy   { background: linear-gradient(160deg, #1B4A86, var(--navy) 62%); color: #fff; }
.c-navy .chip { background: #fff; color: var(--navy); }
.c-sky    { background: linear-gradient(170deg, #DCEBFF, #A8CBFF 55%, #FFD2B0); color: var(--ink); }
.c-sky .cA { background: var(--ink); color: #fff; }
.c-sky .chip { background: var(--surface); color: var(--ink); }
.c-green  { background: #0C2A1E; color: #DDF7EA; border: 1px solid rgba(61,214,140,.25); }
.c-green .cA { background: var(--green-on-dark); color: #0C2A1E; }
.c-green .chip { background: var(--green-on-dark); color: #0C2A1E; }
.c-amber  { background: var(--amber-soft); color: #3D1F02; }
.c-amber .cA { background: var(--amber); color: #fff; }
.c-amber .chip { background: var(--amber); color: #fff; }

/* ---------- Stats ------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--hair); }
.stat { padding: 34px 24px 30px; border-left: 1px solid var(--hair); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-family: var(--font-mono); font-size: clamp(40px, 5vw, 72px); font-weight: 700; letter-spacing: -0.06em; line-height: 1; font-feature-settings: "tnum"; }
.stat span { display: block; margin-top: 12px; color: var(--on-field-muted); font-size: var(--fs-small); max-width: 26ch; }

/* ---------- Line-art thumbnails (step cards) ----------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2vw, 28px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 28px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2vw, 28px); }
.thumb { aspect-ratio: 1; border: 1px solid var(--hair-strong); display: block; width: 100%; background: linear-gradient(180deg, rgba(11,31,60,.35), rgba(2,8,15,0)); }
.thumb * { fill: none; stroke: var(--on-field); stroke-width: 1; vector-effect: non-scaling-stroke; }
.thumb .hot { stroke: var(--orange); stroke-width: 1.6; }
.thumb .draw { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.6s var(--ease); }
.in .thumb .draw, .thumb.in .draw { stroke-dashoffset: 0; }
.step .n { display: block; margin: 16px 0 6px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--orange); letter-spacing: .12em; }
.step p { color: var(--on-field-muted); font-size: var(--fs-small); margin: 0; }

/* ---------- Tiles / checks ---------------------------------------------------- */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.checks > div { padding: 20px 0; border-top: 1px solid var(--hair); }
.checks b { display: block; font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; margin-bottom: 4px; }
.checks span { font-size: var(--fs-small); color: var(--on-field-muted); }
.tile { border: 1px solid var(--hair); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 30px); background: linear-gradient(180deg, rgba(18,42,77,.45), rgba(7,24,48,.2)); }
.tile .ico { width: 34px; height: 34px; border-radius: var(--r-btn); display: grid; place-items: center; background: rgba(255,122,26,.12); color: var(--orange); margin-bottom: 18px; }
.tile .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile p { color: var(--on-field-muted); font-size: var(--fs-small); margin: 0; }

/* ---------- Is / is not ------------------------------------------------------- */
.isnot { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hair); border-radius: var(--r-card); overflow: hidden; }
.isnot > div { padding: clamp(22px, 3vw, 40px); }
.isnot > div + div { border-left: 1px solid var(--hair); background: rgba(11,31,60,.35); }
.isnot h3 { font-size: var(--fs-micro); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.isnot ul { list-style: none; margin: 0; padding: 0; }
.isnot li { padding: 14px 0; border-top: 1px solid var(--hair); font-family: var(--font-mono); font-size: var(--fs-small); display: flex; gap: 14px; }
.isnot li::before { flex: none; width: 1em; }
.is li::before { content: "+"; color: var(--green-on-dark); }
.not li::before { content: "−"; color: var(--on-field-muted); }
.not li { color: var(--on-field-muted); }

/* ---------- Status badges (app statuses) ---------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: var(--fs-micro); font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.draft     { background: #EEF2F7; color: var(--muted); }
.badge.submitted { background: var(--blue-soft); color: var(--blue); }
.badge.revise    { background: var(--amber-soft); color: var(--amber); }
.badge.checked   { background: var(--green-soft); color: var(--green); }
.badge.formal    { background: var(--navy); color: #fff; }
.badge.blocked   { background: var(--red-soft); color: var(--red); }

/* ---------- App window mockup (light app UI on the dark field) ------------------- */
.app {
  background: var(--surface); color: var(--ink); border-radius: var(--r-panel); overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(var(--glow), .22), 0 0 80px rgba(255,122,26,.12);
  font-size: var(--fs-small); line-height: 1.45;
}
.app-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); background: var(--wash); }
.app-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
/* min-width:0 lets the pill shrink below the URL's intrinsic width — without it
   the longer mockup URLs ran past the panel edge at --fs-micro. Ellipsis keeps
   the truncation looking like a real address bar. */
.app-bar .url { margin-left: 10px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 4px 10px; flex: 1; min-width: 0; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* minmax(0,1fr) rather than the implicit auto: grid items refuse to shrink past
   their content, so at the larger type the mockup rows pushed past the panel and
   were silently cut off by the .app overflow:hidden on narrow screens. */
.app-body { padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app .eyebrow { color: var(--muted); margin: 0 0 2px; display: block; }
.app .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; }
.app .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.app .row > * { min-width: 0; }
.app .line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
/* Mockup copy contains unbreakable tokens (filenames, URLs) that would otherwise
   force the line wider than the panel. */
.app .line > * { min-width: 0; overflow-wrap: anywhere; }
.app .line:first-of-type { border-top: 0; }
.app .amt { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.app .flag { font-size: var(--fs-micro); color: var(--amber); background: var(--amber-soft); border-radius: var(--r-sm); padding: 6px 8px; margin-top: 6px; grid-column: 1 / -1; }
.app .flag.red { color: var(--red); background: var(--red-soft); }
.app .flag.ok { color: var(--green); background: var(--green-soft); }
.meter { height: 10px; border-radius: var(--r-pill); background: #EEF2F7; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; transition: width 1.2s var(--ease); }
.meter .staff { background: var(--navy); }
.meter .other { background: var(--orange); }
.meter-legend { display: flex; gap: 14px; font-size: var(--fs-micro); color: var(--muted); margin-top: 8px; }
.meter-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; background: var(--navy); }
.meter-legend span + span::before { background: var(--orange); }
.app .stepper { display: flex; gap: 6px; flex-wrap: wrap; }
.app .stepper span { font-size: var(--fs-micro); padding: 4px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.app .stepper span.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.app .stepper span.done { background: var(--green-soft); border-color: transparent; color: var(--green); }
.app .btn { font-family: var(--font-sans); text-transform: none; letter-spacing: 0; font-size: var(--fs-micro); font-weight: 500; padding: 8px 12px; border: 0; }
.app .btn-primary { background: var(--navy); color: #fff; }
.app .btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.app .serif { color: var(--navy); }
.app-float { position: relative; }
.app-float .app + .app { position: absolute; right: -6%; bottom: -12%; width: 62%; }

/* ---------- Feature rows ------------------------------------------------------ */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(48px, 8vh, 96px); border-top: 1px solid var(--hair); }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-copy .num { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--orange); letter-spacing: .12em; display: block; margin-bottom: 14px; }
.feature-copy .tier { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .11em; text-transform: uppercase; padding: 5px 10px 6px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); color: var(--on-field-muted); margin-bottom: 16px; }
.feature-copy .tier.paid { color: var(--orange); border-color: rgba(255,122,26,.45); background: rgba(255,122,26,.10); }
.feature-copy .tier.free { color: var(--green-on-dark); border-color: rgba(61,214,140,.38); background: rgba(61,214,140,.10); }
.feature-copy h2 { margin-bottom: 18px; }
.feature-copy p { color: var(--on-field-2); max-width: 48ch; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; font-size: var(--fs-small); color: var(--on-field-2); }
.ticks li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 3px; background: var(--orange); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Roles --------------------------------------------------------------- */
.roles { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hair); border-radius: var(--r-card); overflow: hidden; }
.role { padding: clamp(20px, 2.4vw, 30px); border-left: 1px solid var(--hair); }
.role:first-child { border-left: 0; }
.role .who { font-family: var(--font-serif); font-style: italic; font-size: 30px; line-height: 1.1; margin-bottom: 14px; color: var(--on-field); }
.role p { font-size: var(--fs-small); color: var(--on-field-muted); margin: 0; }
.roles.five { grid-template-columns: repeat(5, 1fr); }
.roles.five .who { font-size: 24px; }
.roles.five .role { padding: clamp(18px, 1.9vw, 24px); }
.roles.five p { font-size: var(--fs-small); }

/* ---------- Timeline ------------------------------------------------------------ */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.timeline li { display: grid; grid-template-columns: 90px 1fr 1.2fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--hair); align-items: start; }
.timeline li::before { counter-increment: t; content: counter(t, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--orange); letter-spacing: .1em; padding-top: 3px; }
.timeline h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.03em; }
.timeline p { color: var(--on-field-muted); font-size: var(--fs-small); margin: 0; }

/* ---------- Pricing --------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2vw, 28px); align-items: stretch; }
.plan { border: 1px solid var(--hair-strong); border-radius: var(--r-panel); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; background: rgba(7,24,48,.6); }
.plan.featured { background: linear-gradient(170deg, #173A6B 0%, var(--field-2) 55%, var(--field-1) 100%); border-color: rgba(var(--glow), .45); box-shadow: var(--shadow-glow); }
.plan .name { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--on-field-muted); }
.plan .price { font-family: var(--font-mono); font-weight: 700; font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.06em; line-height: 1; }
.plan .price small { font-size: var(--fs-small); font-weight: 500; letter-spacing: 0; color: var(--on-field-muted); margin-left: 8px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.plan li { padding: 12px 0; border-top: 1px solid var(--hair); font-size: var(--fs-small); display: flex; gap: 12px; color: var(--on-field-2); }
.plan li::before { content: "+"; font-family: var(--font-mono); color: var(--green-on-dark); flex: none; width: 1em; }
.plan li.no { color: var(--on-field-muted); }
.plan li.no::before { content: "−"; color: var(--on-field-muted); }
.plan .btn { margin-top: auto; }
.plan .price-rule { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--on-field-muted); margin: 12px 0 0; letter-spacing: -0.01em; }
.plan li strong { color: var(--on-field); font-weight: 600; }
.plans.three { grid-template-columns: repeat(3, 1fr); }

/* ---------- Pricing calculator ----------------------------------------------------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2vw, 28px); align-items: stretch; }
.calc-in, .calc-out { border: 1px solid var(--hair-strong); border-radius: var(--r-panel); padding: clamp(22px, 2.8vw, 36px); display: flex; flex-direction: column; gap: 22px; }
.calc-in { background: rgba(7,24,48,.6); justify-content: center; }
.calc-in .field input { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.calc-out { background: linear-gradient(170deg, #173A6B 0%, var(--field-2) 55%, var(--field-1) 100%); border-color: rgba(var(--glow), .45); box-shadow: var(--shadow-glow); }
.calc-total { font-family: var(--font-mono); font-weight: 700; font-size: clamp(44px, 6vw, 76px); letter-spacing: -0.06em; line-height: 1; margin: 0; font-feature-settings: "tnum"; }
.calc-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--on-field-muted); margin: 8px 0 0; }
.calc-facts { margin: 0; display: grid; gap: 0; }
.calc-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--hair); }
.calc-facts dt { font-size: var(--fs-small); color: var(--on-field-muted); }
.calc-facts dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-small); text-align: right; font-feature-settings: "tnum"; }
.calc-note { margin: 0; font-size: var(--fs-small); color: var(--on-field-2); }
.calc-note.hit { color: var(--orange); }
.calc-out .btn { margin-top: auto; align-self: flex-start; }

/* Range input, styled per engine because the pseudo-elements don't merge */
.calc-range { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; margin: 0; }
.calc-range:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }
.calc-range::-webkit-slider-runnable-track { height: 3px; background: var(--hair-strong); border-radius: 999px; }
.calc-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: var(--orange); border: 0; cursor: grab; box-shadow: 0 0 0 6px rgba(255,122,26,.16); }
.calc-range::-moz-range-track { height: 3px; background: var(--hair-strong); border-radius: 999px; }
.calc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); border: 0; cursor: grab; box-shadow: 0 0 0 6px rgba(255,122,26,.16); }

/* min-width tracks the type floor: 17px cells need more room than 14px did. */
.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 700px; }
.cmp th, .cmp td { text-align: left; padding: 14px 12px; border-top: 1px solid var(--hair); vertical-align: top; }
.cmp thead th { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--on-field-muted); border-top: 0; }
.cmp td:not(:first-child) { font-family: var(--font-mono); width: 22%; }
.cmp .y { color: var(--green-on-dark); }
.cmp .n { color: var(--on-field-muted); }
.scroll-x { overflow-x: auto; }

/* ---------- FAQ ---------------------------------------------------------------------- */
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
/* Grid, not flex: as an anonymous flex item the question contributed its
   max-content width to the row's scroll width, which at --fs-body pushed a few
   px of horizontal scroll onto the whole page on narrow screens even though the
   text itself wrapped correctly. A 1fr column has no such floor. */
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 20px; padding: 22px 0; font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-body); letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--orange); transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 24px; color: var(--on-field-2); max-width: 70ch; }

/* ---------- Forms (app inputs, on dark) -------------------------------------------- */
.form { display: grid; gap: 18px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--on-field-muted); margin-bottom: 8px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--on-field); background: rgba(2,8,15,.6);
  border: 1px solid var(--hair-strong); border-radius: var(--r-btn); padding: 12px 14px; transition: border-color var(--dur-fast);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,122,26,.18); }
.field select option { color: var(--ink); }
.form-note { font-size: var(--fs-small); color: var(--on-field-muted); }
.notice { border: 1px solid rgba(61,214,140,.35); background: rgba(21,128,61,.14); color: #CFF5E0; border-radius: var(--r-card); padding: 16px 18px; font-size: var(--fs-small); }

/* ---------- Explainer video ------------------------------------------------------------
   The source is portrait (406x720) and carries narration, so it is presented at its
   native ratio behind a click-to-play cover rather than autoplayed muted as wallpaper:
   no upscaling, no lost audio, and the file isn't fetched until someone asks for it. */
.vid-wrap { display: flex; justify-content: center; }
.vid {
  position: relative; width: 100%; max-width: 348px; aspect-ratio: 406 / 720;
  border: 1px solid var(--hair-strong); border-radius: var(--r-panel); overflow: hidden;
  background: var(--field-2); box-shadow: var(--shadow-card);
}
.vid video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vid-play {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 28px; text-align: center; color: var(--on-field);
  background: linear-gradient(170deg, rgba(23,58,107,.94), rgba(7,24,48,.97));
}
.vid-play[hidden] { display: none; }
.vid-ico {
  width: 64px; height: 64px; border-radius: 50%; background: var(--orange); color: var(--ink);
  display: grid; place-items: center; font-size: 22px; padding-left: 4px;
  box-shadow: 0 0 0 10px rgba(255,122,26,.14);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.vid-play:hover .vid-ico { transform: scale(1.07); box-shadow: 0 0 0 16px rgba(255,122,26,.16); }
.vid-label { font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; letter-spacing: -0.01em; line-height: 1.5; }
.vid-label small {
  display: block; margin-top: 8px; font-weight: 400; font-size: var(--fs-micro); letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-field-muted);
}

/* ---------- CTA band ------------------------------------------------------------------- */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--hair); background: var(--field-gradient); }
.cta .dot-field { opacity: .6; }
.cta .wrap { position: relative; z-index: 1; padding-block: clamp(88px, 15vh, 170px); }
.cta p { color: var(--on-field-2); max-width: 52ch; margin: 24px 0 32px; font-size: var(--fs-body); }

/* ---------- Page header (sub pages) -------------------------------------------------- */
.crumb { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--on-field-muted); margin-bottom: 20px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--orange); }

/* ---------- Footer --------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--hair); background: var(--field-0); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 56px 40px; }
.footer-top h4 { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--on-field-muted); margin: 0 0 14px; font-weight: 600; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-top a { text-decoration: none; font-size: var(--fs-small); opacity: .85; }
.footer-top a:hover { opacity: 1; color: var(--orange); }
.footer-top .blurb { color: var(--on-field-muted); font-size: var(--fs-small); max-width: 34ch; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--on-field-muted); }
/* The Pulse Pedagogies credit. Inherits the muted footer colour, so it needs a
   hairline underline to still read as a link without drawing attention. */
.footer-bottom a { text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 4px; transition: color var(--dur-fast), text-decoration-color var(--dur-fast); }
.footer-bottom a:hover { color: var(--orange); text-decoration-color: var(--orange); }
.wordmark-xl { font-family: var(--font-mono); font-weight: 700; font-size: clamp(64px, 17vw, 260px); letter-spacing: -0.07em; line-height: .8; margin: 0; padding-top: 24px; color: transparent; -webkit-text-stroke: 1px var(--hair-strong); user-select: none; white-space: nowrap; overflow: hidden; }

/* ---------- Reveal ---------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) ease, transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ---------- Responsive -------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .split, .split.even, .feature { grid-template-columns: 1fr; }
  .plans.three, .calc { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .grid-4, .roles, .roles.five { grid-template-columns: 1fr 1fr; }
  .role:nth-child(3) { border-left: 0; }
  .role:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .roles.five .role:nth-child(odd) { border-left: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .timeline li { grid-template-columns: 60px 1fr; }
  .timeline li p { grid-column: 2; }
  .app-float .app + .app { position: relative; right: auto; bottom: auto; width: 88%; margin: -40px 0 0 auto; }
}
/* Raised from 860px: nav links and the floating pill carry 16px type now, so
   they run out of room sooner and hand off to the drawer earlier. */
@media (max-width: 1040px) {
  .nav-links, .nav .btn-primary { display: none; }
  .menu-btn { display: inline-flex; }
  .pill .nav-link { display: none; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2, .roles, .roles.five, .checks, .isnot, .plans, .form .two { grid-template-columns: 1fr; }
  .role { border-left: 0; border-top: 1px solid var(--hair); }
  .role:first-child { border-top: 0; }
  .isnot > div + div { border-left: 0; border-top: 1px solid var(--hair); }
  .scroll-cue, .shelf-arrows { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .display .hollow { -webkit-text-stroke-width: 1px; }
  .hero .dot-field { opacity: .5; }
  .hero-meta p { text-shadow: 0 1px 12px rgba(2,8,15,.9); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shelf-card:hover .cover { transform: none; }
  .thumb .draw { stroke-dashoffset: 0; transition: none; }
}
