/* PILOT marketing surface — "Night Flight", v2 "Hand-off".
   Night ink and bone carry the page. Signal red is a state, not paint: it is
   drawn through --signal and lights only where the autopilot is working; the
   switch turns it grey, and after landing it hands over to cabin amber, the
   human light. Red that carries text (CTAs, the skip link, the selection, the
   AI-sent bubble) is the deeper --red-cta with white on it, never --red.
   Archivo's width axis means time (62% machine, 100% reading, 125% human).
   This file is the foundation; sections live in the module stylesheets. */

:root {
  --ink: #0b0d12;
  --ink-1: #10131a;
  --ink-2: #151923;
  --ink-3: #1b202c;
  --ink-4: #272d3b;
  --bone: #f2f0ea;
  --bone-2: #e5e2da;
  --paper: #eceae4;
  --afternoon: #f3ebdd;
  --muted: rgba(242, 240, 234, .70);
  --faint: rgba(242, 240, 234, .58);
  --line: rgba(242, 240, 234, .12);
  --line-2: rgba(242, 240, 234, .22);
  --red: #fe3c72;            /* Tinder red: lamps, signal and red text on ink (5.65:1 on --ink) */
  --red-cta: #da1f5a;        /* filled CTAs and chips that carry text; white on it 4.86:1 */
  --red-cta-hover: #c41c52;
  --on-red: #ffffff;
  --red-deep: #b8104a;       /* red on light surfaces (5.44:1 on paper) */
  --signal: var(--red);
  /* A lit fill that carries text (the AI-sent bubble): it follows the signal's
     state, but while engaged it is the CTA red with white text. */
  --signal-fill: var(--red-cta);
  --on-signal-fill: var(--on-red);
  --signal-off: #8f8d88;
  --amber: #f2a65a;
  --amber-deep: #8a4b0f;
  --on-amber: #0b0d12;
  --ink-muted: rgba(11, 13, 18, .68);
  --ink-line: rgba(11, 13, 18, .14);
  --focus: var(--red);
  --dir: 1;
  --run: running;
  --gutter: clamp(20px, 4vw, 64px);
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-micro: 180ms;
  --t-ui: 320ms;
  --t-scene: 900ms;
  /* Three heading sizes only (poster / section / entry). */
  --h2-xl: clamp(52px, 7.8vw, 112px);
  --h2-l: clamp(38px, 5vw, 72px);
  --h2-m: clamp(28px, 3.1vw, 44px);
  /* Archivo width = time: machine (counts, the night log), reading, human. */
  --w-machine: 62%;
  --w-log: 75%;
  --w-reading: 100%;
  --w-human: 125%;
  --font-sys: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Noto Sans", system-ui, sans-serif;
  --font-text: "Archivo", var(--font-sys);
  --font-display: "Archivo", var(--font-sys);
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, var(--font-sys);
  color-scheme: dark;
  color: var(--bone);
  background: var(--ink);
  font-family: var(--font-text);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
[dir=rtl] { --dir: -1; }
/* State: the switch greys every live light; landing hands the signal to amber. */
html[data-autopilot=off] { --signal: var(--signal-off); --signal-fill: var(--signal-off); --on-signal-fill: var(--ink); --run: paused; }
html.is-landed { --signal: var(--amber); --signal-fill: var(--amber); --on-signal-fill: var(--on-amber); }
[data-surface=light] { --signal: var(--red-deep); --focus: var(--ink); color: var(--ink); }
html[data-autopilot=off] [data-surface=light] { --signal: #6f6d68; }
html.is-landed [data-surface=light] { --signal: var(--amber-deep); }
.is-offscreen { --run: paused; }

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--ink); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Clip oversized type and the deck's fly-outs without creating a scroll container (sticky still works). */
main, .site-footer { overflow-x: clip; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
picture { display: contents; }
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--red-cta); color: var(--on-red); }
/* On a red fill the default selection would be invisible (the same red, the same white). */
:is(.sent, .button-red, .skip-link)::selection, :is(.sent, .button-red, .skip-link) ::selection { background: var(--ink); color: var(--bone); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(1440px, 100% - var(--gutter) * 2); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; inset-inline-start: 16px; z-index: 60; padding: 10px 18px; border-radius: 99px; background: var(--red-cta); color: var(--on-red); font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
html.is-landed .skip-link { --focus: var(--ink); }
/* The YundaDesk launcher (js/support.js) is a 56px button drawn inside its own
   frame, always at the physical bottom right, also in RTL: 24px from the edges,
   16px at 480px and below. Fixed UI and small print keep out of this lane. */
:root { --support-edge: 24px; --support-lane: 80px; }
@media (max-width: 480px) { :root { --support-edge: 16px; --support-lane: 72px; } }
.muted { color: var(--faint); }
h2 { font: 800 var(--h2-l)/1.04 var(--font-display); letter-spacing: -.035em; overflow-wrap: break-word; }
:lang(zh) h2, :lang(ja) h2, :lang(ko) h2 { line-height: 1.14; letter-spacing: -.02em; }
.section { padding-block: clamp(72px, 8vw, 128px); }
/* Section intros stack: heading, then its paragraph (no heading-left/paragraph-right split). */
.section-heading { display: block; margin-bottom: clamp(40px, 5vw, 72px); }
.section-heading > p { max-width: 34em; margin-top: 16px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.status-dot.paused { background: var(--signal-off); }

/* ── The lamp: the one live light ─────────────────────── */
.lamp { position: relative; display: inline-block; flex: none; width: var(--lamp, 8px); height: var(--lamp, 8px); border-radius: 50%; background: var(--signal); transition: background-color .5s var(--ease); }
.lamp.is-live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--signal); opacity: .55; animation: lamp-breathe 2.4s var(--ease) infinite; animation-play-state: var(--run, running); }
html[data-autopilot=off] .lamp.is-live::after { animation: none; opacity: 0; }

/* ── Buttons & links ──────────────────────────────────── */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 50px; padding: 12px 24px; border: 1px solid transparent; border-radius: 999px; font: 650 15px/1.3 var(--font-text); letter-spacing: -.005em; text-align: center; transition: background var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.button svg { width: 18px; height: 18px; transition: translate .45s var(--ease); }
.button:hover svg { translate: calc(4px * var(--dir)) 0; }
.button:active { transform: scale(.97); }
.button-small { min-height: 44px; padding: 8px 18px; font-size: 14px; gap: 10px; }
.button-small svg { width: 16px; height: 16px; }
.button-large { min-height: 60px; padding: 16px 30px; font-size: 16px; }
.button-red { background: var(--red-cta); color: var(--on-red); }
.button-red:hover { background: var(--red-cta-hover); }
.button-bone { background: var(--bone); color: var(--ink); }
.button-bone:hover { background: var(--bone-2); }
.button-ink { background: var(--ink); color: var(--bone); }
.button-ink:hover { background: var(--ink-4); }
.button-ink .lamp { margin-inline-end: -4px; }
.button-outline { border-color: currentColor; background: transparent; }
.button-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--bone); }
.arrow-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding-bottom: 6px; border-bottom: 1px solid currentColor; font-weight: 600; font-size: 15px; transition: gap .4s var(--ease), border-bottom-width var(--t-micro); }
.arrow-link svg { width: 18px; height: 18px; }
.arrow-link:hover { gap: 18px; border-bottom-width: 2px; }

/* Shared primitives used by the hero and the demo. */
.demo-badge { margin-inline-start: auto; padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 99px; font: 500 10px/1.4 var(--font-mono); letter-spacing: .08em; color: var(--faint); }
.letter-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--amber); color: var(--on-amber); font: 800 20px/1 var(--font-display); font-stretch: 112%; }

/* ── Floating bits ────────────────────────────────────── */
/* The toast is a live region that always exists (so its first message is
   announced); it is drawn only while .is-shown. A quiet message is announced
   but never drawn. On phones it sits under the header, clear of the dock and
   of the control that was just used. */
.toast { position: fixed; z-index: 70; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.toast.is-shown { left: 50%; bottom: 28px; translate: -50% 0; inline-size: max-content; max-inline-size: calc(100% - 32px); block-size: auto; overflow: visible; clip-path: none; white-space: normal; padding: 12px 22px; border-radius: 99px; background: var(--bone); color: var(--ink); font-size: 14px; font-weight: 600; text-align: center; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); animation: toast-in .35s var(--ease); }

/* ── Keyframes (modules declare their own, namespaced) ── */
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; translate: -50% 10px; } to { opacity: 1; translate: -50% 0; } }
@keyframes lamp-breathe { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }

@media (max-width: 760px) {
  .toast.is-shown { top: calc(76px + env(safe-area-inset-top)); bottom: auto; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --run: paused; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
