/* =========================================================================
   Antigravity IDE Community
   Vibe archetype ...... Soft Structuralism (white ground, massive grotesk,
                         diffused ambient shadows, machined nested surfaces)
   Layout archetype .... Editorial Split hero + dense asymmetric bento
   Accent .............. one desaturated electric blue, semantic status hues
   ========================================================================= */

/* ---------- 0. Typefaces (self-hosted, SIL Open Font License) ------------
   Subset to Latin. Weight ranges are declared so 500 and 600 resolve to the
   real bold cut instead of being synthesised.
   Licences: assets/fonts/*-OFL.txt
   ------------------------------------------------------------------------ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-400.woff") format("woff");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-700.woff") format("woff");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-400.woff") format("woff");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-700.woff") format("woff");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-400i.woff") format("woff");
  font-weight: 1 1000; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geistmono-400.woff") format("woff");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geistmono-700.woff") format("woff");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Ground — cool neutrals biased a few degrees toward the accent */
  --paper:        #ffffff;
  --paper-2:      #f7f8fb;
  --paper-3:      #eef1f7;
  --ink:          #0d1017;
  --ink-2:        #454f63;
  --ink-3:        #737e94;

  /* Hairlines and shells — tinted, never flat grey */
  --hair:         color-mix(in srgb, var(--ink) 9%, transparent);
  --hair-2:       color-mix(in srgb, var(--ink) 16%, transparent);
  --shell:        color-mix(in srgb, var(--ink) 3.5%, transparent);
  --inner-hi:     inset 0 1px 0 rgba(255, 255, 255, .9);

  /* One accent. Saturation held under 80%. */
  --accent:       #2f53d6;
  --accent-deep:  #21409f;
  --accent-wash:  color-mix(in srgb, var(--accent) 9%, transparent);
  --on-accent:    #ffffff;

  /* Semantic status — not decoration, only state */
  --ok:           #16795f;
  --ok-wash:      color-mix(in srgb, var(--ok) 11%, transparent);
  --hold:         #9a6314;
  --hold-wash:    color-mix(in srgb, var(--hold) 13%, transparent);

  /* Diffusion shadows — wide, light, tinted to the ground */
  --lift-1:       0 1px 2px rgba(13, 16, 23, .04);
  --lift-2:       0 18px 40px -22px rgba(13, 16, 23, .22);
  --lift-3:       0 44px 90px -46px rgba(13, 16, 23, .34);
  --grain:        .022;

  /* Type */
  --display: "Bricolage Grotesque", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  --body:    "Instrument Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono:    "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Motion — expo / quart only. No bounce, no elastic, no ease-in-out. */
  --exp:  cubic-bezier(.16, 1, .3, 1);
  --qrt:  cubic-bezier(.25, 1, .5, 1);
  --qnt:  cubic-bezier(.22, 1, .36, 1);

  /* Rhythm */
  --maxw:   1240px;
  --gutter: clamp(1.15rem, 4vw, 2.75rem);
  --sect:   clamp(5.5rem, 11vw, 10rem);
  --r-xs:   8px;
  --r-sm:   12px;
  --r-md:   20px;
  --r-lg:   32px;
  --r-xl:   40px;
  --r-pill: 999px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0a0c12;
    --paper-2:    #10131c;
    --paper-3:    #171b26;
    --ink:        #edf0f7;
    --ink-2:      #a6b0c6;
    --ink-3:      #78829a;

    --hair:       color-mix(in srgb, var(--ink) 13%, transparent);
    --hair-2:     color-mix(in srgb, var(--ink) 24%, transparent);
    --shell:      color-mix(in srgb, var(--ink) 5%, transparent);
    --inner-hi:   inset 0 1px 0 rgba(255, 255, 255, .07);

    --accent:     #7f9bff;
    --accent-deep:#a8bcff;
    --accent-wash:color-mix(in srgb, var(--accent) 15%, transparent);
    --on-accent:  #070a12;

    --ok:         #35c8a2;
    --ok-wash:    color-mix(in srgb, var(--ok) 15%, transparent);
    --hold:       #d9a04a;
    --hold-wash:  color-mix(in srgb, var(--hold) 16%, transparent);

    --lift-1:     0 1px 2px rgba(0, 0, 0, .5);
    --lift-2:     0 18px 40px -22px rgba(0, 0, 0, .85);
    --lift-3:     0 44px 90px -46px rgba(0, 0, 0, 1);
    --grain:      .04;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:      #0a0c12;
  --paper-2:    #10131c;
  --paper-3:    #171b26;
  --ink:        #edf0f7;
  --ink-2:      #a6b0c6;
  --ink-3:      #78829a;

  --hair:       color-mix(in srgb, var(--ink) 13%, transparent);
  --hair-2:     color-mix(in srgb, var(--ink) 24%, transparent);
  --shell:      color-mix(in srgb, var(--ink) 5%, transparent);
  --inner-hi:   inset 0 1px 0 rgba(255, 255, 255, .07);

  --accent:     #7f9bff;
  --accent-deep:#a8bcff;
  --accent-wash:color-mix(in srgb, var(--accent) 15%, transparent);
  --on-accent:  #070a12;

  --ok:         #35c8a2;
  --ok-wash:    color-mix(in srgb, var(--ok) 15%, transparent);
  --hold:       #d9a04a;
  --hold-wash:  color-mix(in srgb, var(--hold) 16%, transparent);

  --lift-1:     0 1px 2px rgba(0, 0, 0, .5);
  --lift-2:     0 18px 40px -22px rgba(0, 0, 0, .85);
  --lift-3:     0 44px 90px -46px rgba(0, 0, 0, 1);
  --grain:      .04;

  color-scheme: dark;
}

/* ---------- 2. Base ------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.68;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fixed film grain — never on a scrolling container */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.75rem, 5.4vw, 4.9rem); }
h2 { font-size: clamp(2rem, 3.9vw, 3.15rem); letter-spacing: -.032em; }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.45rem); letter-spacing: -.022em; line-height: 1.18; }
h4 { font-size: 1.02rem; letter-spacing: -.015em; line-height: 1.3; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.2rem; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--paper); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--tight { max-width: 940px; }

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

/* ---------- 3. Text pieces ----------------------------------------------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .78rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  background: var(--shell);
  font-family: var(--mono);
  font-size: .655rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.4rem;
}
.eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 62ch;
  font-weight: 350;
}
.muted { color: var(--ink-3); }
.small { font-size: .875rem; line-height: 1.62; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--mono);
  font-size: .645rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: .3rem .55rem;
  border-radius: var(--r-xs);
  background: var(--accent-wash);
  color: var(--accent-deep);
}
.chip--ok   { background: var(--ok-wash);   color: var(--ok); }
.chip--hold { background: var(--hold-wash); color: var(--hold); }
.chip--mute { background: var(--shell);     color: var(--ink-3); }

/* ---------- 4. Buttons (island + nested trailing icon) ------------------- */

.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--body);
  font-size: .935rem;
  font-weight: 600;
  letter-spacing: -.008em;
  padding: .58rem .72rem .58rem 1.4rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .5s var(--exp), border-color .5s var(--exp),
              color .5s var(--exp), transform .5s var(--exp), box-shadow .6s var(--exp);
}
.btn:active { transform: scale(.978); }
.btn__cap {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  transition: transform .55s var(--exp), background-color .5s var(--exp);
}
.btn__cap svg { width: 15px; height: 15px; }
.btn:hover .btn__cap { transform: translate(3px, -1px) scale(1.06); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--lift-2);
}
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--accent)); color: var(--paper); }

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

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-2);
  padding-right: 1.4rem;
}
.btn--ghost:hover { background: var(--shell); color: var(--ink); border-color: var(--ink-3); }
.btn--ghost .btn__cap { background: var(--shell); color: var(--ink-2); }

.btn--sm { font-size: .855rem; padding: .42rem .5rem .42rem 1.05rem; }
.btn--sm.btn--ghost { padding-right: 1.05rem; }
.btn--sm .btn__cap { width: 25px; height: 25px; flex-basis: 25px; }
.btn--sm .btn__cap svg { width: 13px; height: 13px; }
.btn--plain { padding-inline: 1.4rem; }

.textlink {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .92rem; text-decoration: none;
  color: var(--accent-deep);
}
.textlink svg { width: 15px; height: 15px; transition: transform .5s var(--exp); }
.textlink:hover svg { transform: translateX(4px); }

/* ---------- 5. Disclosure ribbon ----------------------------------------- */

.ribbon {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 74%, var(--ink));
  font-size: .755rem;
  line-height: 1.45;
  letter-spacing: .002em;
  position: relative;
  z-index: 3;
}
.ribbon .wrap {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; min-height: 36px; text-align: center; padding-block: .4rem;
}
.ribbon a { color: color-mix(in srgb, var(--paper) 94%, var(--ink)); }
.ribbon strong { color: var(--paper); font-weight: 600; }

/* ---------- 6. Floating island nav --------------------------------------- */

.navshell {
  position: sticky;
  top: 0;
  z-index: 70;
  padding-block: 1.05rem .25rem;
  pointer-events: none;
}
.navshell > .wrap { display: flex; justify-content: center; pointer-events: none; }

.island {
  pointer-events: auto;
  display: flex; align-items: center; gap: .5rem;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: .42rem .42rem .42rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: var(--lift-2), var(--inner-hi);
  transition: box-shadow .6s var(--exp), border-color .6s var(--exp), padding .6s var(--exp);
}
.navshell.is-stuck .island { box-shadow: var(--lift-3), var(--inner-hi); border-color: var(--hair-2); }

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 700;
  font-size: .97rem; letter-spacing: -.035em;
  padding-right: .5rem;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 26px; height: 26px; flex: 0 0 26px; transition: transform .8s var(--exp); }
.brand:hover .brand__mark { transform: translateY(-3px); }

.nav { display: flex; align-items: center; gap: .1rem; }
.nav__link {
  position: relative;
  padding: .46rem .7rem;
  font-size: .885rem; font-weight: 450;
  color: var(--ink-2); text-decoration: none;
  border-radius: var(--r-pill);
  transition: color .45s var(--exp), background-color .45s var(--exp);
}
.nav__link:hover { color: var(--ink); background: var(--shell); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--shell); }

.iconbtn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .45s var(--exp), border-color .45s var(--exp), background-color .45s var(--exp);
}
.iconbtn:hover { color: var(--ink); border-color: var(--hair-2); background: var(--shell); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 16px; height: 16px; }

.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
:root[data-theme="dark"] .theme-btn .i-sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-sun  { display: none; }
}

/* Hamburger that morphs into an X */
.burger { display: none; position: relative; }
.burger b {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .6s var(--exp), opacity .3s var(--exp);
}
.burger b:nth-child(1) { top: 12px; }
.burger b:nth-child(2) { top: 16.5px; }
.burger b:nth-child(3) { top: 21px; }
.burger[aria-expanded="true"] b:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] b:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.burger[aria-expanded="true"] b:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* Full-screen glass menu */
.sheet {
  position: fixed; inset: 0; z-index: 65;
  display: grid; align-content: center;
  padding: 6rem var(--gutter) 3rem;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(34px) saturate(1.6);
  backdrop-filter: blur(34px) saturate(1.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--exp), visibility .5s var(--exp);
}
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet a {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.9rem, 8vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
  text-decoration: none;
  padding-block: .38rem;
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .7s var(--exp), transform .7s var(--exp), color .3s var(--exp);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.sheet.is-open a { opacity: 1; transform: none; }
.sheet a:hover { color: var(--accent); }
.sheet__foot {
  margin-top: 2.4rem; padding-top: 1.4rem;
  border-top: 1px solid var(--hair);
  font-size: .82rem; color: var(--ink-3);
}

@media (max-width: 1000px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
  /* The download call to action lives inside the sheet menu on small screens,
     so the island never grows wider than the viewport. */
  .island > .btn { display: none; }
}
@media (min-width: 1001px) {
  .sheet { display: none; }
}
@media (max-width: 420px) {
  .brand__word { display: none; }
  .island { padding-left: .6rem; }
}

.sheet a.sheet__cta {
  display: none;
  margin-top: 2.2rem;
  width: fit-content;
  font-family: var(--body);
  font-size: .935rem;
  font-weight: 600;
  letter-spacing: -.008em;
  padding: .58rem .72rem .58rem 1.4rem;
  color: var(--paper);
  opacity: 1;
  transform: none;
}
.sheet a.sheet__cta:hover { color: var(--paper); }
@media (max-width: 1000px) { .sheet a.sheet__cta { display: inline-flex; } }

/* ---------- 7. Ambient ground (neutral, no colour glow) ------------------ */

.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient::before {
  content: "";
  position: absolute; inset: -25% -12% auto -12%; height: 165%;
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--ink) 13%, transparent) .9px, transparent 1.1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 74% 58% at 50% 18%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse 74% 58% at 50% 18%, #000 0%, transparent 74%);
}
.ambient::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, var(--paper) 100%);
}

/* ---------- 8. Hero: editorial split ------------------------------------- */

.hero { position: relative; isolation: isolate; padding-block: clamp(3rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem); }
.hero > .wrap { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
@media (max-width: 1000px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__title { max-width: 15ch; margin-bottom: 1.6rem; }
.hero__title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(34px);
  animation: rise .95s var(--exp) forwards;
}
.hero__title span:nth-child(1) { animation-delay: .05s; }
.hero__title span:nth-child(2) { animation-delay: .13s; }
.hero__title span:nth-child(3) { animation-delay: .21s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero .lede {
  opacity: 0;
  animation: fade .9s .34s var(--exp) forwards;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: .65rem;
  margin-top: 2.1rem;
  opacity: 0;
  animation: fade .9s .46s var(--exp) forwards;
}
.hero__meta {
  margin-top: 1.15rem;
  font-family: var(--mono);
  font-size: .705rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  animation: fade .9s .56s var(--exp) forwards;
}
@keyframes fade { to { opacity: 1; } }

/* ---------- 9. Double-bezel shell ---------------------------------------- */

.bezel {
  padding: 7px;
  border-radius: var(--r-xl);
  border: 1px solid var(--hair);
  background: var(--shell);
  box-shadow: var(--lift-3);
}
.bezel__core {
  border-radius: calc(var(--r-xl) - 7px);
  background: var(--paper);
  box-shadow: var(--inner-hi);
  overflow: hidden;
}

/* Agent console — the hero's one signature animation */
.console { position: relative; transition: transform .9s var(--exp); will-change: transform; }
.console__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--hair);
  background: var(--paper-2);
}
.console__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--hair-2); }
.console__title {
  font-family: var(--mono); font-size: .69rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); margin-left: .5rem;
}
.console__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono); font-size: .63rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ok);
}
.console__live b { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); animation: breathe 2.4s var(--qrt) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.6); } }

.console__body { padding: .35rem .35rem .2rem; }

.agent {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem .85rem;
  border-radius: var(--r-sm);
  transition: background-color .6s var(--exp);
}
.agent + .agent { box-shadow: inset 0 1px 0 var(--hair); }
.agent.is-live { background: var(--paper-2); }
.agent__ico {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--r-xs);
  background: var(--accent-wash); color: var(--accent-deep);
}
.agent__ico svg { width: 15px; height: 15px; }
.agent > span:nth-child(2) { display: block; min-width: 0; }
.agent__name { display: block; font-size: .875rem; font-weight: 600; letter-spacing: -.015em; }
.agent__task {
  display: block;
  font-family: var(--mono); font-size: .69rem; color: var(--ink-3);
  margin-top: .18rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent__state {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .26rem .5rem;
  border-radius: var(--r-xs);
  background: var(--shell); color: var(--ink-3);
  white-space: nowrap;
  transition: background-color .5s var(--exp), color .5s var(--exp);
}
.agent__state[data-state="run"]  { background: var(--accent-wash); color: var(--accent-deep); }
.agent__state[data-state="done"] { background: var(--ok-wash);     color: var(--ok); }
.agent__state[data-state="hold"] { background: var(--hold-wash);   color: var(--hold); }

.agent__track {
  grid-column: 2 / -1;
  height: 2px; margin-top: .55rem;
  border-radius: var(--r-pill);
  background: var(--shell);
  overflow: hidden;
}
.agent__fill {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  transition: width 1.3s var(--exp), background-color .6s var(--exp);
}
.agent.is-done .agent__fill { background: var(--ok); }

.console__proof {
  margin: .3rem .85rem .85rem;
  padding: .85rem .95rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  display: flex; gap: .7rem; align-items: flex-start;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  transition: opacity .8s var(--exp), transform .8s var(--exp), filter .8s var(--exp);
}
.console__proof.is-in { opacity: 1; transform: none; filter: none; }
.console__proof svg { width: 16px; height: 16px; color: var(--ok); flex: 0 0 16px; margin-top: 2px; }
.console__proof p { font-size: .8rem; color: var(--ink-2); }
.console__proof b { color: var(--ink); font-weight: 600; }

.console__foot {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem 1rem;
  border-top: 1px solid var(--hair);
  background: var(--paper-2);
  font-family: var(--mono); font-size: .655rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .console__foot span:nth-child(2) { display: none; }
  .console__foot { font-size: .6rem; }
}

/* ---------- 10. Kinetic marquee ------------------------------------------ */

.strip {
  border-block: 1px solid var(--hair);
  background: var(--paper-2);
  padding-block: 1rem;
  overflow: hidden;
  position: relative;
}
.strip::before, .strip::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 2; pointer-events: none;
}
.strip::before { left: 0;  background: linear-gradient(90deg, var(--paper-2), transparent); }
.strip::after  { right: 0; background: linear-gradient(270deg, var(--paper-2), transparent); }
/* The band is driven frame by frame in JavaScript so its speed can change
   without the jump you get from re-timing a running CSS animation. The CSS
   animation below is the no-JS fallback only. */
.marquee {
  display: flex;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
html:not(.js) .marquee { animation: pan 42s linear infinite; }
html:not(.js) .strip:hover .marquee { animation-play-state: paused; }
@keyframes pan { to { transform: translate3d(-50%, 0, 0); } }
.marquee__i {
  display: inline-flex; align-items: center; gap: .55rem;
  padding-inline: 1.75rem;
  font-family: var(--mono); font-size: .735rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.marquee__i b { width: 3px; height: 3px; border-radius: 50%; background: var(--hair-2); }

/* ---------- 11. Sections + facts rail ------------------------------------ */

.section { padding-block: var(--sect); position: relative; }
.section--tint { background: var(--paper-2); border-block: 1px solid var(--hair); }
.section--tight { padding-block: clamp(3.5rem, 7vw, 5.5rem); }

.shead { max-width: 68ch; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.shead--split {
  max-width: none;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.6rem, 5vw, 4rem); align-items: end;
}
@media (max-width: 900px) { .shead--split { grid-template-columns: 1fr; align-items: start; } }
.shead h2 + .lede { margin-top: 1.15rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { padding: 1.75rem clamp(1rem, 2.5vw, 1.9rem); }
.fact + .fact { border-left: 1px solid var(--hair); }
@media (max-width: 760px) {
  .fact:nth-child(odd) { border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--hair); }
}
.fact__n {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  letter-spacing: -.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fact__l { font-family: var(--mono); font-size: .655rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: .55rem; }
.fact__d { font-size: .85rem; color: var(--ink-2); margin-top: .55rem; max-width: 26ch; }

/* ---------- 12. Bento (dense, no empty cells) ---------------------------- */

.bento {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .bento { grid-template-columns: 1fr; } }

.tile {
  grid-column: span 2;
  position: relative;
  padding: 1.85rem 1.7rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--hair);
  background: var(--paper);
  box-shadow: var(--lift-1);
  overflow: hidden;
  transition: transform .8s var(--exp), box-shadow .8s var(--exp), border-color .8s var(--exp);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--lift-2); border-color: var(--hair-2); }
.tile--w3 { grid-column: span 3; }
.tile--w4 { grid-column: span 4; }
.tile--w6 { grid-column: span 6; }
@media (max-width: 1000px) {
  .tile, .tile--w3, .tile--w4 { grid-column: span 1; }
  .tile--w6 { grid-column: span 2; }
}
@media (max-width: 620px) { .tile--w6 { grid-column: span 1; } }

.tile__ico {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--hair);
  background: var(--shell);
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.tile__ico svg { width: 19px; height: 19px; }
.tile h3 { margin-bottom: .55rem; }
.tile p { color: var(--ink-2); font-size: .93rem; }
.tile__list { margin-top: 1.15rem; display: grid; gap: .5rem; }
.tile__list li {
  list-style: none; position: relative; padding-left: 1.15rem;
  font-size: .865rem; color: var(--ink-2);
}
.tile__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.tile__flag {
  position: absolute; top: 1.3rem; right: 1.3rem;
}

/* Wide tile: split content + inline mock */
.tile--split {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: center;
}
@media (max-width: 860px) { .tile--split { grid-template-columns: 1fr; } }

/* ---------- 13. Horizontal accordion (audiences) ------------------------- */

.slices { display: flex; gap: .7rem; min-height: 320px; }
.slice {
  flex: 1 1 0;
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.6rem 1.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--hair);
  background: var(--paper);
  box-shadow: var(--lift-1);
  cursor: pointer;
  overflow: hidden;
  transition: flex-grow .9s var(--exp), background-color .7s var(--exp), box-shadow .7s var(--exp), border-color .7s var(--exp);
}
.slice:hover, .slice:focus-within, .slice.is-open {
  flex-grow: 3.1;
  background: var(--paper);
  box-shadow: var(--lift-2);
  border-color: var(--hair-2);
}
.slice__head { display: flex; align-items: center; gap: .65rem; margin-bottom: auto; }
.slice__ico {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--hair);
  background: var(--shell);
  color: var(--ink-2);
  transition: color .6s var(--exp), border-color .6s var(--exp), background-color .6s var(--exp);
}
.slice__ico svg { width: 17px; height: 17px; }
.slice:hover .slice__ico, .slice:focus-within .slice__ico, .slice.is-open .slice__ico {
  color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 30%, var(--hair));
  background: var(--accent-wash);
}
.slice__no {
  font-family: var(--mono); font-size: .655rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
}
.slice h3 { margin-bottom: .6rem; }
.slice__body {
  max-width: 44ch;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--exp) .06s, transform .7s var(--exp) .06s;
}
.slice:hover .slice__body, .slice:focus-within .slice__body, .slice.is-open .slice__body { opacity: 1; transform: none; }
.slice__body p { font-size: .92rem; color: var(--ink-2); }
.slice__body ul { margin-top: .95rem; display: grid; gap: .42rem; }
.slice__body li {
  list-style: none; display: flex; gap: .5rem; align-items: flex-start;
  font-size: .855rem; color: var(--ink-2);
}
.slice__body li svg { width: 15px; height: 15px; color: var(--ok); flex: 0 0 15px; margin-top: 3px; }
.slice__btn {
  position: absolute; inset: 0;
  appearance: none; border: 0; background: transparent;
  cursor: pointer; font: inherit; color: transparent;
}
@media (max-width: 900px) {
  .slices { flex-direction: column; min-height: 0; }
  .slice { flex: 0 0 auto; }
  .slice__body { opacity: 1; transform: none; max-width: none; }
}

/* ---------- 14. Divided rail (principles) -------------------------------- */

.rail { border-top: 1px solid var(--hair); }
.rail__row {
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  padding-block: 2.1rem;
  border-bottom: 1px solid var(--hair);
  align-items: start;
  transition: background-color .6s var(--exp), padding-inline .7s var(--exp);
}
.rail__row:hover { background: var(--shell); padding-inline: 1rem; }
@media (max-width: 780px) { .rail__row { grid-template-columns: 1fr; gap: .7rem; } }
.rail__row h3 { letter-spacing: -.028em; }
.rail__row p { color: var(--ink-2); max-width: 64ch; }
.rail__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }

/* ---------- 15. Tabs ----------------------------------------------------- */

.tabs {
  display: inline-flex; gap: .25rem;
  padding: .32rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  background: var(--shell);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; border: 0; background: transparent;
  font-family: var(--body); font-size: .885rem; font-weight: 600;
  color: var(--ink-3); padding: .5rem 1.05rem;
  border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
  transition: background-color .55s var(--exp), color .55s var(--exp), box-shadow .55s var(--exp);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--lift-1); }

.tabpanel[hidden] { display: none; }
.tabpanel {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
  animation: panel .7s var(--exp) both;
}
@media (max-width: 920px) { .tabpanel { grid-template-columns: 1fr; } }
@keyframes panel { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.tabpanel h3 { margin-bottom: .85rem; }
.tabpanel > div > p { color: var(--ink-2); }
.tabpanel ul { margin-top: 1.35rem; display: grid; gap: .6rem; }
.tabpanel li { list-style: none; display: flex; gap: .6rem; align-items: flex-start; font-size: .91rem; color: var(--ink-2); }
.tabpanel li svg { width: 16px; height: 16px; color: var(--ok); flex: 0 0 16px; margin-top: 4px; }

/* Mock frames inside panels */
.frame__bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--hair);
  background: var(--paper-2);
}
.frame__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--hair-2); }
.frame__path { font-family: var(--mono); font-size: .655rem; color: var(--ink-3); margin-left: .5rem; }
.frame__body { padding: 1.1rem 1.2rem; }

.code { font-family: var(--mono); font-size: .735rem; line-height: 1.95; color: var(--ink-2); white-space: pre; overflow-x: auto; display: block; }
.code .k { color: var(--accent-deep); }
.code .s { color: var(--ok); }
.code .c { color: var(--ink-3); }

.checkrow {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-xs);
  font-size: .82rem; color: var(--ink-2);
  background: var(--paper);
}
.checkrow + .checkrow { margin-top: .5rem; }
.checkrow svg { width: 15px; height: 15px; color: var(--ok); flex: 0 0 15px; }
.checkrow .chip { margin-left: auto; }

/* ---------- 16. Comparison ----------------------------------------------- */

.verdicts {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.6rem;
}
@media (max-width: 880px) { .verdicts { grid-template-columns: 1fr; } }
.verdicts__side { display: grid; gap: 1rem; align-content: start; }
.verdict {
  padding: 1.6rem 1.6rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--lift-1);
}
.verdict--lead {
  background: var(--paper);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--hair));
  box-shadow: var(--lift-2);
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.4rem;
}
.verdict h3 { margin-bottom: .5rem; }
.verdict__fmt { font-family: var(--mono); font-size: .715rem; line-height: 1.7; color: var(--ink-3); margin-bottom: .8rem; }
.verdict p { font-size: .91rem; color: var(--ink-2); }

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--lift-1);
  -webkit-overflow-scrolling: touch;
}
table.cmp { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .89rem; }
table.cmp th, table.cmp td { padding: .95rem 1.15rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
table.cmp thead th {
  font-family: var(--mono); font-size: .665rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  background: var(--paper-2); position: sticky; top: 0; z-index: 1;
}
table.cmp tbody tr { transition: background-color .4s var(--exp); }
table.cmp tbody tr:hover { background: var(--shell); }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp td:first-child, table.cmp thead th:first-child { font-weight: 600; color: var(--ink); }
table.cmp .hi { background: var(--accent-wash); }
.yes, .no { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.yes { color: var(--ok); }
.no  { color: var(--ink-3); font-weight: 400; }
.yes svg, .no svg { width: 14px; height: 14px; }

/* ---------- 17. Quotes --------------------------------------------------- */

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.quote {
  padding: 1.7rem 1.6rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--lift-1);
}
.quote blockquote {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.08rem; line-height: 1.42; letter-spacing: -.024em;
  color: var(--ink);
}
.quote figcaption { font-family: var(--mono); font-size: .665rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- 18. FAQ ------------------------------------------------------ */

.faq { border-top: 1px solid var(--hair); }
.faq__item { border-bottom: 1px solid var(--hair); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  text-align: left; appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 1.4rem .2rem;
  font-family: var(--display); font-size: clamp(1rem, 1.5vw, 1.16rem);
  font-weight: 700; letter-spacing: -.025em; color: var(--ink);
  transition: color .45s var(--exp);
}
.faq__q:hover { color: var(--accent-deep); }
.faq__sign { position: relative; flex: 0 0 22px; width: 22px; height: 22px; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; inset: 50% 2px auto 2px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transition: transform .6s var(--exp);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--exp); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { color: var(--ink-2); font-size: .945rem; max-width: 74ch; padding-bottom: 1.45rem; }
.faq__a p + p { padding-top: .85rem; }
.faq__a ul { margin: 0 0 1.45rem; padding-left: 1.15rem; display: grid; gap: .38rem; }
.faq__a li { font-size: .91rem; color: var(--ink-2); }

/* ---------- 19. CTA ------------------------------------------------------ */

.cta { background: var(--ink); color: color-mix(in srgb, var(--paper) 78%, var(--ink)); position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.09) .9px, transparent 1.1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000, transparent 72%);
}
.cta > .wrap { position: relative; z-index: 1; }
.cta__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.8rem, 5vw, 4.5rem); align-items: center;
}
@media (max-width: 900px) { .cta__grid { grid-template-columns: 1fr; } }
.cta h2 { color: var(--paper); max-width: 16ch; }
.cta p { color: color-mix(in srgb, var(--paper) 70%, var(--ink)); }
.cta .eyebrow { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: color-mix(in srgb, var(--paper) 66%, var(--ink)); }
.cta__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2rem; }
.cta .btn--primary { background: var(--paper); color: var(--ink); box-shadow: none; }
.cta .btn--primary:hover { background: var(--paper); color: var(--ink); }
.cta .btn--primary .btn__cap { background: rgba(13,16,23,.08); }
.cta .btn--ghost { color: var(--paper); border-color: rgba(255,255,255,.22); }
.cta .btn--ghost:hover { background: rgba(255,255,255,.08); color: var(--paper); border-color: rgba(255,255,255,.42); }
.cta__points { display: grid; gap: .8rem; }
.cta__points li {
  list-style: none; display: flex; gap: .7rem; align-items: flex-start;
  font-size: .9rem; color: color-mix(in srgb, var(--paper) 76%, var(--ink));
  padding-bottom: .8rem; border-bottom: 1px solid rgba(255,255,255,.1);
}
.cta__points li:last-child { border-bottom: 0; padding-bottom: 0; }
.cta__points svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: color-mix(in srgb, var(--paper) 60%, var(--ink)); }
.cta__fine { margin-top: 1.5rem; font-size: .78rem; color: color-mix(in srgb, var(--paper) 52%, var(--ink)); max-width: 62ch; }
.cta__fine a { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }

/* ---------- 20. Footer --------------------------------------------------- */

.footer { background: var(--paper-2); border-top: 1px solid var(--hair); padding-block: clamp(3.2rem, 6vw, 5rem) 2rem; }
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 4vw, 3.2rem);
}
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h2, .footer h3 {
  font-family: var(--mono); font-size: .655rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.05rem;
}
.footer ul { display: grid; gap: .55rem; }
.footer li { list-style: none; }
.footer a { font-size: .895rem; color: var(--ink-2); text-decoration: none; transition: color .4s var(--exp); }
.footer a:hover { color: var(--accent-deep); }
.footer__about p { font-size: .875rem; color: var(--ink-2); max-width: 42ch; margin-top: 1rem; }
.footer__bottom {
  margin-top: clamp(2.4rem, 5vw, 3.4rem); padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; gap: .8rem 1.6rem;
  align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--ink-3);
}

/* ---------- 21. Document pages ------------------------------------------- */

.phead { position: relative; isolation: isolate; padding-block: clamp(2.6rem, 6vw, 4.6rem) clamp(2rem, 4vw, 3.2rem); border-bottom: 1px solid var(--hair); }
.phead > .wrap { position: relative; z-index: 1; }
.phead h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin-bottom: 1.1rem; max-width: 18ch; }

.crumbs {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
  font-family: var(--mono); font-size: .655rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.4rem;
}
.crumbs li { list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: .45rem; color: var(--hair-2); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); }

.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  padding-block: var(--sect);
}
@media (max-width: 940px) { .doc { grid-template-columns: 1fr; padding-block: clamp(3rem, 7vw, 4.5rem); } .toc { display: none; } }

.toc { position: sticky; top: 7.5rem; border-left: 1px solid var(--hair); padding-left: 1.25rem; }
.toc h2 { font-family: var(--mono); font-size: .645rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .95rem; }
.toc ul { display: grid; gap: .5rem; }
.toc li { list-style: none; }
.toc a { font-size: .835rem; color: var(--ink-2); text-decoration: none; display: block; line-height: 1.42; transition: color .4s var(--exp), transform .5s var(--exp); }
.toc a:hover { color: var(--accent-deep); transform: translateX(3px); }
.toc a.is-current { color: var(--accent-deep); font-weight: 600; }

.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: clamp(1.5rem, 2.5vw, 1.95rem); margin-top: 3.2rem; padding-top: 1.8rem; border-top: 1px solid var(--hair); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.prose li::marker { color: var(--hair-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: .855em; background: var(--shell); padding: .13em .4em; border-radius: var(--r-xs); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin-block: 2.4rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.prose th, .prose td { padding: .72rem .85rem; border-bottom: 1px solid var(--hair); text-align: left; }
.prose th { font-family: var(--mono); font-size: .665rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.prose a { font-weight: 500; }

.note {
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--hair);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--paper-2);
  font-size: .925rem;
}
.note strong { display: block; margin-bottom: .3rem; }
.note--warn { border-left-color: var(--hold); }
.note--ok   { border-left-color: var(--ok); }

.stamp { font-family: var(--mono); font-size: .69rem; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- 22. Guide index ---------------------------------------------- */

.guides { border-top: 1px solid var(--hair); }
.guide {
  display: grid; grid-template-columns: 126px minmax(0, 1fr) 24px;
  gap: clamp(.8rem, 3vw, 2.2rem); align-items: center;
  padding: 1.6rem .4rem;
  border-bottom: 1px solid var(--hair);
  text-decoration: none; color: inherit;
  transition: padding-inline .7s var(--exp), background-color .5s var(--exp);
}
.guide:hover { background: var(--shell); padding-inline: 1.1rem .4rem; color: inherit; }
.guide__cat { font-family: var(--mono); font-size: .655rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.guide__t { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.028em; }
.guide__d { font-size: .87rem; color: var(--ink-2); margin-top: .3rem; }
.guide__go { color: var(--ink-3); transition: transform .6s var(--exp), color .4s var(--exp); }
.guide:hover .guide__go { transform: translateX(5px); color: var(--accent-deep); }
.guide__go svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .guide { grid-template-columns: 1fr 24px; }
  .guide__cat { grid-column: 1 / -1; margin-bottom: .35rem; }
}

/* ---------- 23. Contact -------------------------------------------------- */

.contact {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.8rem, 4vw, 3.4rem); align-items: start;
}
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }

.field { display: grid; gap: .42rem; margin-bottom: 1.05rem; }
.field label { font-family: var(--mono); font-size: .655rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: .94rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--hair);
  border-radius: var(--r-sm); padding: .75rem .9rem; width: 100%;
  transition: border-color .45s var(--exp), box-shadow .45s var(--exp);
}
.field textarea { min-height: 152px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field__hint { font-size: .78rem; color: var(--ink-3); }
.formnote { font-size: .85rem; color: var(--ok); margin-top: .8rem; }

.block {
  padding: 1.5rem 1.55rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--paper-2);
}
.block + .block { margin-top: 1rem; }
.block h3 { font-size: 1.05rem; margin-bottom: .45rem; }
.block p { font-size: .9rem; color: var(--ink-2); }
.block a { font-weight: 600; }

/* ---------- 24. 404 ------------------------------------------------------ */

.nf { min-height: 58vh; display: grid; align-content: center; gap: 1.3rem; padding-block: 5rem; position: relative; isolation: isolate; }
.nf__code {
  font-family: var(--display); font-size: clamp(5rem, 17vw, 10.5rem);
  font-weight: 700; line-height: .82; letter-spacing: -.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.nf__links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }


/* =========================================================================
   MOTION LAYER
   One orchestrated system: word-mask headings, scroll-scrubbed copy, pointer
   spotlights, magnetic controls, a stacking deck, a sliding tab indicator and
   cross-document view transitions. Everything below is transform / opacity /
   clip-path or a custom-property-driven gradient. All of it is switched off
   under prefers-reduced-motion (section 26).
   ========================================================================= */

/* ---- Word-mask heading reveal ------------------------------------------ */

.js [data-split] { opacity: 0; }
.js [data-split].is-split { opacity: 1; }
.js [data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}
.js [data-split] .w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(112%);
  transition: transform 1.05s var(--exp);
  transition-delay: calc(var(--w, 0) * 42ms);
}
.js [data-split].is-in .w > i { transform: none; }

/* ---- Scroll-scrubbed body copy ----------------------------------------- */

.js [data-scrub] .sw {
  display: inline-block;
  opacity: .16;
  transition: opacity .18s linear;
}

/* ---- Pointer spotlight -------------------------------------------------- */

.spot { position: relative; isolation: isolate; }
.spot > * { position: relative; z-index: 1; }
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .55s var(--exp);
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--accent) 13%, transparent), transparent 68%);
}
.spot:hover::after, .spot:focus-within::after { opacity: 1; }
.spot--light::after {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, .10), transparent 68%);
  opacity: 1;
}

/* ---- Magnetic controls -------------------------------------------------- */

.btn { transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0); }
.btn:active { transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(.975); }
.btn.is-pull { will-change: transform; }
.iconbtn { transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0); }

/* ---- Scroll progress ---------------------------------------------------- */

.progress {
  position: fixed; inset: 0 0 auto 0;
  height: 2px; z-index: 95; pointer-events: none;
}
.progress b {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--ok)));
  will-change: transform;
}

/* ---- Nav island condense ------------------------------------------------ */

.navshell.is-stuck .island { padding-block: .3rem; gap: .38rem; }
.navshell.is-stuck .brand__mark { transform: scale(.92); }

/* ---- Stacking deck (design principles) ---------------------------------- */

.deck { display: grid; gap: 0; padding-bottom: 12vh; }
.deck__item { position: sticky; top: calc(7.5rem + var(--i, 0) * 14px); }
.deck__item + .deck__item { margin-top: clamp(1.6rem, 4vw, 3rem); }
.deck__card {
  display: grid;
  grid-template-columns: minmax(0, .46fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.6rem, 3vw, 2.3rem) clamp(1.5rem, 3vw, 2.2rem);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--lift-2);
  transform: scale(calc(1 - var(--i, 0) * .014));
  transform-origin: 50% 0;
  transition: box-shadow .7s var(--exp), border-color .7s var(--exp);
}
.deck__item:hover .deck__card { box-shadow: var(--lift-3); border-color: var(--hair-2); }
@media (max-width: 780px) {
  .deck__card { grid-template-columns: 1fr; gap: .7rem; }
  .deck__item { position: static; }
  .deck__card { transform: none; }
}
.deck__card h3 { letter-spacing: -.028em; }
.deck__card p { color: var(--ink-2); max-width: 60ch; }
.deck__n {
  font-family: var(--mono); font-size: .655rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: .5rem;
}

/* ---- Sliding tab indicator ---------------------------------------------- */

.tabs { position: relative; }
.tabs__ind {
  position: absolute;
  top: .32rem; bottom: .32rem; left: 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--lift-1);
  transform: translateX(0);
  transition: transform .6s var(--exp), width .6s var(--exp);
  z-index: 0;
  pointer-events: none;
}
.tab { position: relative; z-index: 1; }
.js .tab[aria-selected="true"] { background: transparent; box-shadow: none; }

/* ---- Ambient pointer parallax ------------------------------------------- */

.ambient::before {
  translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 10px);
  transition: translate 1.4s var(--exp);
}

/* ---- Guide row accent rail ---------------------------------------------- */

.guide { position: relative; }
.guide::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .6s var(--exp);
}
.guide:hover::before { transform: scaleY(1); transform-origin: 50% 0; }

/* ---- Typewriter caret --------------------------------------------------- */

.agent__task .caret {
  display: inline-block;
  width: .5ch;
  background: currentColor;
  animation: blink 1s steps(2, start) infinite;
  vertical-align: -1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---- Cross-document view transitions ------------------------------------ */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .26s var(--qrt) both; }
::view-transition-new(root) { animation: vt-in .48s var(--exp) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(12px); } }

/* ---------- 25. Reveal --------------------------------------------------- */

/* Content is only hidden when JavaScript is present to reveal it again.
   Without JS the `js` class is never added and everything renders normally. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(7px);
  transition: opacity .85s var(--exp), transform .85s var(--exp), filter .85s var(--exp);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

.totop {
  position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 55;
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity .6s var(--exp), transform .6s var(--exp);
  background: var(--paper); box-shadow: var(--lift-2);
}
.totop.is-in { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 26. Reduced motion ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .js [data-split] { opacity: 1; }
  .js [data-split] .w > i { transform: none; }
  .js [data-scrub] .sw { opacity: 1; }
  .spot::after { display: none; }
  .btn, .iconbtn { transform: none; }
  .deck__item { position: static; }
  .deck__card { transform: none; }
  .progress { display: none; }
  .ambient::before { translate: none; }
  .agent__task .caret { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .hero__title span, .hero .lede, .hero__actions, .hero__meta { opacity: 1; transform: none; }
  .console__proof { opacity: 1; transform: none; filter: none; }
  .slice__body { opacity: 1; transform: none; }
}

/* ---------- 27. Print ---------------------------------------------------- */

@media print {
  .navshell, .ribbon, .totop, .cta, .ambient, .strip, .sheet, .progress { display: none !important; }
  body { color: #000; background: #fff; }
  body::after { display: none; }
  .doc { grid-template-columns: 1fr; }
}
