/* ============================================================
   Catalation / Synapse — marketing site, design system v2
   "Editorial product" — warm paper, ink type, one teal signal,
   rich HTML/CSS product mockups instead of stock imagery.
   Dark mode is opt-in (toggle only).
   Contract: design-system/catalation-synapse/MASTER.md
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  --bg:            #FAFAF7;
  --bg-alt:        #F3F2EC;
  --surface:       #FFFFFF;
  --surface-2:     #F4F4F0;
  --surface-3:     #ECEBE5;

  --text-strong:   #0B0B0C;
  --text:          #1C1C1F;
  --body:          #3F3F46;
  --muted:         #66666E;

  --border:        #E3E2DC;
  --border-strong: #CFCEC6;

  --accent:        #0F766E;
  --accent-hover:  #115E59;
  --accent-soft:   rgba(15, 118, 110, 0.09);
  --accent-line:   rgba(15, 118, 110, 0.28);
  --on-accent:     #FFFFFF;

  --ink:           #0B0B0C;
  --ink-hover:     #27272A;
  --on-ink:        #FAFAF7;

  --ok:            #15803D;
  --ok-soft:       rgba(21, 128, 61, 0.10);
  --warn:          #B45309;
  --warn-soft:     rgba(180, 83, 9, 0.10);
  --stop:          #B91C1C;
  --stop-soft:     rgba(185, 28, 28, 0.09);
  --info:          #1D4ED8;
  --info-soft:     rgba(29, 78, 216, 0.09);
  --ring:          rgba(15, 118, 110, 0.55);

  --code-bg:       #0E0E10;
  --code-text:     #E7E5E4;
  --code-dim:      #8A8A93;
  --code-accent:   #5EEAD4;

  --shadow-xs: 0 1px 2px rgba(20, 20, 18, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.04), 0 3px 8px rgba(20, 20, 18, 0.05);
  --shadow-md: 0 2px 4px rgba(20, 20, 18, 0.04), 0 12px 32px rgba(20, 20, 18, 0.08);
  --shadow-lg: 0 4px 8px rgba(20, 20, 18, 0.04), 0 24px 64px rgba(20, 20, 18, 0.12);

  --font-sans:    'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-2xs:  12px;
  --text-xs:   13px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  clamp(26px, 2.6vw, 32px);
  --text-3xl:  clamp(32px, 4.2vw, 52px);
  --text-hero: clamp(44px, 7.4vw, 96px);

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;
  --sp-24: 96px; --sp-32: 128px;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --wrap: 1200px;
  --gutter: 24px;
  --nav-h: 64px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in:  cubic-bezier(.4, 0, 1, .6);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:            #0B0B0C;
  --bg-alt:        #111113;
  --surface:       #161618;
  --surface-2:     #1D1D20;
  --surface-3:     #26262A;

  --text-strong:   #FAFAF7;
  --text:          #E7E5E4;
  --body:          #B4B4BB;
  --muted:         #92929B;

  --border:        #27272A;
  --border-strong: #3A3A3F;

  --accent:        #2DD4BF;
  --accent-hover:  #5EEAD4;
  --accent-soft:   rgba(45, 212, 191, 0.10);
  --accent-line:   rgba(45, 212, 191, 0.30);
  --on-accent:     #042F2E;

  --ink:           #FAFAF7;
  --ink-hover:     #E7E5E4;
  --on-ink:        #0B0B0C;

  --ok:            #4ADE80;
  --ok-soft:       rgba(74, 222, 128, 0.12);
  --warn:          #FBBF24;
  --warn-soft:     rgba(251, 191, 36, 0.12);
  --stop:          #F87171;
  --stop-soft:     rgba(248, 113, 113, 0.12);
  --info:          #93C5FD;
  --info-soft:     rgba(147, 197, 253, 0.12);
  --ring:          rgba(45, 212, 191, 0.6);

  --code-bg:       #050506;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 24px 64px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
strong { color: var(--text-strong); font-weight: 600; }
code, kbd, pre { font-family: var(--font-mono); }
::selection { background: var(--accent); color: var(--on-accent); }

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

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top .15s var(--ease-out);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: 820px; }

/* ---------- Type helpers ---------- */

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 2px;
  background: currentColor;
}

.lede {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--body);
  max-width: 62ch;
}

.muted { color: var(--muted); }
.accent { color: var(--accent); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out),
              border-color .18s var(--ease-out), transform .18s var(--ease-out),
              box-shadow .18s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-hover); box-shadow: var(--shadow-sm); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--text-strong); }

.btn-ghost { color: var(--text-strong); padding: 0 12px; }
.btn-ghost:hover { color: var(--accent); }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--text-xs); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: var(--text-base); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-strong);
  font-weight: 600;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color .18s, border-color .18s;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
.link-arrow::after { content: '→'; transition: transform .18s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Announcement bar ---------- */

.announce {
  background: var(--ink);
  color: var(--on-ink);
  font-size: var(--text-xs);
  text-align: center;
}
.announce a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px var(--gutter);
  flex-wrap: wrap;
}
.announce .pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
:root[data-theme="dark"] .announce .pill { color: var(--on-accent); }
.announce u { text-underline-offset: 3px; }
@media (max-width: 640px) { .announce .long { display: none; } }

/* ---------- Nav ---------- */

#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Opaque: content scrolling underneath must never show through the nav. */
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
#nav.is-scrolled { border-bottom-color: var(--border); }
#nav > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: var(--sp-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  flex: none;
}
.brand-logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-ink);
  display: grid;
  place-items: center;
}
.brand-logo svg { width: 18px; height: 18px; }
.brand-mark {
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 14px;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a,
.nav-menu > li > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li > button[aria-expanded="true"] { background: var(--surface-2); color: var(--text-strong); }
.nav-menu > li > a[aria-current="page"] { color: var(--accent); }
/* "Alfred" (hardware product) in the serif italic of the headings; Instrument
   Serif runs small, so nudge it up to sit level with the sans items. */
.nav-alfred .serif { font-size: 1.18em; line-height: 1; }
.nav-menu .chev { width: 14px; height: 14px; transition: transform .2s var(--ease-out); }
.nav-menu button[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(640px, calc(100vw - 48px));
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s .16s;
}
.mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility 0s;
}
.mega-narrow { width: min(340px, calc(100vw - 48px)); grid-template-columns: 1fr; }
.mega a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: var(--radius);
  transition: background-color .15s;
}
.mega a:hover { background: var(--surface-2); }
.mega .mi {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.mega .mi svg { width: 18px; height: 18px; }
.mega b { display: block; color: var(--text-strong); font-size: var(--text-sm); font-weight: 600; }
.mega small { display: block; color: var(--muted); font-size: var(--text-xs); line-height: 1.4; }
.mega .mega-foot a { display: inline-flex; align-items: center; grid-template-columns: none; gap: 6px; padding: 0; border-radius: 0; }
.mega .mega-foot a.link-arrow { padding-bottom: 2px; }
.mega .mega-foot a:hover { background: none; }
.mega .mega-foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
  transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--text-strong); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon { display: none; }
.nav-toggle { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu,
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

.nav-panel {
  display: none;
}

@media (max-width: 1023px) {
  .nav-menu, .nav-right .btn-ghost { display: none; }
  #nav > .wrap { gap: 12px; }
  .nav-right { gap: 6px; flex: none; }
}
@media (max-width: 480px) {
  .brand-tag { display: none; }
  .brand-mark { font-size: 13px; }
  .nav-right .btn-sm { padding: 0 12px; }
}
@media (max-width: 1023px) {
  .nav-toggle { display: inline-grid; }
  .nav-panel {
    position: fixed;
    inset: var(--panel-top, var(--nav-h)) 0 0 0;
    z-index: 99;
    display: block;
    overflow-y: auto;
    padding: 16px var(--gutter) 48px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility 0s .18s;
  }
  .nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), visibility 0s;
  }
  .nav-panel h6 {
    margin: 20px 0 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
  }
  .nav-panel a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid var(--border);
    color: var(--text-strong);
    font-weight: 500;
  }
  .nav-panel a[aria-current="page"] { color: var(--accent); }
  .nav-panel .btn { margin-top: 24px; width: 100%; border-bottom: 0; color: var(--on-ink); }
}

/* ---------- Sections ---------- */

.section {
  padding: var(--sp-24) 0;
  position: relative;
}
.section-tight { padding: var(--sp-16) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-ink {
  background: var(--code-bg);
  color: #B4B4BB;
  --text-strong: #FAFAF7;
  --body: #B4B4BB;
  --muted: #8A8A93;
  --border: #27272A;
  --border-strong: #3A3A3F;
  --surface: #161618;
  --surface-2: #1D1D20;
  --bg: #0B0B0C;
  --accent: #2DD4BF;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --ink: #FAFAF7;
  --on-ink: #0B0B0C;
  --ink-hover: #E7E5E4;
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--sp-12);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.035em;
  margin-bottom: var(--sp-4);
}
.section-head h2 .serif { font-size: 1.08em; }
.section-head.row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--sp-8);
  flex-wrap: wrap;
}
.section-head.row > div { max-width: 700px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 var(--sp-16);
  overflow: hidden;
}
.hero::before {
  /* Decorative glow only — no grid lines under text or controls. */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 50% -8%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }
.hero-center { text-align: center; }
.hero-center .lede { margin-left: auto; margin-right: auto; }
.hero h1 {
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.hero h1 .serif { letter-spacing: -0.02em; font-size: 1.06em; }
.hero .lede { font-size: clamp(17px, 1.6vw, 21px); margin-bottom: var(--sp-8); }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-center .hero-ctas { justify-content: center; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: var(--sp-6);
  font-size: var(--text-xs);
  color: var(--muted);
}
.hero-center .hero-meta { justify-content: center; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 14px; height: 14px; color: var(--accent); }

.page-hero { padding: clamp(48px, 7vw, 96px) 0 var(--sp-12); }
.page-hero h1 { font-size: clamp(40px, 6vw, 76px); }

.crumbs {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--muted);
  margin-bottom: var(--sp-6);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hero-center .crumbs { justify-content: center; }
.crumbs a:hover { color: var(--accent); }

/* ---------- Chips / badges ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-live, .s-done { color: var(--ok); background: var(--ok-soft); }
.s-progress { color: var(--info); background: var(--info-soft); }
.s-review, .s-wait { color: var(--warn); background: var(--warn-soft); }
.s-blocked { color: var(--stop); background: var(--stop-soft); }
.s-planned { color: var(--muted); background: var(--surface-2); }

/* ---------- Logo / works-with strip ---------- */

.strip {
  padding: var(--sp-8) 0 var(--sp-16);
}
.strip p {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-6);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .chip { font-size: var(--text-sm); padding: 8px 16px; color: var(--text-strong); }
.marquee .chip svg { width: 16px; height: 16px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Product window (app mockup) ---------- */

.window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.window-url {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  height: 24px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.window-url svg { width: 11px; height: 11px; }

.hero-shot { margin-top: var(--sp-16); perspective: 2000px; }
.hero-shot .window { transform: rotateX(4deg); transform-origin: 50% 0; }

.app {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  min-height: 520px;
  font-size: 13px;
}
.app-side {
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  background: var(--bg);
}
.app-company {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 14px;
  font-weight: 600;
  color: var(--text-strong);
}
.app-company i {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #134E4A);
  display: inline-block;
}
.app-side h6 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 14px 8px 6px;
}
.app-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--body);
}
.app-nav a svg { width: 15px; height: 15px; }
.app-nav a.on { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-xs); border: 1px solid var(--border); }
.app-nav .count { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.app-main { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.app-main h4 { font-size: 15px; letter-spacing: -0.01em; }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #52525B;
  flex: none;
}
.avatar.ceo { background: var(--accent); }
:root[data-theme="dark"] .avatar.ceo { color: var(--on-accent); }
.avatar.you { background: var(--ink); color: var(--on-ink); }
.msg-head { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.msg-head b { color: var(--text-strong); }
.msg-head span { color: var(--muted); font-size: 11px; }
.msg-body { color: var(--body); line-height: 1.55; }
.msg-card {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
}
.msg-card .app-row + .app-row { margin-top: 6px; }
.msg-actions { display: flex; gap: 6px; margin-top: 10px; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-strong);
}
.mini-btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.composer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 8px 8px 12px;
  color: var(--muted);
  background: var(--bg);
}
.composer span { flex: 1; }
.composer .model { font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); }

.app-aside { border-left: 1px solid var(--border); padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.app-aside h6 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 8px; }

.task-list { display: flex; flex-direction: column; gap: 6px; }
.task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12px;
}
.task code { font-size: 10px; color: var(--muted); }
.task span { color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.warn i { background: var(--warn); }

@media (max-width: 1080px) {
  .app { grid-template-columns: 200px 1fr; }
  .app-aside { display: none; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; min-height: 0; }
  .app-side { display: none; }
  .hero-shot .window { transform: none; }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.step { padding: var(--sp-8); position: relative; }
.step + .step { border-left: 1px solid var(--border); }
.step-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: var(--sp-12);
  display: block;
}
.step h3 { font-size: var(--text-xl); margin-bottom: var(--sp-3); }
.step blockquote {
  margin: var(--sp-4) 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--text-strong);
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--border); }
  .step-num { margin-bottom: var(--sp-6); }
}

/* ---------- Feature grid / cards ---------- */

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
a.card { display: block; }
a.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
a.card:hover .card-more { color: var(--accent); }
.card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); letter-spacing: -0.02em; }
.card p { font-size: var(--text-sm); color: var(--body); }
.card-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: var(--sp-6);
}
.card-icon svg { width: 20px; height: 20px; }
.card-more {
  display: inline-flex;
  gap: 6px;
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-strong);
  transition: color .15s;
}
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.card-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--sp-2);
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4);
}
.bento > * { grid-column: span 2; }
.bento > .w3 { grid-column: span 3; }
.bento > .w4 { grid-column: span 4; }
.bento > .w6 { grid-column: span 6; }
@media (max-width: 1023px) { .bento > *, .bento > .w3, .bento > .w4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento > *, .bento > .w3, .bento > .w4, .bento > .w6 { grid-column: span 6; } }

/* ---------- Split feature rows ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split.flip > :first-child { order: 2; }
.split h2 { font-size: var(--text-3xl); letter-spacing: -0.035em; margin-bottom: var(--sp-4); }
.split h2 .serif { font-size: 1.08em; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}

.checks { list-style: none; display: grid; gap: 10px; margin: var(--sp-6) 0; }
.checks li {
  position: relative;
  padding-left: 30px;
  font-size: var(--text-sm);
  color: var(--body);
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
:root[data-theme="dark"] .checks li::before,
.section-ink .checks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232DD4BF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}
.checks strong { font-weight: 600; }

/* ---------- Panel (mockup container) ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-size: 13px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.panel-head b { color: var(--text-strong); font-size: 13px; font-weight: 600; }
.panel-head .mono { font-size: 11px; color: var(--muted); }
.panel-body { padding: 16px; }
.panel-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Org chart */
.org { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 24px 12px; }
.org-level { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; position: relative; }
.org-link { width: 1px; height: 22px; background: var(--border-strong); }
.org-bus {
  height: 1px;
  background: var(--border-strong);
  width: 78%;
  margin-bottom: 0;
}
.org-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  min-width: 132px;
  font-size: 12px;
}
.org-node b { display: block; color: var(--text-strong); font-weight: 600; font-size: 12px; }
.org-node small { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.org-node.human { border-style: dashed; }
.org-node.lead { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.org-legend { display: flex; gap: 16px; justify-content: center; font-size: 11px; color: var(--muted); padding: 0 0 16px; }
.org-legend span { display: inline-flex; align-items: center; gap: 6px; }
.org-legend i { width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--border-strong); }
.org-legend i.d { border-style: dashed; }

/* Goal ladder */
.ladder { display: flex; flex-direction: column; gap: 0; padding: 20px; }
.rung {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}
.rung:last-child { padding-bottom: 0; }
.rung::before {
  content: '';
  position: absolute;
  left: 13px; top: 28px; bottom: 0;
  width: 1px;
  background: var(--border-strong);
}
.rung:last-child::before { display: none; }
.rung-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.rung:first-child .rung-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.rung small { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.rung b { display: block; color: var(--text-strong); font-weight: 500; font-size: 14px; line-height: 1.4; }
.rung:nth-child(2) { margin-left: 16px; }
.rung:nth-child(3) { margin-left: 32px; }
.rung:nth-child(4) { margin-left: 48px; }
@media (max-width: 480px) { .rung:nth-child(n) { margin-left: 0; } }

/* Timeline (heartbeat / worker lanes) */
.lanes { padding: 16px; display: grid; gap: 12px; overflow: hidden; }
.lane { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center; }
.lane-label b { display: block; color: var(--text-strong); font-size: 12px; font-weight: 600; }
.lane-label small { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.lane-track {
  position: relative;
  height: 30px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100%/6 - 1px), var(--border) calc(100%/6 - 1px) calc(100%/6));
}
.lane-track span {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
}
.lane-track span.alt { background: var(--info-soft); border-color: transparent; color: var(--info); }
.lane-track span.hot { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.lane-axis { display: grid; grid-template-columns: 116px repeat(6, 1fr); gap: 0 12px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); padding: 0 16px 12px; }
.lane-axis span:first-child { grid-column: 1; }
@media (max-width: 520px) { .lane { grid-template-columns: 84px 1fr; } .lane-axis { display: none; } }

/* Tables inside panels */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td b { color: var(--text-strong); font-weight: 600; }
.tbl td small { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Trace */
.trace { font-family: var(--font-mono); font-size: 12px; }
.trace li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px dashed var(--border);
}
.trace li:first-child { border-top: 0; }
.trace code { color: var(--text-strong); }

/* Approval card */
.approval {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg);
}
.approval + .approval { margin-top: 10px; }
.approval-title { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 6px; }
.approval-title b { color: var(--text-strong); font-size: 13px; }
.approval p { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* Code / terminal */
.terminal {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-lg);
  border: 1px solid #27272A;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #27272A;
  color: var(--code-dim);
  font-size: 11px;
}
.terminal-bar .window-dots i { background: #3A3A3F; }
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  white-space: pre;
}
.terminal .c { color: var(--code-dim); }
.terminal .k { color: var(--code-accent); }
.terminal .s { color: #FCD34D; }
.terminal .ok { color: #4ADE80; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #3A3A3F;
  background: transparent;
  color: var(--code-text);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  min-height: 28px;
}
.copy-btn:hover { border-color: var(--code-accent); color: var(--code-accent); }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { padding: var(--sp-8) var(--sp-6); }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b {
  display: block;
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  line-height: 1;
  margin-bottom: var(--sp-3);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: var(--text-sm); color: var(--muted); }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Governance verbs ---------- */

.verbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  line-height: 1.05;
}
.verbs span:nth-child(even) { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }

/* ---------- Pricing ---------- */

.pricing {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1180px) { .pricing { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing { grid-template-columns: 1fr; } }
.plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}
.plan.featured { border-color: var(--ink); box-shadow: var(--shadow-md); position: relative; }
.plan-badge {
  position: absolute;
  top: -11px; left: var(--sp-6);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.plan h3 { font-size: var(--text-md); margin-bottom: var(--sp-2); }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: var(--sp-4) 0 var(--sp-2); }
.plan-price b { font-size: 40px; letter-spacing: -0.04em; color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.plan-price span { color: var(--muted); font-size: var(--text-sm); }
.plan > p { font-size: var(--text-sm); min-height: 44px; }
.plan ul { list-style: none; display: grid; gap: 8px; margin: var(--sp-4) 0 var(--sp-6); font-size: var(--text-xs); }
.plan li { position: relative; padding-left: 22px; color: var(--body); }
.plan li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; width: 100%; }

.compare { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.compare tbody th, .compare thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.compare thead th:first-child { z-index: 2; background: var(--surface-2); }
.compare tr.group th { position: sticky; left: 0; }
@media (max-width: 900px) {
  .compare-wrap::before {
    content: 'Scroll sideways for the full table →';
    display: block;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    position: sticky; left: 0;
  }
  .compare td { min-width: 200px; }
  .compare tbody th { min-width: 140px; }
}
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare td { min-width: 220px; }
.compare tbody th { white-space: nowrap; }
.compare thead th { font-weight: 600; color: var(--text-strong); background: var(--surface-2); position: sticky; top: 0; }
.compare tbody th { font-weight: 500; color: var(--text); }
.compare td { color: var(--body); font-variant-numeric: tabular-nums; }
.compare tr.group th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.compare .y { color: var(--accent); font-weight: 700; }
.compare .n { color: var(--border-strong); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); border-color: var(--accent-line); }
.faq .faq-a { padding: 0 56px 24px 0; color: var(--body); max-width: 78ch; }

/* ---------- Timeline (changelog / roadmap) ---------- */

.timeline { position: relative; }
.release {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border);
}
.release-date { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.release-date time { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.release-date .tag { display: inline-block; margin-top: 8px; }
.release h3 { font-size: var(--text-xl); margin-bottom: var(--sp-3); }
.release ul { list-style: none; display: grid; gap: 10px; margin-top: var(--sp-4); }
.release li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; font-size: var(--text-sm); }
.release li .tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); min-width: 64px; text-align: center; }
.release li .tag.new { background: var(--accent-soft); color: var(--accent); }
.release li .tag.sec { background: var(--stop-soft); color: var(--stop); }
.release li .tag.imp { background: var(--info-soft); color: var(--info); }
@media (max-width: 760px) {
  .release { grid-template-columns: 1fr; gap: var(--sp-3); }
  .release-date { position: static; }
}

.milestones { display: grid; gap: 12px; }
.milestone {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--sp-6);
  align-items: start;
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.milestone-id {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--accent);
}
.milestone h3 { font-size: var(--text-lg); margin-bottom: 6px; }
.milestone p { font-size: var(--text-sm); }
.milestone ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (max-width: 700px) { .milestone { grid-template-columns: 1fr; gap: var(--sp-3); } }

/* ---------- Tabs ---------- */

.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: var(--sp-8); flex-wrap: wrap; }
.tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.tab:not([aria-selected="true"]):hover { color: var(--text-strong); background: var(--surface-2); }

/* ---------- Quote / principle ---------- */

.big-quote {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  max-width: 24ch;
  margin: 0;
}
.big-quote em { color: var(--accent); }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.principle { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.principle:nth-child(odd) { padding-right: 24px; }
.principle:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--border); }
.principle span { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); padding-top: 3px; }
.principle b { display: block; color: var(--text-strong); font-weight: 600; }
.principle p { font-size: var(--text-sm); color: var(--muted); margin: 2px 0 0; }
@media (max-width: 720px) {
  .principles { grid-template-columns: 1fr; }
  .principle:nth-child(n) { padding: 18px 0; border-left: 0; }
}

/* ---------- Prose (manifesto, legal-ish pages) ---------- */

.prose { max-width: 68ch; font-size: var(--text-md); line-height: 1.75; }
.prose p { margin-bottom: 1.2em; }
.prose h2 { font-size: var(--text-2xl); margin: 2em 0 .6em; }
.prose em { font-family: var(--font-serif); font-size: 1.1em; color: var(--text-strong); }
.prose .drop::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 4.4em;
  line-height: .85;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

/* ---------- CTA band / waitlist ---------- */

.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px);
  background: var(--code-bg);
  color: #B4B4BB;
  text-align: center;
  --text-strong: #FAFAF7;
  --muted: #8A8A93;
  --border: #27272A;
  --border-strong: #3A3A3F;
  --surface: #161618;
  --ink: #FAFAF7;
  --on-ink: #0B0B0C;
  --ink-hover: #E7E5E4;
  --accent: #2DD4BF;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(640px 320px at 50% 115%, rgba(45, 212, 191, 0.22), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: var(--text-3xl); letter-spacing: -0.035em; margin-bottom: var(--sp-4); color: #FAFAF7; }
.cta .lede { margin: 0 auto var(--sp-8); color: #B4B4BB; }

.waitlist { max-width: 520px; margin: 0 auto; text-align: left; }
.waitlist label { display: block; font-size: var(--text-xs); color: var(--muted); margin-bottom: 8px; }
.waitlist-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
}
.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  outline: none;
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.waitlist .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.waitlist .note { margin-top: 10px; font-size: var(--text-xs); color: var(--muted); text-align: center; }
.waitlist .error { color: #FCA5A5; font-size: var(--text-xs); margin-top: 8px; min-height: 1em; }
.waitlist .success { color: #5EEAD4; font-size: var(--text-sm); margin-top: 8px; }
.waitlist .error:empty, .waitlist .success:empty { display: none; }
@media (max-width: 480px) {
  .waitlist-row { flex-direction: column; border-radius: var(--radius-lg); }
  .waitlist-row .btn { width: 100%; }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-16) 0 var(--sp-8);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: var(--sp-8);
}
.footer-brand p { margin-top: var(--sp-4); color: var(--muted); max-width: 32ch; font-size: var(--text-sm); }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.footer-col a { display: block; padding: 5px 0; color: var(--text); transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-16);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-xs);
}
.footer-bottom a:hover { color: var(--accent); }
.footer-word {
  margin-top: var(--sp-12);
  font-size: clamp(64px, 17vw, 240px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: 60ms; }
.js .reveal[data-d="2"] { transition-delay: 120ms; }
.js .reveal[data-d="3"] { transition-delay: 180ms; }

/* ---------- Utilities ---------- */

.mt-4 { margin-top: var(--sp-4); }
.mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.flex-gap { display: flex; flex-wrap: wrap; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: var(--sp-16) 0; border: 0; }
.note-box {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: var(--text-sm);
  color: var(--muted);
  background: var(--surface);
}
.note-box b { color: var(--text-strong); }

/* ---------- Motion safety ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .hero-shot .window { transform: none; }
}

/* ---------- Screenshots (real product captures, img/shots/) ---------- */

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.shot { margin: 0; min-width: 0; }
.shot .window img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot.tall .window img { aspect-ratio: 16 / 11; }
.shot figcaption { margin-top: var(--sp-3); font-size: var(--text-sm); color: var(--body); display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.shot figcaption b { color: var(--text-strong); font-weight: 600; }
.shot figcaption .status { flex-shrink: 0; }
.shots > .wide { grid-column: 1 / -1; }
.shots > .wide .window img { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .shots { grid-template-columns: 1fr; }
  .shots > .wide .window img { aspect-ratio: 16 / 10; }
}

/* ---------- Alfred hardware page (/alfred.html, also alfred.catalation.com) ----------
   Page-scoped: everything below hangs off main.alfred or .alfred-* classes.
   The page swaps the teal signal for the device's ice-blue light ring
   (#4FC3F7 in dark; #0369A1 in light for >= 4.5:1 text contrast on paper). */

.alfred {
  --accent:       #0369A1;
  --accent-hover: #075985;
  --accent-soft:  rgba(79, 195, 247, 0.14);
  --accent-line:  rgba(3, 105, 161, 0.30);
  --ring:         rgba(3, 105, 161, 0.5);
  --alfred-glow:  #4FC3F7;
}
:root[data-theme="dark"] .alfred {
  --accent:       #4FC3F7;
  --accent-hover: #7FDBFF;
  --accent-soft:  rgba(79, 195, 247, 0.12);
  --accent-line:  rgba(79, 195, 247, 0.32);
  --ring:         rgba(79, 195, 247, 0.6);
  --on-accent:    #04223A;
}
.alfred :focus-visible { outline-color: var(--accent); }

/* Hero — pure white in light theme so the studio render (white background) blends in */
.alfred-hero { background: #FFFFFF; padding-bottom: var(--sp-16); }
:root[data-theme="dark"] .alfred-hero { background: var(--bg); }
/* No tinted glow behind the render in light theme: it would outline the photo's white background. */
:root:not([data-theme="dark"]) .alfred-hero::before { display: none; }
.alfred-hero { padding-top: clamp(32px, 5vw, 64px); }
.alfred-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.alfred-status { margin: 0 0 var(--sp-4); }
.alfred-hero h1 { font-size: clamp(40px, 5.4vw, 76px); }
@media (max-width: 1023px) {
  .alfred-hero-grid { grid-template-columns: 1fr; }
}
.alfred-price-note { font-variant-numeric: tabular-nums; color: var(--text-strong); }

.alfred-device {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;          /* matches the 1536×1024 render: no layout shift */
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.alfred-device-fallback,
.alfred-device picture,
.alfred-device-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.alfred-device-photo { object-fit: contain; }
/* Image failed to load (js/main.js adds the class): show the drawn silhouette instead. */
.alfred-device.is-broken picture { display: none; }

/* Dark theme: an intentional white "studio card" with a faint ring-coloured glow */
:root[data-theme="dark"] .alfred-device {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(79, 195, 247, 0.10), 0 30px 90px -30px rgba(79, 195, 247, 0.35);
}

/* How it works: four steps */
.alfred-steps { grid-template-columns: repeat(4, 1fr); list-style: none; }
.alfred-steps .step-num { margin-bottom: var(--sp-6); }
.alfred-step-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  margin-bottom: var(--sp-6);
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--accent);
}
.alfred-step-icon svg { width: 20px; height: 20px; }
@media (max-width: 1023px) {
  .alfred-steps { grid-template-columns: repeat(2, 1fr); }
  .alfred-steps .step:nth-child(3) { border-left: 0; }
  .alfred-steps .step:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 860px) {
  .alfred-steps { grid-template-columns: 1fr; }
  .alfred-steps .step + .step { border-left: 0; border-top: 1px solid var(--border); }
}

/* Ask Alfred: example exchanges */
.alfred-fine { font-size: var(--text-xs); }
.alfred-qa { list-style: none; display: grid; gap: var(--sp-4); }
.alfred-qa li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}
.alfred-q { color: var(--text-strong); font-weight: 500; margin-bottom: var(--sp-3); }
.alfred-a { color: var(--body); font-size: var(--text-sm); padding-left: 12px; border-left: 2px solid var(--alfred-glow); }
.alfred-who {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.alfred-a .alfred-who { color: var(--accent); }

/* Synapse diagram: Alfred node carries the ring colour */
.alfred-node { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Pricing card */
.alfred-plan { max-width: 440px; width: 100%; justify-self: end; }
.alfred-plan > p { min-height: 0; }
@media (max-width: 960px) { .alfred-plan { justify-self: start; } }

/* Pilot sign-up form (inside the dark .cta band) */
.alfred-cta { --accent: #4FC3F7; --ring: rgba(79, 195, 247, 0.55); }
.alfred-cta::before { background: radial-gradient(640px 320px at 50% 115%, rgba(79, 195, 247, 0.22), transparent 70%); }
.alfred-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-6);
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.alfred-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.alfred-field-wide { grid-column: 1 / -1; }
.alfred-form label { font-size: var(--text-sm); color: #E7E5E4; font-weight: 500; }
.alfred-req, .alfred-opt { color: var(--muted); font-weight: 400; }
.alfred-form input,
.alfred-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-strong);
}
.alfred-form textarea { resize: vertical; min-height: 110px; }
.alfred-form input:focus-visible,
.alfred-form textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.alfred-form [aria-invalid="true"] { border-color: #FCA5A5; }
.alfred-error { margin: 0; font-size: var(--text-xs); color: #FCA5A5; }
.alfred-error:empty { display: none; }
.alfred-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alfred-submit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); margin-top: var(--sp-2); }
.alfred-form-status { margin: 0; font-size: var(--text-sm); }
.alfred-form-status.is-ok { color: #7FDBFF; }
.alfred-form-status.is-error { color: #FCA5A5; }
.alfred-privacy { margin: 0; font-size: var(--text-xs); line-height: 1.5; color: var(--muted); }
.alfred-privacy a { color: #B4B4BB; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
  .alfred-form { grid-template-columns: 1fr; }
  .alfred-submit .btn { width: 100%; }
}
