/* ═══════════════════════════════════════════════════════════════════════
   CantoWork — marketing site design system
   Polished product UI with a quiet futuristic layer (dot matrix, signal
   gradient, mono labels). Light "paper" theme first, dark sections as accents.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #fbfaf7;
  --paper-2: #f4f2ee;
  --paper-3: #ecE9e3;
  --card: #ffffff;
  --ink: #16161b;
  --ink-2: #3a3a44;
  --muted: #6d6d78;
  --faint: #9b9ba5;
  --line: rgba(22, 22, 27, 0.08);
  --line-2: rgba(22, 22, 27, 0.14);

  --iris: #6b5cff;
  --iris-2: #8b7fff;
  --cyan: #22d3ee;
  --mint: #34d399;
  --amber: #f5a524;
  --coral: #ff6b5e;
  --signal: linear-gradient(100deg, #6b5cff 0%, #4f8bff 45%, #22d3ee 100%);

  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-hair: 0 0 0 1px rgba(22, 22, 27, 0.06), 0 1px 2px -1px rgba(22, 22, 27, 0.06), 0 2px 4px rgba(22, 22, 27, 0.04);
  --shadow-card: 0 0 0 1px rgba(22, 22, 27, 0.05), 0 2px 6px rgba(22, 22, 27, 0.04), 0 16px 40px -16px rgba(22, 22, 27, 0.14);
  --shadow-float: 0 0 0 1px rgba(22, 22, 27, 0.06), 0 30px 80px -24px rgba(22, 22, 27, 0.28), 0 12px 24px -12px rgba(22, 22, 27, 0.14);

  --wrap: 1180px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(107, 92, 255, 0.22); }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── type ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); }
.display {
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -0.04em; }
.h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); letter-spacing: -0.01em; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.signal-text { background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--iris); box-shadow: 0 0 0 4px rgba(107, 92, 255, 0.14); }
p { margin: 0; }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(22, 22, 27, 0.3), 0 6px 18px -6px rgba(22, 22, 27, 0.5);
}
.btn-primary::after { /* signal rim on hover — the futuristic tell */
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px;
  background: var(--signal); opacity: 0; transition: opacity 0.25s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 4px rgba(22, 22, 27, 0.3), 0 12px 30px -8px rgba(107, 92, 255, 0.55); }
.btn-primary:hover::after { opacity: 1; }
.btn-secondary { background: var(--card); color: var(--ink); box-shadow: var(--shadow-hair); }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(22, 22, 27, 0.1), 0 6px 16px -6px rgba(22, 22, 27, 0.18); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.btn-meta { display: block; margin-top: 12px; font-size: 13px; color: var(--faint); }

/* ── nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(251, 250, 247, 0.86); }
.nav-inner { display: flex; align-items: center; height: 68px; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }
.brand svg { width: 28px; height: 28px; }
.brand .tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted);
  padding: 2px 7px; border-radius: 6px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; margin-right: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.nav-links a:hover { background: rgba(22, 22, 27, 0.05); color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-signin { padding: 8px 10px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); }
.nav-signin:hover { color: var(--ink); background: rgba(22, 22, 27, 0.05); }
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.6px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: transform 0.25s; }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 72px 0 0; text-align: center; isolation: isolate; }
.matrix { position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 35%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 35%, transparent 75%); }
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-hair); font-size: 14px; color: var(--ink-2);
}
.chip b { font-weight: 500; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: #fff;
  background: var(--ink); padding: 3px 9px; border-radius: 999px; }
.chip:hover { box-shadow: 0 0 0 1px rgba(22, 22, 27, 0.1), 0 4px 12px -4px rgba(22, 22, 27, 0.15); }
.hero h1 { margin: 26px auto 22px; max-width: 920px; }
.hero .lead { max-width: 640px; margin: 0 auto 36px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── app window (the "video" frame) ───────────────────────────────────── */
.stage { position: relative; margin: 64px auto 0; max-width: 1120px; }
.launch-player { overflow: hidden; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.launch-player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #fbfaf7; }
.launch-caption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 4px 0; color: var(--muted); font-size: 14px; }
.launch-caption span:first-child { color: var(--ink); }
.stage .peek { position: absolute; z-index: 3; }
.stage .peek-left { left: -46px; bottom: 90px; width: 110px; }
.stage .peek-right { right: -34px; top: -78px; width: 104px; }

/* ── "You are a…" film picker: a swipeable word wheel over one player ── */
.aud-say { position: relative; margin: 0 auto 30px; }
.aud-lead { font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink-2); }
.aud-art { display: inline-block; min-width: 0.9em; text-align: left; transition: opacity 0.18s var(--ease), transform 0.18s var(--ease); }
.aud-art.swap { opacity: 0; transform: translateY(-6px); }
.aud-wheel { position: relative; display: flex; align-items: center; gap: 6px; max-width: 860px; margin: 4px auto 0; }
.aud-track {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: clamp(18px, 3vw, 46px);
  padding: 8px 50%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  cursor: grab; touch-action: pan-x; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%);
}
.aud-track::-webkit-scrollbar { display: none; }
.aud-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.aud-word {
  flex: none; scroll-snap-align: center; border: 0; background: none; padding: 2px 6px 10px; cursor: pointer;
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(42px, 6.4vw, 78px); line-height: 1.05; letter-spacing: -0.025em;
  white-space: nowrap; color: var(--ink);
  opacity: calc(1 - var(--d, 1) * 0.78); transform: scale(calc(1 - var(--d, 1) * 0.2)); transform-origin: 50% 70%;
}
.aud-word[aria-selected="true"] { background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.aud-word:focus-visible { outline: 2px solid var(--iris); outline-offset: 4px; border-radius: 12px; }
.aud-arrow {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--card); color: var(--ink-2); box-shadow: var(--shadow-hair); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s;
}
.aud-arrow svg { width: 18px; height: 18px; }
.aud-arrow:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(22, 22, 27, 0.1), 0 6px 16px -6px rgba(22, 22, 27, 0.18); }
.aud-arrow:focus-visible { outline: 2px solid var(--iris); outline-offset: 3px; }
.aud-hint { margin-top: 2px; font-size: 13px; color: var(--faint); }

.aud-frame { position: relative; }
.aud-player { position: relative; isolation: isolate; }
.aud-player video { cursor: pointer; transition: opacity 0.22s var(--ease); }
.aud-player.switching video { opacity: 0; }
.aud-big {
  position: absolute; inset: 0; z-index: 2; margin: auto; width: 84px; height: 84px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: rgba(22, 22, 27, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -14px rgba(22, 22, 27, 0.55); opacity: 0; transform: scale(0.9); pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.aud-big svg { width: 30px; height: 30px; margin-left: 4px; }
.aud-player.paused:not(.switching) .aud-big { opacity: 1; transform: none; pointer-events: auto; }
.aud-big:hover { background: var(--ink); }
.aud-ctl { position: absolute; z-index: 2; right: 16px; bottom: 18px; display: flex; gap: 8px; }
.aud-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em;
  background: rgba(22, 22, 27, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px -10px rgba(22, 22, 27, 0.6); transition: background 0.2s, transform 0.2s var(--ease);
}
.aud-btn:hover { background: rgba(22, 22, 27, 0.9); transform: translateY(-1px); }
.aud-btn:focus-visible, .aud-big:focus-visible { outline: 2px solid var(--iris-2); outline-offset: 2px; }
.aud-btn svg { width: 17px; height: 17px; flex: none; }
.aud-btn.icon { width: 38px; padding: 0; justify-content: center; }
.aud-btn .i-pause, .aud-player.paused .aud-btn .i-play { display: block; }
.aud-btn .i-play, .aud-player.paused .aud-btn .i-pause { display: none; }
.aud-btn .i-on, .aud-btn[aria-pressed="true"] .i-off { display: none; }
.aud-btn[aria-pressed="true"] .i-on { display: block; }
.aud-progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(22, 22, 27, 0.08); }
.aud-progress i { display: block; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: 0 50%; }
.aud-caption { text-align: left; align-items: baseline; }
.aud-caption b { font-weight: 500; color: var(--ink); }
.aud-caption .aud-desc { color: var(--muted); }
.aud-caption > span:last-child { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .aud-arrow { display: none; }
  .aud-track { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
                       mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%); }
  .aud-ctl { right: 10px; bottom: 12px; gap: 6px; }
  .aud-btn { height: 32px; font-size: 12.5px; padding: 0 12px 0 10px; }
  .aud-btn.icon { width: 32px; }
  .aud-big { width: 64px; height: 64px; }
  .aud-big svg { width: 24px; height: 24px; }
  .aud-caption { flex-direction: column; gap: 4px; }
}

/* ── section shells ───────────────────────────────────────────────────── */
section { position: relative; }
.section { padding: 128px 0; }
.section-sm { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head .h2 { margin: 14px 0 18px; }
.divider { height: 1px; background: var(--line); }

/* ── integrations marquee ─────────────────────────────────────────────── */
.logos { padding: 72px 0 24px; text-align: center; }
.logos p { font-size: 14.5px; color: var(--muted); margin-bottom: 26px; }
.marquee { position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 10px; color: #5f5f6a; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; opacity: 0.85; }
.marquee-item img { width: 22px; height: 22px; filter: grayscale(1) contrast(0.9); opacity: 0.75; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── crew (mascots) ───────────────────────────────────────────────────── */
.crew { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.crew-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 18px; min-height: 440px; padding: 40px 24px 56px;
  border-radius: var(--r-xl); background: radial-gradient(rgba(22, 22, 27, 0.11) 1.2px, transparent 1.4px) 0 0 / 22px 22px, linear-gradient(180deg, var(--paper-2), var(--paper));
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.crew-stage::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 40px; height: 70px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(107, 92, 255, 0.16), transparent 70%); }
.crew-stage::after { content: "CREW · ONLINE"; position: absolute; top: 18px; left: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  padding: 4px 10px 4px 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-hair); }
.crew-stage .online-dot { position: absolute; top: 27px; left: 31px; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: blink 1.6s infinite; }
.crew-stage .mascot { width: 160px; position: relative; }
.crew-stage .mascot:nth-child(3) { width: 186px; }
.crew-cards { display: grid; gap: 10px; margin-top: 30px; }
.crew-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); transition: background 0.2s; cursor: default; }
.crew-card:hover, .crew-card.on { background: var(--card); box-shadow: var(--shadow-hair); }
.crew-card .swatch { width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center; }
.crew-card b { display: block; font-weight: 500; letter-spacing: -0.01em; }
.crew-card span { color: var(--muted); font-size: 15px; }

/* ── agent run card ───────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.run-card { position: relative; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 22px; }
.run-head { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.run-head .avatar { width: 34px; height: 34px; }
.run-head b { font-weight: 500; font-size: 15px; }
.run-head small { display: block; color: var(--faint); font-size: 12.5px; font-family: var(--mono); }
.run-head .live { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: #0f9f6e; background: rgba(52, 211, 153, 0.12); padding: 4px 9px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.run-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.prompt { margin: 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); font-size: 15px; color: var(--ink-2); }
.steps-run { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps-run li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; font-size: 14.5px; color: var(--ink-2);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s var(--ease); }
.steps-run li.show { opacity: 1; transform: none; }
.steps-run .state { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-2); }
.steps-run li.working .state { border-color: var(--iris); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps-run li.ok .state { background: var(--ink); border-color: var(--ink); }
.steps-run li.ok .state::after { content: ""; width: 8px; height: 4.5px; border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.steps-run code { font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--paper-2); padding: 2px 7px; border-radius: 6px; margin-left: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.run-result { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 14.5px; color: var(--ink-2);
  opacity: 0; transition: opacity 0.5s; }
.run-result.show { opacity: 1; }
.run-result b { font-weight: 500; color: var(--ink); }
.checklist { list-style: none; padding: 0; margin: 28px 0 34px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; color: var(--ink-2); }
.checklist li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ── bento ────────────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), 0 24px 50px -28px rgba(22, 22, 27, 0.35); }
.tile.w2 { grid-column: span 2; } .tile.w3 { grid-column: span 3; } .tile.w4 { grid-column: span 4; }
.tile-media { position: relative; flex: 0 0 auto; height: 285px; padding: 28px 18px 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tile.w4 .tile-media { height: 285px; padding-top: 54px; }
.tile.w3 .tile-media { height: 400px; padding-top: 54px; }
.shot-link { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 14px; }
.shot-link:focus-visible { outline: 3px solid var(--violet, #6b5cff); outline-offset: 4px; }
.tile-media img.ui { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 26px -14px rgba(22,22,27,.24); }
.tile-copy { padding: 22px 24px 24px; }
.tile-copy .h3 { margin-bottom: 6px; }
.tile-copy p { color: var(--muted); font-size: 15.5px; }
.tile .kicker { position: absolute; top: 18px; left: 20px; z-index: 2; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, 0.8); padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow-hair); }
.tile.dark { background: #0f1116; box-shadow: none; }
.tile.dark .tile-copy .h3 { color: #fff; } .tile.dark .tile-copy p { color: #9aa1af; }

/* mini visuals inside tiles */
.wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; }
.wave { padding-bottom: 46px; }
.wave i { width: 5px; height: 14px; border-radius: 4px; background: var(--signal); animation: eq 1.1s ease-in-out infinite; }
.said { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #c9ced8; font-size: 14px; }
.said::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; animation: blink 1.4s infinite; }
@keyframes eq { 0%, 100% { height: 14px; } 50% { height: var(--h, 70px); } }
.cursor-demo { position: absolute; inset: 0; }
.cursor-demo .win { position: absolute; background: #fff; border-radius: 12px; box-shadow: var(--shadow-card); overflow: hidden; padding: 30px 14px 12px; }
.cursor-demo .win::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle, #ff6b5e 3px, transparent 3.5px) 10px 50% / 12px 22px no-repeat, radial-gradient(circle, #f5a524 3px, transparent 3.5px) 22px 50% / 12px 22px no-repeat,
  radial-gradient(circle, #34d399 3px, transparent 3.5px) 34px 50% / 12px 22px no-repeat, var(--paper); }
.cursor-demo .ln { display: block; height: 7px; border-radius: 4px; background: var(--paper-3); margin-bottom: 8px; }
.cursor-demo .ln.hl { background: rgba(107, 92, 255, 0.22); }
.cursor-demo .chipbtn { display: inline-block; margin-top: 4px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; }
.cursor-demo .pointer { position: absolute; left: 0; top: 0; width: 22px; height: 22px; transform: translate(40px, 150px); animation: roam 7s var(--ease) infinite; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25)); z-index: 2; }
@keyframes roam { 0% { transform: translate(40px, 150px); } 25% { transform: translate(190px, 70px); } 30% { transform: translate(190px, 70px) scale(0.85); }
  35% { transform: translate(190px, 70px); } 60% { transform: translate(300px, 160px); } 65% { transform: translate(300px, 160px) scale(0.85); }
  70%, 100% { transform: translate(40px, 150px); } }
.memory-orbs { position: absolute; inset: 0; }
.memory-orbs span { position: absolute; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-card); font-size: 13px; color: var(--ink-2);
  animation: drift 8s ease-in-out infinite; white-space: nowrap; }
@keyframes drift { 50% { transform: translateY(-10px); } }
.cron { position: absolute; inset: 22px; display: grid; gap: 8px; align-content: center; }
.cron div { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-hair); font-size: 14px; }
.cron div em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: auto; }
.cron div i { width: 8px; height: 8px; border-radius: 50%; }

/* ── use-case rail ────────────────────────────────────────────────────── */
.rail { overflow: hidden; padding: 8px 0 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.rail-track { display: flex; gap: 18px; width: max-content; animation: marquee 70s linear infinite; }
.rail:hover .rail-track { animation-play-state: paused; }
.case { position: relative; width: 300px; min-height: 220px; padding: 22px 22px 20px 26px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; transition: transform 0.3s var(--ease); }
.case:hover { transform: translateY(-4px) rotate(-0.4deg); }
.case::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--iris)); }
.case .who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.case .who::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; background: var(--c, var(--iris)); }
.case h4 { font-size: 22px; line-height: 1.2; letter-spacing: -0.03em; margin: 12px 0 auto; }
.case p { margin-top: 18px; font-size: 14px; color: var(--faint); font-family: var(--mono); }

/* ── steps ────────────────────────────────────────────────────────────── */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.steps3 > div { padding: 34px 32px 8px 0; }
.steps3 > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.steps3 .n { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.steps3 h3 { font-size: 23px; letter-spacing: -0.03em; margin: 10px 0 8px; }
.steps3 p { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mini-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.mini-list li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-hair); font-size: 13px; }

/* ── stats band (dark) ────────────────────────────────────────────────── */
.dark-band { background: #0d0f14; color: #e8eaef; border-radius: var(--r-xl); position: relative; overflow: hidden; isolation: isolate; }
.dark-band .matrix-dark { position: absolute; inset: 0; z-index: -1; opacity: 0.55; }
.dark-band .h2 { color: #fff; }
.dark-band .lead { color: #9aa1af; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.08); border-radius: var(--r-lg); overflow: hidden; margin-top: 54px; }
.stats div { background: #0d0f14; padding: 28px 26px; }
.stats b { display: block; font-size: 46px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stats span { display: block; margin-top: 10px; color: #8b93a3; font-size: 14.5px; }

/* ── trust ────────────────────────────────────────────────────────────── */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust > div { padding: 26px 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); }
.trust .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); margin-bottom: 18px; }
.trust .ico svg { width: 20px; height: 20px; stroke: var(--ink); }
.trust h3 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 8px; }
.trust p { color: var(--muted); font-size: 15px; }

/* ── faq ──────────────────────────────────────────────────────────────── */
.faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 20px; padding: 22px 0; font-size: 18px; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; margin-left: auto; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--paper-2)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v10M5 10h10' stroke='%2316161b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 48px 24px 0; color: var(--muted); font-size: 16px; }

/* ── final cta ────────────────────────────────────────────────────────── */
.final { position: relative; text-align: center; padding: 120px 0 140px; overflow: hidden; isolation: isolate; }
.final .matrix { top: auto; bottom: 0; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 30%, transparent 75%); }
.final .crew-line { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-bottom: 30px; }
.final .crew-line .mascot { width: 96px; }

/* ── footer ───────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14.5px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer h4 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--faint); flex-wrap: wrap; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

/* ── reveal on scroll ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .stage .peek-left, .stage .peek-right { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .section { padding: 88px 0; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 18px;
    background: rgba(251, 250, 247, 0.98); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 17px; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-inner { gap: 10px; }
  .nav-cta .btn-secondary { display: none; }
  .crew, .split, .faq { grid-template-columns: 1fr; gap: 40px; }
  .bento { grid-template-columns: 1fr; }
  .tile.w2, .tile.w3, .tile.w4 { grid-column: auto; }
  .steps3 { grid-template-columns: 1fr; }
  .steps3 > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .caption { font-size: 12.5px; bottom: 12px; }
}
@media (max-width: 560px) {
  .trust, .stats { grid-template-columns: 1fr; }
  .crew-stage .mascot { width: 104px; } .crew-stage .mascot:nth-child(2) { width: 120px; }
  .launch-caption { font-size: 12px; gap: 7px; }
  .tile.w3 .tile-media { height: 330px; }
  .cta-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .faq .answer { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Canvases need an explicit CSS size: otherwise their pixel buffer
   (set from devicePixelRatio) becomes their layout width. */
canvas.matrix, canvas.matrix-dark { display: block; width: 100%; }
canvas.matrix-dark { height: 100%; }
.btn [data-download-icon] { display: inline-flex; flex: none; }
.btn [data-download-icon]:empty { display: none; }
@media (max-width: 560px) { .brand .tag { display: none; } }

/* ── plugins: drifting app wall + typing prompt ─────────────────────────── */
.plugins { padding: 128px 0 112px; text-align: center; overflow: hidden; }
.plugins .h2 { margin: 14px 0 18px; }
.plugins .lead { max-width: 660px; margin: 0 auto; }
.app-wall { position: relative; display: grid; gap: 22px; margin: 60px 0 0; padding: 6px 0 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.app-row { display: flex; gap: 22px; width: max-content; animation: marquee var(--dur, 64s) linear infinite; }
.app-row.rev { animation-direction: reverse; }
.app-row:nth-child(2) { --dur: 78s; }
.app-row:nth-child(3) { --dur: 92s; opacity: 0.32; filter: saturate(0.6); }
.app-wall:hover .app-row { animation-play-state: paused; }
.app-tile { flex: none; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 20px; background: var(--card);
  box-shadow: 0 0 0 1px rgba(22, 22, 27, 0.05), 0 2px 4px rgba(22, 22, 27, 0.04), 0 14px 28px -16px rgba(22, 22, 27, 0.28);
  transition: transform 0.25s var(--ease); }
.app-tile:hover { transform: translateY(-4px) scale(1.04); }
.app-tile img { width: 44px; height: 44px; object-fit: contain; }

.prompt-demo { position: relative; z-index: 2; width: min(900px, calc(100% - 32px)); margin: -58px auto 0; text-align: left;
  padding: 24px 24px 16px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow-float); }
.pd-text { margin: 0; min-height: 3.3em; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; font-weight: 600; color: var(--chip, var(--iris));
  white-space: nowrap; animation: chip-in 0.3s var(--ease) both; }
.pd-chip::before { content: ""; width: 5px; height: 5px; margin-right: 1px; border-radius: 50%; background: currentColor; opacity: 0.35; }
.pd-chip img { width: 18px; height: 18px; }
@keyframes chip-in { from { opacity: 0; transform: translateY(3px); } }
.pd-caret { display: inline-block; width: 1.6px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--ink); animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.pd-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.pd-plus { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.pd-send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: var(--ink); }

/* ── what's new cards ── */
.nf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nf { padding: 26px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); }
.nf-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--c) 13%, transparent); }
.nf-ico svg { width: 22px; height: 22px; stroke: var(--c); }
.nf h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.nf p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.marquee-item img { width: 24px; height: 24px; object-fit: contain; }
.marquee-item:hover img { filter: none; opacity: 1; }

@media (max-width: 900px) { .nf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .nf-grid { grid-template-columns: 1fr; }
  .app-tile { width: 62px; height: 62px; border-radius: 16px; } .app-tile img { width: 34px; height: 34px; }
  .app-row, .app-wall { gap: 14px; }
  .prompt-demo { margin-top: -40px; padding: 18px 18px 12px; } .pd-text { font-size: 16px; min-height: 5em; }
}
/* the slow logo strips keep drifting even when Windows animations are off (owner's call) */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 42s !important; animation-iteration-count: infinite !important; }
  .rail-track { animation-duration: 70s !important; animation-iteration-count: infinite !important; }
  .app-row { animation-duration: var(--dur, 64s) !important; animation-iteration-count: infinite !important; }
  .pd-caret { animation-duration: 1.05s !important; animation-iteration-count: infinite !important; }
}
/* nav: one line at every width (it grew Plugins + Sign in links) */
.nav-links a, .nav-signin { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1200px) {
  .nav-links a { padding: 8px 10px; font-size: 14.5px; }
  .nav-links a[href="#crew"], .nav-links a[href="#faq"] { display: none; }
}
.nav-mobile-only { display: none; }
@media (max-width: 900px) { .nav.open .nav-links .nav-mobile-only { display: block; } }
@media (max-width: 560px) { .nav-signin { display: none; } }

/* ═══ early-beta notice: top banner + one-time popup ═══ */
.beta-bar { position: relative; z-index: 60; background: #16161b; color: #f1f1f4; font-size: 14px; }
.beta-bar-in { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding-top: 7px; padding-bottom: 7px; text-align: center; }
.beta-pill { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: #f5a524; color: #16161b; font-size: 12.5px; font-weight: 600; }
.beta-text { color: #d6d6de; line-height: 1.4; }
.beta-more { flex: none; border: 0; background: none; color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.4); }
.beta-more:hover { text-decoration-color: #fff; }
.beta-scrim { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(15, 15, 20, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: beta-fade .25s ease; overflow-y: auto; }
.beta-scrim.out { opacity: 0; transition: opacity .2s; }
.beta-modal { position: relative; width: min(720px, 100%); margin: auto; padding: 34px 36px 28px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow-float); animation: beta-pop .35s cubic-bezier(.2,.8,.2,1); }
.beta-x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.beta-x:hover { background: var(--paper-2); color: var(--ink); }
.beta-x svg { width: 18px; height: 18px; }
.beta-badge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 999px; background: rgba(245, 165, 36, 0.14); color: #9a6200; font-size: 13.5px; font-weight: 600; }
.beta-badge i { width: 8px; height: 8px; border-radius: 50%; background: #f5a524; box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.22); }
.beta-modal h2 { margin: 16px 0 10px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; }
.beta-lead { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }
.beta-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 16px; }
.beta-box { padding: 18px 18px 14px; border-radius: 18px; background: var(--paper-2); }
.beta-box.next { background: rgba(107, 92, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(107, 92, 255, 0.18); }
.beta-box h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.beta-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.beta-box li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.beta-box li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.beta-box.next li::before { background: var(--iris); }
.beta-box b { color: var(--ink); font-weight: 600; }
.beta-foot { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.beta-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@keyframes beta-fade { from { opacity: 0; } }
@keyframes beta-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (max-width: 640px) {
  .beta-bar-in { flex-wrap: wrap; gap: 6px 10px; font-size: 13px; }
  .beta-text { flex-basis: 100%; order: 3; }
  .beta-modal { padding: 28px 22px 22px; border-radius: 22px; }
  .beta-cols { grid-template-columns: 1fr; }
  .beta-actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .beta-scrim, .beta-modal { animation: none; } }
