/* ==========================================================================
   Reservoice site — shared styles
   Fonts are self-hosted (fonts/*.woff2, OFL, subset to Latin + Latin Extended;
   build.py rewrites the url()s to content-hashed names). Fallbacks are
   size-adjusted so the swap does not shift the layout.
   ========================================================================== */
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.0e0ddb6934.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.f9a5c5ef1f.woff2") format("woff2"); font-weight: 500 700; font-stretch: 75% 85%; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 99%; ascent-override: 98%; descent-override: 30%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Narrow"), local("Helvetica Neue Condensed Bold"), local("Arial"); size-adjust: 88%; ascent-override: 100%; descent-override: 28%; line-gap-override: 0%; }

:root {
  color-scheme: light dark;

  /* brand palette (fixed) */
  --c-navy: #0b1b33;
  --c-navy-2: #123a6e;
  --c-blue: #1f509a;
  --c-mist: #e8eff9;
  --c-amber: #f2b45c;
  --c-amber-hover: #f6c47a;
  --c-paper: #f6f4ef;
  --c-paper-2: #ece8df;
  --c-white: #ffffff;
  --c-deep: #07111f;

  /* tone surfaces (light scheme) */
  --t-paper-bg: var(--c-paper);
  --t-white-bg: var(--c-white);
  --t-mist-bg: var(--c-mist);
  --t-light-fg: var(--c-navy);
  --t-light-fg-2: #3f4e64;
  --t-light-line: #d6cfc2;
  --t-light-raised: var(--c-white);
  --t-light-sunk: var(--c-paper-2);
  --t-navy-bg: var(--c-navy);
  --t-deep-bg: var(--c-deep);
  --t-dark-fg: #eef3fa;
  --t-dark-fg-2: #aebdd3;
  --t-dark-line: #24406a;
  --t-dark-raised: #13294a;
  --t-dark-sunk: #081426;

  --accent: var(--c-amber);
  --on-accent: var(--c-navy);

  /* type */
  --f-display: "Bricolage Grotesque", "Bricolage Fallback", "Arial Narrow", sans-serif;
  --f-body: "DM Sans", "DM Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --d1: clamp(3.1rem, 1rem + 8.6vw, 9.25rem);
  --d2: clamp(2.5rem, 1.1rem + 5.4vw, 6rem);
  --d3: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem);
  --d4: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem);
  --t-lede: clamp(1.15rem, 1.05rem + .45vw, 1.4rem);
  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-xs: .8125rem;

  /* space */
  --gutter: 16px;
  --max: 84rem;
  --measure: 36rem;
  --sec: clamp(4.5rem, 3rem + 6vw, 9rem);
  --r-s: 8px;
  --r-m: 18px;
  --r-l: 28px;
  --header-h: 68px;
}
@media (min-width: 760px) { :root { --gutter: 40px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --t-paper-bg: #0f1c31;
    --t-white-bg: #132440;
    --t-mist-bg: #172b4b;
    --t-light-fg: #eef3fa;
    --t-light-fg-2: #b7c5d9;
    --t-light-line: #2b4670;
    --t-light-raised: #1a3052;
    --t-light-sunk: #0b1729;
    --t-navy-bg: #081426;
    --t-deep-bg: #040b16;
    --t-dark-raised: #10233f;
  }
}

/* tones -------------------------------------------------------------------- */
.tone-paper, .tone-white, .tone-mist {
  --bg: var(--t-paper-bg); --fg: var(--t-light-fg); --fg-2: var(--t-light-fg-2);
  --line: var(--t-light-line); --raised: var(--t-light-raised); --sunk: var(--t-light-sunk);
  --focus: var(--c-blue); --link: var(--c-blue); --ph: #7a4a00;
}
.tone-white { --bg: var(--t-white-bg); }
.tone-mist { --bg: var(--t-mist-bg); }
.tone-navy, .tone-deep {
  --bg: var(--t-navy-bg); --fg: var(--t-dark-fg); --fg-2: var(--t-dark-fg-2);
  --line: var(--t-dark-line); --raised: var(--t-dark-raised); --sunk: var(--t-dark-sunk);
  --focus: var(--c-amber); --link: #bcd3f5;
}
.tone-deep { --bg: var(--t-deep-bg); }
@media (prefers-color-scheme: dark) {
  .tone-paper, .tone-white, .tone-mist { --focus: var(--c-amber); --link: #bcd3f5; --ph: var(--c-amber); }
}
[class*="tone-"] { background: var(--bg); color: var(--fg); }

/* base --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 var(--t-body)/1.6 var(--f-body);
  background: var(--t-paper-bg);
  color: var(--t-light-fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 75, "opsz" 96; letter-spacing: -0.005em; line-height: .95; }
:focus-visible { outline: 3px solid var(--focus, var(--c-blue)); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -5rem; z-index: 100; background: var(--c-amber); color: var(--c-navy); padding: .7rem 1rem; border-radius: var(--r-s); font-weight: 600; }
.skip:focus { top: .75rem; }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--fg-2); max-width: var(--measure); }
.muted { color: var(--fg-2); }
.small { font-size: var(--t-small); }
.xs { font-size: var(--t-xs); }

/* buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.4rem; border-radius: 999px; border: 0;
  font: 600 var(--t-body)/1 var(--f-body); text-decoration: none; cursor: pointer;
}
.btn-amber { background: var(--c-amber); color: var(--c-navy); }
.btn-amber:hover { background: var(--c-amber-hover); }
.btn-line { color: var(--fg); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-line:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.tlink { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; }
.tlink:hover { text-decoration-thickness: 3px; }

/* header ------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; height: var(--header-h); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 600 1.2rem/1 var(--f-body); letter-spacing: -0.01em; min-height: 44px; }
.brand svg { width: 26px; height: 26px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav ul { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem; text-decoration: none; color: var(--fg-2); font-weight: 500; border-radius: var(--r-s); }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--c-amber); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav .lang { color: var(--fg-2); font-size: var(--t-small); padding: 0 .7rem; }
.nav .btn { margin-left: .6rem; min-height: 44px; padding-block: .6rem; }
.menu { display: none; margin-left: auto; }
.menu > summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; padding: 0 1.1rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.5rem; display: grid; max-height: calc(100svh - var(--header-h)); overflow: auto; }
.menu-panel a { min-height: 48px; display: flex; align-items: center; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.menu-panel .btn { margin-top: 1rem; border: 0; }
@media (max-width: 1040px) { .nav { display: none; } .menu { display: block; } }
.is-motion .site-header { transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.is-motion .site-header.is-hidden { transform: translateY(-100%); }

/* launchers (call + chat, bottom-right, 64px like the production widget) --- */
.launchers { position: fixed; right: 20px; bottom: 24px; z-index: 50; display: flex; flex-direction: column; gap: 12px; }
.launchers a { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(4, 11, 22, .35); text-decoration: none; transition: transform .18s ease; }
.launchers a:hover { transform: scale(1.06); }
.launchers a:focus-visible { outline: 3px solid var(--c-amber); outline-offset: 3px; }
.launchers .l-chat { background: var(--c-navy); color: #fff; box-shadow: 0 6px 18px rgba(4,11,22,.35), inset 0 0 0 2px #2c4f80; }
.launchers .l-call { background: var(--c-amber); color: var(--c-navy); }
.launchers .l-chat:focus-visible { outline-color: var(--c-blue); }
.launchers svg { width: 26px; height: 26px; }
@media (max-width: 520px) { .launchers { right: 12px; bottom: 16px; } }

/* loader (CSS only, once per session, never under reduced motion) --------- */
.loader { display: none; }
.show-loader .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 90;
  background: var(--c-navy); color: #eef3fa;
  animation: loader-wipe .55s cubic-bezier(.76,0,.24,1) .95s forwards;
}
.loader svg { width: 96px; height: 96px; overflow: visible; }
.loader circle { fill: #eef3fa; animation: loader-in .6s cubic-bezier(.16,1,.3,1) both; }
.loader circle:nth-child(1) { --dx: 0; --dy: -60px; animation-delay: .05s; }
.loader circle:nth-child(2) { --dx: -60px; --dy: 0; animation-delay: .11s; }
.loader circle:nth-child(3) { --dx: 60px; --dy: 0; animation-delay: .17s; }
.loader circle:nth-child(4) { --dx: 0; --dy: 60px; animation-delay: .23s; fill: var(--c-amber); }
@keyframes loader-in { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes loader-wipe { to { transform: translateY(-100%); visibility: hidden; } }

/* generic sections ---------------------------------------------------------- */
.sec { padding-block: var(--sec); }
.sec-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 980px) { .sec-head { grid-template-columns: 7fr 5fr; align-items: end; gap: 4rem; } }
.sec-head h2 { font-size: var(--d2); max-width: 14ch; }
.two-tone .dim { color: var(--fg-2); }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; background: var(--sunk); color: var(--fg); }
.chip-demo { background: var(--c-amber); color: var(--c-navy); }
.chip-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-amber); }

/* hero (home) --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; margin-top: calc(-1 * var(--header-h)); } /* runs under the (navy) header so a returning header never covers the pinned headline */
.hero-inner { display: grid; gap: 2.5rem; padding-block: calc(var(--header-h) + clamp(2rem, 1.5rem + 4vw, 6rem)) clamp(4rem, 3rem + 4vw, 7rem); align-items: center; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 3rem; } }
.hero h1 { font-size: var(--d1); line-height: .9; letter-spacing: -0.01em; }
.hero .lede { margin-top: 1.75rem; color: var(--fg-2); }
.hero .actions { margin-top: 2.25rem; }
.hero-mark { position: relative; width: min(100%, 30rem); aspect-ratio: 1; margin-inline: auto; }
.hero-mark svg { width: 100%; height: 100%; overflow: visible; }
.hero-mark circle { fill: #eef3fa; }
.hero-mark .c-web { fill: var(--c-amber); }
/* Labels live outside the mark's box; the circles never leave it (see site.js hero). */
.mark-label { position: absolute; width: 7rem; font-weight: 600; font-size: var(--t-small); line-height: 1.3; color: var(--fg); }
.mark-label span { display: block; font-weight: 400; color: var(--fg-2); font-size: var(--t-xs); }
.ml-phone { left: 50%; top: -.75rem; transform: translate(-50%, -100%); text-align: center; width: 10rem; }
.ml-wa { left: -.75rem; top: 50%; transform: translate(-100%, -50%); text-align: right; }
.ml-ig { right: -.75rem; top: 50%; transform: translate(100%, -50%); }
.ml-web { left: 50%; bottom: -.75rem; transform: translate(-50%, 100%); text-align: center; width: 10rem; }
.hero-mark-wrap { padding: 4.5rem 8rem; }
@media (max-width: 560px) {
  .hero-mark-wrap { padding: 2.5rem 4.6rem; }
  .mark-label { width: 4.1rem; font-size: var(--t-xs); }
  .mark-label span { display: none; }
  .ml-wa { left: -.4rem; } .ml-ig { right: -.4rem; }
}
.hero-cover { display: none; }
.is-motion .hero-cover { display: block; position: absolute; inset: 0; background: var(--t-paper-bg); transform: translateY(100%); z-index: 3; pointer-events: none; }

/* journey (home) ------------------------------------------------------------ */
.journey-intro { padding-top: var(--sec); }
.journey-intro h2 { font-size: var(--d2); max-width: 13ch; }
.journey-intro .lede { margin-top: 1.5rem; }
.journey { padding-block: 3rem var(--sec); }
.journey-grid { display: grid; gap: 2rem; }
@media (min-width: 980px) { .journey-grid { grid-template-columns: 22rem 1fr; gap: 4rem; } }
.jmap { display: none; }
@media (min-width: 980px) { .jmap { display: block; } }
.jmap svg { width: 11rem; height: 11rem; overflow: visible; }
.jmap circle { fill: var(--line); transition: fill .25s ease; }
.jmap[data-step="0"] .c-phone, .jmap[data-step="1"] .c-wa, .jmap[data-step="2"] .c-ig, .jmap[data-step="3"] .c-web { fill: var(--c-amber); }
.jmap ol { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .6rem; }
.jmap li { display: flex; gap: .75rem; align-items: baseline; color: var(--fg-2); font-weight: 500; }
.jmap li b { font-family: var(--f-display); font-variation-settings: "wdth" 75; font-size: 1.25rem; width: 1.5rem; }
.jmap[data-step="0"] li:nth-child(1), .jmap[data-step="1"] li:nth-child(2), .jmap[data-step="2"] li:nth-child(3), .jmap[data-step="3"] li:nth-child(4) { color: var(--fg); }
.stage { display: grid; gap: 4rem; }
.scene { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); }
.scene-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.scene-head h3 { font-size: var(--d3); }
.scene-head .chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.thread { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.msg { display: grid; gap: .25rem; max-width: 44rem; }
.msg .who { font-size: var(--t-xs); font-weight: 600; color: var(--fg-2); }
.msg p { font-size: 1.125rem; line-height: 1.5; }
.msg.agent p { font-family: var(--f-display); font-variation-settings: "wdth" 85, "opsz" 96; font-weight: 500; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.28; letter-spacing: -0.01em; }
.msg.guest { justify-self: end; text-align: right; }
.msg.guest p { background: var(--c-navy); color: #fff; padding: .7rem 1rem; border-radius: 18px 18px 6px 18px; display: inline-block; text-align: left; }
@media (prefers-color-scheme: dark) { .msg.guest p { background: var(--c-mist); color: var(--c-navy); } }
.msg.event p { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--t-small); color: var(--fg-2); }
.key { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 .3rem; border-radius: 7px; background: var(--c-amber); color: var(--c-navy); font-weight: 700; font-size: .9rem; }
.scene-note { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--fg-2); max-width: 46rem; }
.is-motion .journey-pin { height: 100svh; display: flex; align-items: center; padding-top: var(--header-h); }
.is-motion .journey { padding-block: 0; }
.is-motion .stage { position: relative; display: block; height: min(64svh, 38rem); }
.is-motion .scene { position: absolute; inset: 0; overflow: hidden; }
.is-motion .scene + .scene { visibility: hidden; }

/* read-back (home) ---------------------------------------------------------- */
.readback-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .readback-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.readback-grid h2 { font-size: var(--d2); max-width: 11ch; }
.readback-grid .lede { margin-top: 1.5rem; }
.rb-card { background: var(--raised); border-radius: var(--r-l); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); border: 1px solid var(--line); }
.rb-card .msg.agent p { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
.rb-fields { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 1.5rem; }
@media (min-width: 640px) { .rb-fields { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.rb-fields li { padding: .8rem 0; border-top: 1px solid var(--line); display: grid; gap: .1rem; }
.rb-fields .k { font-size: var(--t-xs); color: var(--fg-2); font-weight: 600; }
.rb-fields .v { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.rb-fields .v::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--c-amber); flex: none; box-shadow: inset 0 0 0 4px var(--raised); outline: 1.5px solid var(--c-amber); }
.redact { display: inline-block; width: 6.5rem; height: .85rem; border-radius: 3px; background: var(--fg); opacity: .85; vertical-align: middle; }
.stamp { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.25rem; padding: .7rem 1.1rem; border-radius: 999px; background: var(--c-navy); color: #fff; font-weight: 600; font-size: var(--t-small); }
.stamp::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-amber); }
@media (prefers-color-scheme: dark) { .stamp { background: var(--c-mist); color: var(--c-navy); } }

/* desk / staff panel --------------------------------------------------------- */
.desk-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .desk-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.desk-grid h2 { font-size: var(--d2); max-width: 11ch; }
.desk-grid .lede { margin-top: 1.5rem; }
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.panel-top { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.panel-top nav { display: flex; gap: 1rem; color: var(--fg-2); }
.panel-top nav b { color: var(--fg); font-weight: 600; }
.state { display: flex; gap: .6rem; align-items: center; margin: 0; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); font-size: var(--t-small); font-weight: 600; }
.state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c-amber); flex: none; }
.state-off { display: none; background: rgba(242, 180, 92, .14); }
.desk[data-paused="true"] .state-on { display: none; }
.desk[data-paused="true"] .state-off { display: flex; }
.log { list-style: none; margin: 0; padding: 1rem 1.1rem; display: grid; gap: .6rem; font-size: var(--t-small); }
.log li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .8rem; line-height: 1.45; }
.log .r { color: var(--fg-2); }
.log .ev { display: block; grid-column: 1 / -1; padding: .6rem .8rem; border: 1.5px dashed var(--c-amber); border-radius: 10px; }
.panel-foot { display: flex; gap: .6rem; padding: .9rem 1.1rem 1.1rem; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.panel-foot .fake-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 1rem; border-radius: 8px; background: var(--c-amber); color: var(--c-navy); font-weight: 600; font-size: var(--t-small); }
.gloss { margin-top: 1rem; font-size: var(--t-small); color: var(--fg-2); }

/* languages ------------------------------------------------------------------ */
.langs h2 { font-size: var(--d3); max-width: 20ch; }
.lang-stack { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.lang-stack li { font-family: var(--f-display); font-variation-settings: "wdth" 75, "opsz" 96; font-weight: 700; font-size: var(--d2); line-height: 1; letter-spacing: -0.005em; }
.lang-stack li span { display: block; font-family: var(--f-body); font-weight: 500; font-size: var(--t-small); letter-spacing: 0; color: var(--fg-2); margin-top: .5rem; }
.is-motion .lang-stack { position: relative; height: clamp(9rem, 6rem + 10vw, 15rem); }
.is-motion .lang-stack li { position: absolute; inset: 0; }
.is-motion .lang-stack li + li { opacity: 0; }

/* proof as type -------------------------------------------------------------- */
.proof-list { list-style: none; margin: 0; padding: 0; }
.proof-list li { display: grid; gap: .5rem 3rem; padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem); border-top: 1px solid var(--line); }
.proof-list li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .proof-list li { grid-template-columns: 8fr 4fr; align-items: end; } }
.proof-list strong { font-family: var(--f-display); font-variation-settings: "wdth" 75, "opsz" 96; font-size: var(--d2); line-height: .95; letter-spacing: -0.01em; font-weight: 700; }
.proof-list span { color: var(--fg-2); max-width: 26rem; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem 2.75rem; margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.logos p { flex: 1 0 100%; font-size: var(--t-small); color: var(--fg-2); }
.logos img { height: 44px; width: auto; filter: grayscale(1); mix-blend-mode: multiply; opacity: .85; }
@media (prefers-color-scheme: dark) { .logos img { mix-blend-mode: normal; filter: grayscale(1) invert(1) brightness(1.4); opacity: .8; } }

/* depth table ----------------------------------------------------------------- */
.depth { list-style: none; margin: 0; padding: 0; }
.depth li { display: grid; gap: .3rem 2rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .depth li { grid-template-columns: 14rem 1fr 18rem; align-items: center; } }
.depth li:last-child { border-bottom: 1px solid var(--line); }
.depth h3 { font-size: var(--d4); }
.meter { display: flex; gap: 6px; }
.meter i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); transform-origin: left; }
.meter i.on { background: var(--c-amber); }
.meter-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: var(--t-xs); color: var(--fg-2); margin-top: .35rem; }

/* try-it rows ------------------------------------------------------------------ */
.try-list { list-style: none; margin: 0; padding: 0; }
.try-list li { border-top: 1px solid var(--line); }
.try-list li:last-child { border-bottom: 1px solid var(--line); }
.try-list a { display: grid; gap: .4rem 2rem; padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem) 0; text-decoration: none; }
@media (min-width: 860px) { .try-list a { grid-template-columns: 1fr 22rem; align-items: center; } }
.try-list .t { font-family: var(--f-display); font-variation-settings: "wdth" 75, "opsz" 96; font-weight: 700; font-size: var(--d3); line-height: 1; letter-spacing: -0.02em; }
.try-list a:hover .t { text-decoration: underline; text-decoration-color: var(--c-amber); text-decoration-thickness: 4px; text-underline-offset: 8px; }
.try-list .d { color: var(--fg-2); }

/* footer --------------------------------------------------------------------- */
.site-footer { padding-block: var(--sec) 2.5rem; }
.story { display: grid; gap: 2.5rem; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); border-bottom: 1px solid var(--line); }
@media (min-width: 980px) { .story { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.story h2 { font-size: var(--d2); max-width: 11ch; }
.story p { font-size: var(--t-lede); line-height: 1.55; color: var(--fg-2); max-width: 38rem; }
.story p + p { margin-top: 1.25rem; }
.story .mission { color: var(--fg); }
.faq { display: grid; gap: 2rem; padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-bottom: 1px solid var(--line); }
@media (min-width: 980px) { .faq { grid-template-columns: 1fr 1.6fr; gap: 5rem; } }
.faq h2 { font-size: var(--d3); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; min-height: 56px; padding: 1.1rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-weight: 600; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; font-weight: 400; color: var(--fg-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.4rem; color: var(--fg-2); max-width: 60ch; }
.foot-cols { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
@media (min-width: 980px) { .foot-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-contact { grid-column: 1 / -1; }
@media (min-width: 980px) { .foot-contact { grid-column: auto; } }
.foot-contact h2, .foot-cols h2 { font: 600 var(--t-small)/1.3 var(--f-body); letter-spacing: 0; color: var(--fg); margin-bottom: .9rem; }
.foot-contact p { color: var(--fg-2); }
.foot-contact .big { font-family: var(--f-display); font-variation-settings: "wdth" 75; font-weight: 700; font-size: var(--d4); color: var(--fg); margin-bottom: .75rem; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li a { display: inline-flex; align-items: center; min-height: 36px; color: var(--fg-2); text-decoration: none; }
.foot-cols li a:hover { color: var(--fg); text-decoration: underline; }
.legal-line { display: grid; gap: .35rem; padding-top: 1.75rem; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--fg-2); }
.ph { color: var(--ph, var(--c-amber)); text-decoration: underline dotted; text-underline-offset: .2em; }

/* inner pages ---------------------------------------------------------------- */
.page-hero { padding-block: clamp(3.5rem, 2.5rem + 4vw, 7rem) clamp(3rem, 2rem + 3vw, 5rem); }
.page-hero h1 { font-size: var(--d2); max-width: 15ch; line-height: .92; }
.page-hero .lede { margin-top: 1.5rem; }
.page-hero .actions { margin-top: 2rem; }
.crumbs { margin-bottom: 1.5rem; font-size: var(--t-small); color: var(--fg-2); }
.crumbs a { color: var(--fg-2); }
.cols { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; } }
.prose { max-width: 42rem; }
.prose h2 { font-size: var(--d3); margin: 3rem 0 1rem; }
.prose h3 { font-size: var(--d4); margin: 2rem 0 .6rem; }
.prose p, .prose li { color: var(--fg-2); }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: .5rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: grid; gap: .25rem 2rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .facts li { grid-template-columns: 16rem 1fr; } }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts b { font-weight: 600; }
.facts span { color: var(--fg-2); }
.steps-pin .steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps-pin .steps li { counter-increment: s; display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.steps-pin .steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-display); font-variation-settings: "wdth" 75; font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--fg-2); }
.steps-pin .steps li.is-on::before { color: var(--c-amber); }
.steps-pin .steps h3 { font-family: var(--f-body); font-variation-settings: normal; font-size: 1.1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.steps-pin .steps p { color: var(--fg-2); margin-top: .3rem; }
.code { background: var(--t-dark-sunk); color: #dfe8f5; border-radius: var(--r-m); padding: 1.25rem; overflow-x: auto; font: 400 .875rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.diagram svg { width: 100%; height: auto; }
.diagram .node rect { fill: var(--raised); stroke: var(--line); stroke-width: 1.5; }
.diagram .node text { fill: var(--fg); font: 600 15px var(--f-body); }
.diagram .node.hub rect { fill: var(--c-navy); stroke: var(--c-navy); }
.diagram .node.hub text { fill: #fff; }
.diagram .wire { fill: none; stroke: var(--c-amber); stroke-width: 3; stroke-linecap: round; }
.diagram .ch circle { fill: var(--c-navy); }
@media (prefers-color-scheme: dark) { .diagram .ch circle { fill: var(--c-mist); } .diagram .ch text { fill: var(--c-navy); } }
.diagram .ch text { fill: #fff; font: 600 13px var(--f-body); }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .team { grid-template-columns: repeat(3, 1fr); } }
.team li { padding-top: 1.25rem; border-top: 3px solid var(--fg); }
.team h3 { font-size: var(--d4); }
.team p { color: var(--fg-2); margin-top: .4rem; }
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.form label { display: grid; gap: .4rem; font-weight: 600; }
.form input, .form textarea { font: inherit; padding: .8rem 1rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--raised); color: var(--fg); min-height: 48px; }
.form textarea { min-height: 9rem; resize: vertical; }
.form .hint { font-weight: 400; font-size: var(--t-small); color: var(--fg-2); }
.legal-doc h2 { font-size: var(--d4); margin: 2.5rem 0 .75rem; }
.placeholder-box { border: 1.5px dashed var(--c-amber); border-radius: var(--r-m); padding: 1rem 1.25rem; color: var(--fg-2); }
.big-404 { font-family: var(--f-display); font-variation-settings: "wdth" 75; font-weight: 700; font-size: clamp(6rem, 3rem + 20vw, 18rem); line-height: .8; letter-spacing: -0.04em; }
.widget-mock { max-width: 26rem; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.widget-mock .wm-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.widget-mock .av { width: 36px; height: 36px; border-radius: 50%; background: var(--c-navy); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
@media (prefers-color-scheme: dark) { .widget-mock .av { background: var(--c-mist); color: var(--c-navy); } }
.widget-mock .thread { padding: 0 1.1rem 1.1rem; }
.widget-mock .msg.agent p { font-family: var(--f-body); font-variation-settings: normal; font-weight: 400; font-size: 1rem; letter-spacing: 0; background: var(--sunk); padding: .65rem .9rem; border-radius: 18px 18px 18px 6px; }
.widget-mock .msg.guest p { font-size: 1rem; }
.mount { margin-top: 1rem; }

/* entrance tweens set their own start state from JS; nothing here hides content */
@media (max-width: 979px) { .is-motion .stage { height: min(80svh, 44rem); } .is-motion .journey-pin { align-items: flex-start; padding-top: calc(var(--header-h) + .5rem); } }

/* logo showcase ---------------------------------------------------------------- */
.showcase h2 { font-size: var(--d2); max-width: 16ch; }
.logo-grid { list-style: none; margin: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.logo-tile { flex: 0 0 calc(50% - 6px); aspect-ratio: 3 / 2; display: grid; place-items: center; padding: .75rem; border-radius: var(--r-m); background: #fff; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55); }
.logo-tile img { width: 100%; height: 100%; max-height: 120px; object-fit: contain; }
@media (min-width: 760px) { .logo-grid { gap: 18px; } .logo-tile { flex-basis: calc(33.333% - 12px); padding: 1.5rem; } }
@media (min-width: 1100px) { .logo-tile { flex-basis: calc(25% - 13.5px); padding: 2rem; } }

/* phones: keep the last lines of every page clear of the two launchers */
@media (max-width: 760px) { .site-footer { padding-bottom: 11rem; } }

/* sticky set pieces own the viewport while they hold (site.js stick()) */
.is-motion .hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.is-motion [data-piece="readback"], .is-motion [data-piece="desk"], .is-motion [data-piece="langs"],
.is-motion [data-piece="transcript"], .is-motion [data-piece="steps"], .is-motion [data-piece="diagram"] {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
}

/* ===== Block 1: hero with the guest-phrase globe (ported from the Astro build) ===== */
.hero {
  /* --gr: the page's right content edge (wrap gutter); --cw: the wrap's content width.
     The globe sits inside the content box (no bleed) and takes half of it at most. */
  --gr: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  --cw: calc(min(100vw, var(--max)) - 2 * var(--gutter));
  --gw: min(86vh, calc(var(--cw) * 0.5));
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.hero-inner { position: relative; z-index: 3; pointer-events: none; } /* spans the full width above the globe: let clicks through to the globe's pause button */
.hero-inner .hero-copy { pointer-events: auto; }
.hero h1 { font-size: clamp(3.1rem, .6rem + 6.6vw, 7.5rem); }
.hero-copy { max-width: 40rem; }
.globe { position: absolute; z-index: 1; width: var(--gw); height: var(--gw); right: var(--gr); top: 50%; transform: translateY(-50%); }
.constellation { display: block; width: 100%; height: 100%; }
.globe-mark { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; transform: translate(-50%, -50%); color: var(--c-amber); opacity: .95; pointer-events: none; }
.globe-mark svg { width: 100%; height: 100%; }
.globe-pause { position: absolute; left: 0; bottom: 0; /* bottom-left canvas corner: outside the sphere, and the launchers are always at the far right */ min-height: 32px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 27, 51, .6); color: var(--fg-2); font: 500 var(--t-xs)/1 var(--f-body); cursor: pointer; }
.globe-pause:hover { color: var(--fg); }
.halo { position: absolute; z-index: 0; width: calc(var(--gw) * 1.5); height: calc(var(--gw) * 1.5); right: calc(var(--gr) + var(--gw) / 2); top: 50%; transform: translate(50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(242, 180, 92, .30) 0%, rgba(242, 180, 92, .10) 38%, transparent 68%); }
.hero-scrim { display: none; }
.paper-disc { display: none; }
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* The globe canvas starts at 52vw (100vw + 8vw bleed - 56vw); the copy ends 1.5rem before it. */
  .hero-copy { max-width: calc(var(--cw) - var(--gw) - 1.5rem); } /* ends 1.5rem before the globe canvas */
}
@media (max-width: 979px) {
  .hero { justify-content: flex-start; }
  .globe { position: relative; right: auto; top: auto; transform: none; width: 96vw; height: 96vw; max-width: 40rem; max-height: 40rem; margin: calc(var(--header-h) - 1.5rem) auto 0; left: 50%; translate: -50% 0; opacity: .85; }
  .globe-mark { width: 64px; height: 64px; }
  .globe-pause { right: auto; left: 50%; bottom: 3%; transform: translateX(-50%); }
  .halo { right: 50%; top: calc(var(--header-h) + 46vw); transform: translate(50%, -50%); width: 140vw; height: 140vw; }
  .hero-inner { padding-top: 0; }
}
.is-motion .paper-disc { display: block; position: absolute; z-index: 4; left: 50%; top: 100%; width: 300vmax; height: 300vmax; border-radius: 50%; background: var(--t-paper-bg); transform: translate(-50%, 0) scale(.001); pointer-events: none; }

/* ===== Block 2a: the mark opens into the four channels ===== */
.opening { padding-block: var(--sec); }
.opening-inner { display: grid; justify-items: center; text-align: center; gap: 1rem; }
.opening-title { font-size: var(--d3); }
.opening .hero-mark circle { fill: var(--fg); }
.opening .hero-mark .c-web { fill: var(--c-amber); }
.opening .hero-mark { width: min(100%, 26rem, 44svh); }
.opening.is-overlay { position: absolute; inset: 0; z-index: 5; padding: calc(var(--header-h) + 1rem) 0 1rem; background: transparent; display: flex; align-items: center; pointer-events: none; }
.opening.is-overlay a, .opening.is-overlay button { pointer-events: auto; }

/* ===== Block 3: night (ported from the Astro build) ===== */
.night { padding-block: 0; }
.night-stage { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 2.5rem; padding-block: var(--sec); }
.facade-fig { margin: 0 auto; width: min(80vw, 520px); order: 2; }
.facade { width: 100%; height: auto; }
.facade .win { fill: var(--c-amber); opacity: .92; transform-box: fill-box; transform-origin: center; }
.night-text { position: relative; z-index: 1; display: grid; gap: 1rem; order: 1; }
.night-text h2 { font-size: var(--d2); max-width: 14ch; }
.night-items { position: relative; z-index: 1; list-style: none; margin-block: 0; display: grid; gap: 1.25rem 2rem; order: 3; }
.night-items h3 { font-size: var(--d4); }
.night-items p { margin-top: .4rem; color: var(--fg-2); font-size: var(--t-small); }
@media (min-width: 900px) { .night-items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.is-motion .night-stage { display: grid; grid-template-rows: 1fr auto; align-items: end; min-height: 100svh; padding-block: 0; }
.is-motion .facade-fig { position: absolute; z-index: 0; left: 58%; bottom: 34vh; width: min(44vw, 560px); margin: 0; }
.is-motion .night-text { align-self: center; padding-top: calc(var(--header-h) + 6vh); }
.is-motion .night-text .lede { max-width: 46vw; }
.is-motion .night-items { padding-bottom: 8vh; }
@media (max-width: 899px) {
  .is-motion .facade-fig { width: 72vw; left: 14vw; bottom: auto; top: calc(var(--header-h) + 1rem); }
  .is-motion .facade { opacity: .55; } /* dim the drawing, not the caption (contrast) */
  .is-motion .night-text .lede { max-width: none; }
  .is-motion .night-text { padding-top: calc(var(--header-h) + 34vw); }
  .is-motion .night-items { gap: .9rem; padding-bottom: 5vh; }
}

.launchers { transition: transform .3s ease, opacity .3s ease; }
.launchers.is-tucked { transform: translateY(140%); opacity: 0; pointer-events: none; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .launchers { transition: none; } }

/* live widget mount, launcher hand-off, form status ------------------------------------ */
.widget-mount { height: 560px; max-width: 30rem; border-radius: var(--r-m); background: var(--sunk); display: grid; place-items: center; text-align: center; padding: 1.5rem; color: var(--fg-2); }
.widget-mount.is-live { display: block; padding: 0; background: transparent; }
.widget-mount.is-live .mount-note { display: none; }
.widget-mount.is-failed .mount-note::after { content: attr(data-failed); display: block; margin-top: .75rem; color: var(--fg); }
.launchers.has-widget { bottom: 106px; }
.launchers.has-widget .l-chat { display: none; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status[data-kind="ok"] { color: var(--fg); }
.form-status[data-kind="error"] { color: var(--ph, #7a4a00); }
.notice { font-size: var(--t-small); color: var(--fg-2); max-width: 40rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lang-switch { color: var(--fg-2); font-size: var(--t-small); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem; }
.lang-switch:hover { color: var(--fg); text-decoration: underline; }
.legal-doc h2 { font-size: var(--d4); margin: 2.5rem 0 .75rem; }
.legal-doc h3 { font-family: var(--f-body); font-variation-settings: normal; font-weight: 600; font-size: 1.05rem; letter-spacing: 0; margin: 1.5rem 0 .4rem; }
.legal-doc table { border-collapse: collapse; width: 100%; font-size: var(--t-small); margin: 1rem 0; display: block; overflow-x: auto; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.legal-doc th { font-weight: 600; color: var(--fg); }
.legal-doc td { color: var(--fg-2); }
.legal-meta { font-size: var(--t-small); color: var(--fg-2); margin-top: 1rem; }
