/* ============================================================
   Manevo marketing site — dark-first, tokens from
   design/tokens/design-tokens.json (v1.1.0). No hard-coded
   off-token color except the sanctioned aurora motif (hero).
   ============================================================ */

/* ---------- Fonts (bundled, SIL OFL 1.1 — same faces the app ships) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg-base: #0f1216;
  --bg-surface: #151920;
  --bg-raised: #1c222b;
  --bg-inset: #0a0c10;
  --bg-hover: rgba(232, 236, 241, 0.07);
  --fg-primary: #e8ecf1;
  --fg-secondary: #a8b1bd;
  --fg-muted: #808a98;
  --border-subtle: #262d37;
  --border-strong: #3a4351;
  --border-focus: #4cc5ae;
  --accent: #4cc5ae;
  --accent-hover: #63d3be;
  --accent-on: #06231c;
  --accent-muted: rgba(76, 197, 174, 0.14);
  --sync: #f5a83c;
  --sync-hover: #ffb955;
  --sync-on: #231402;
  --sync-muted: rgba(245, 168, 60, 0.14);
  --success: #5bc677;
  --success-muted: rgba(91, 198, 119, 0.14);
  --danger: #f1695e;
  --selection: rgba(76, 197, 174, 0.22);

  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur-base: 160ms;
  --dur-slow: 240ms;
  --dur-deliberate: 400ms;
  --dur-reveal: 600ms;

  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);

  --nav-h: 64px;
  --container: 1120px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

main:focus { outline: none; }

body {
  background: var(--bg-base);
  color: var(--fg-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  /* Path fidelity: JetBrains Mono code ligatures would merge sequences
     like \\ or :: — the same rule the app enforces. */
  font-variant-ligatures: none;
  overflow-x: hidden;
}

::selection { background: var(--selection); }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

.mono,
.mono-inline {
  font-family: var(--font-mono);
  font-weight: 450;
  font-variant-ligatures: none;
}
.mono-inline { font-size: 0.9em; color: var(--fg-secondary); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; top: -48px; left: 16px; z-index: 100;
  padding: 10px 14px;
  background: var(--bg-raised); color: var(--fg-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease-standard);
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 820px; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  margin-top: 1.1rem;
  max-width: 46rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--fg-secondary);
}
.lead em { font-style: italic; color: var(--fg-primary); }

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section > .container > .eyebrow + .h2 { margin-top: 0.25rem; }

section[id] { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* ---------- Reveal on scroll ----------
   The inline head script sets html.js before first paint. If site.js
   itself never runs (blocked, failed request), a CSS-only timer unhides
   everything after 3.5s; site.js cancels it by adding .js-ran. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  animation: reveal-fallback 1ms 3.5s forwards;
}
html.js.js-ran [data-reveal] { animation: none; }
@keyframes reveal-fallback {
  to { opacity: 1; transform: none; }
}
html.js [data-reveal].revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-reveal) var(--ease-standard),
    transform var(--dur-reveal) var(--ease-standard);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding-inline: 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
.btn--sm { height: 36px; padding-inline: 0.9rem; font-size: 0.875rem; }
.btn--accent { background: var(--accent); color: var(--accent-on); }
.btn--accent:hover { background: var(--accent-hover); color: var(--accent-on); }
.btn--ghost {
  border-color: var(--border-strong);
  color: var(--fg-primary);
  background: transparent;
}
.btn--ghost:hover { background: var(--bg-hover); color: var(--fg-primary); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-slow) var(--ease-standard),
    border-color var(--dur-slow) var(--ease-standard);
}
.nav.scrolled {
  background: rgba(15, 18, 22, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}
/* Without JS the .scrolled class never lands — keep the bar legible. */
html:not(.js) .nav {
  background: rgba(15, 18, 22, 0.92);
  border-bottom-color: var(--border-subtle);
}
.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg-primary);
}
.nav__brand:hover { color: var(--fg-primary); }
.nav__mark { width: 22px; height: 18px; color: var(--accent); }
.nav__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-secondary);
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav__links a:hover { color: var(--fg-primary); }
.nav__links a[aria-current="true"] { color: var(--accent); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3.5rem, 9vw, 7rem));
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero__aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__aurora svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%);
}
.aurora-drift { animation: aurora-drift 16s var(--ease-standard) infinite alternate; }
.aurora-drift--slow { animation: aurora-drift-back 22s var(--ease-standard) infinite alternate; }
@keyframes aurora-drift { to { transform: translateX(-14px); } }
@keyframes aurora-drift-back { to { transform: translateX(12px); } }

.hero__inner { text-align: center; }
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  background: rgba(21, 25, 32, 0.6);
  font-family: var(--font-mono);
  font-weight: 450;
  font-size: 0.78rem;
  color: var(--fg-secondary);
}
.hero__chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__title {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7.2vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.hero__sub {
  margin: 1.4rem auto 0;
  max-width: 44rem;
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  color: var(--fg-secondary);
}
.hero__actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero__window {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.hero__caption {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  text-align: right;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 0.25rem;
}

/* ---------- Window mock ---------- */
.window {
  max-width: 960px;
  margin-inline: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  font-size: 0.8125rem;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 40px;
  padding-inline: 0.9rem;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}
.window__mark { width: 16px; height: 13px; color: var(--accent); flex-shrink: 0; }
.window__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--fg-primary);
}
.window__menu {
  display: flex;
  gap: 0.9rem;
  margin-left: 0.7rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
}
.window__controls {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.window__controls i {
  width: 10px; height: 10px;
  border: 1px solid var(--fg-muted);
  opacity: 0.55;
}
.window__controls i:first-child { height: 1px; border-width: 0 0 1px; align-self: flex-end; margin-bottom: 3px; }
.window__controls i:last-child { position: relative; border: none; }
.window__controls i:last-child::before,
.window__controls i:last-child::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 12px; height: 1px; background: var(--fg-muted);
}
.window__controls i:last-child::before { transform: rotate(45deg); }
.window__controls i:last-child::after { transform: rotate(-45deg); }

.window__body--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.window__body--split .pane + .pane { border-left: 1px solid var(--border-subtle); }

.pane { padding: 0.9rem 1rem 1.1rem; min-width: 0; }
.pane--dim { background: var(--bg-base); }
.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--fg-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-weight: 450;
  font-size: 0.68rem;
  color: var(--fg-muted);
  white-space: nowrap;
}
.badge--teal { border-color: rgba(76, 197, 174, 0.4); color: var(--accent); background: var(--accent-muted); }
.badge--amber { border-color: rgba(245, 168, 60, 0.4); color: var(--sync); background: var(--sync-muted); }

/* Tree rows */
.tree { display: flex; flex-direction: column; gap: 2px; }
.trow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 28px;
  padding-inline: 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 450;
  font-size: 0.78rem;
  color: var(--fg-secondary);
  white-space: nowrap;
  overflow: hidden;
}
.trow .caret { color: var(--fg-muted); font-size: 0.65rem; width: 0.7rem; flex-shrink: 0; }
.trow--folder { color: var(--fg-primary); }
.trow.d1 { padding-left: 1.4rem; }
.trow.d2 { padding-left: 2.3rem; }
.trow--selected { background: var(--accent-muted); color: var(--fg-primary); box-shadow: inset 2px 0 0 var(--accent); }
.trow--staged { background: var(--sync-muted); }
.trow--selected.trow--staged {
  background: linear-gradient(to right, var(--accent-muted), var(--sync-muted));
}
.stage-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sync);
  margin-left: auto;
  flex-shrink: 0;
}
.trow__meta { margin-left: auto; color: var(--fg-muted); font-size: 0.7rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.06rem 0.45rem;
  margin-left: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.65rem;
  color: var(--fg-secondary);
  background: var(--bg-raised);
}
.chip__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.window__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 40px;
  padding-inline: 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
  color: var(--fg-muted);
  font-size: 0.75rem;
}
.window__status .mono { font-size: 0.75rem; }

.sync-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding-inline: 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--sync);
  color: var(--sync-on);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ---------- Tutorial ---------- */
.section--tut { padding-bottom: 0; }
.section--tut > .container:first-child { text-align: center; }
.section--tut .lead { margin-inline: auto; }

.tut {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.tut__steps {
  position: relative;
  padding-left: 2.1rem;
}
.tut__spine {
  position: absolute;
  left: 8px;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 2px;
  background: var(--border-subtle);
  border-radius: 1px;
  overflow: hidden;
}
.tut__spine i {
  display: block;
  width: 100%;
  height: 0%;
  background: var(--accent);
  transition: height var(--dur-deliberate) var(--ease-standard);
}
.tut[data-step="1"] .tut__spine i { height: 14%; }
.tut[data-step="2"] .tut__spine i { height: 40%; }
.tut[data-step="3"] .tut__spine i { height: 68%; background: linear-gradient(to bottom, var(--accent) 58%, var(--sync)); }
.tut[data-step="4"] .tut__spine i { height: 100%; background: linear-gradient(to bottom, var(--accent) 42%, var(--sync)); }

.step {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 2rem;
  transition: opacity var(--dur-deliberate) var(--ease-standard);
}
.step:last-child { min-height: 52vh; }
/* Dim inactive steps only while the JS stepper is actually driving them */
.tut--live .step { opacity: 0.38; }
.tut[data-step="1"] .step[data-step-ix="1"],
.tut[data-step="2"] .step[data-step-ix="2"],
.tut[data-step="3"] .step[data-step-ix="3"],
.tut[data-step="4"] .step[data-step-ix="4"] { opacity: 1; }

.step__num {
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
.step[data-step-ix="3"] .step__num,
.step[data-step-ix="4"] .step__num { color: var(--sync); }
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.01em;
}
.step__body { margin-top: 0.8rem; color: var(--fg-secondary); max-width: 34rem; }
.step__note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.tut__visual {
  position: sticky;
  top: calc(var(--nav-h) + 2.5rem);
  padding-bottom: 2rem;
}
.window--tut { max-width: none; font-size: 0.8125rem; }
/* Scenes stack in one grid cell, so the box sizes to the tallest scene —
   nothing ever clips against a hard-coded height. */
.window__scenes {
  display: grid;
  background: var(--bg-surface);
}

.scene {
  grid-area: 1 / 1;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-standard),
    transform var(--dur-slow) var(--ease-standard);
}
.tut[data-step="1"] .scene-1,
.tut[data-step="2"] .scene-2,
.tut[data-step="3"] .scene-3,
.tut[data-step="4"] .scene-4 {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.scene__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.scene__hint { font-size: 0.7rem; color: var(--fg-muted); }
.scene__status {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 44px;
  margin-inline: -1.1rem;
  padding-inline: 1.1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
  color: var(--fg-muted);
  font-size: 0.75rem;
}
.status-ok { color: var(--success); }

/* Scene 1: rows cascade in on activation */
.tut[data-step="1"] .scene-1 .trow {
  animation: row-in var(--dur-deliberate) var(--ease-standard) both;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
@keyframes row-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

/* Scene 2: drop target + dragged ghost */
.trow--drop {
  height: 3px;
  padding: 0;
  margin-block: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.9;
}
.trow--ghost {
  border: 1px dashed var(--accent);
  background: var(--accent-muted);
  color: var(--fg-primary);
  box-shadow: var(--shadow-md);
}
.tut[data-step="2"] .scene-2 .trow--ghost {
  animation: ghost-in 640ms var(--ease-standard) both;
  animation-delay: 260ms;
}
@keyframes ghost-in {
  from { opacity: 0; transform: translateY(-22px) translateX(14px); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.tut[data-step="2"] .scene-2 .trow--drop {
  animation: drop-pulse 640ms var(--ease-standard) both;
  animation-delay: 160ms;
}
@keyframes drop-pulse {
  from { opacity: 0; transform: scaleX(0.6); }
  to { opacity: 0.9; transform: none; }
}

/* Scene 3: move plan */
.plan { display: flex; flex-direction: column; gap: 0.45rem; }
.plan__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--sync-muted);
  border: 1px solid rgba(245, 168, 60, 0.18);
}
.tut[data-step="3"] .scene-3 .plan__row,
.tut[data-step="3"] .scene-3 .plan__warn {
  animation: row-in var(--dur-deliberate) var(--ease-standard) both;
  animation-delay: calc(var(--i) * 90ms + 140ms);
}
.plan__op { font-size: 0.68rem; color: var(--sync); letter-spacing: 0.08em; }
.plan__paths { font-size: 0.74rem; color: var(--fg-secondary); line-height: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.plan__arrow { color: var(--sync); }
.mech {
  font-size: 0.66rem;
  padding: 0.14rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(245, 168, 60, 0.35);
  color: var(--sync);
  white-space: nowrap;
}
.plan__warn {
  margin-top: 0.3rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  color: var(--fg-muted);
  font-size: 0.72rem;
}
.scene-3 .sync-pill { height: 28px; font-size: 0.75rem; }

/* Scene 4: progress + log + verify */
.progress {
  height: 3px;
  border-radius: 2px;
  background: var(--bg-raised);
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--sync);
}
.tut[data-step="4"] .scene-4 .progress i {
  animation: progress-fill 1.6s linear both;
  animation-delay: 180ms;
}
@keyframes progress-fill { from { width: 0%; } to { width: 100%; } }

.synclog { display: flex; flex-direction: column; gap: 0.55rem; }
.synclog__line { font-size: 0.76rem; color: var(--fg-secondary); }
.tut[data-step="4"] .scene-4 .synclog__line {
  animation: row-in var(--dur-deliberate) var(--ease-standard) both;
  animation-delay: calc(var(--i) * 420ms + 300ms);
}
.synclog__done {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--success);
  opacity: 0;
}
.tut[data-step="4"] .scene-4 .synclog__done {
  animation: done-in var(--dur-deliberate) var(--ease-standard) forwards;
  animation-delay: 1.85s;
}
@keyframes done-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.synclog__check { width: 20px; height: 20px; color: var(--success); }
.synclog__check svg { width: 100%; height: 100%; }
.checkpath {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}
.tut[data-step="4"] .scene-4 .checkpath {
  animation: check-draw var(--dur-deliberate) var(--ease-standard) forwards;
  animation-delay: 2.05s;
}
@keyframes check-draw { to { stroke-dashoffset: 0; } }

/* ---------- Mechanism strip ---------- */
.section--strip {
  background: var(--bg-inset);
  border-block: 1px solid var(--border-subtle);
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.strip__title { text-align: center; }
.strip__demo {
  max-width: 720px;
  margin: 2.4rem auto 0;
  padding: 1.4rem clamp(1rem, 3vw, 1.8rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: clamp(0.78rem, 1.7vw, 0.85rem);
  overflow-x: auto;
}
.strip__row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  white-space: nowrap;
}
.strip__label { color: var(--fg-muted); width: 2.4em; flex-shrink: 0; }
.strip__path { color: var(--fg-primary); }
.strip__tag {
  margin-left: auto;
  padding-left: 0.9rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
}
.strip__tag--ok { color: var(--success); }
.strip__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.5rem 0 0.5rem 1.05em;
  color: var(--fg-muted);
  font-size: 0.75rem;
}
.strip__link i {
  display: block;
  width: 1px;
  height: 26px;
  margin-left: 0.65em;
  background: var(--accent);
}
.strip__copy {
  max-width: 720px;
  margin: 2rem auto 0;
  display: grid;
  gap: 1rem;
  color: var(--fg-secondary);
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards--3 { grid-template-columns: 1fr; } }

.card {
  padding: 1.5rem 1.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: transform var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-raised);
}
.card__icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--accent);
}
.card__icon svg { width: 20px; height: 20px; }
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.card p { color: var(--fg-secondary); font-size: 0.9375rem; }

.problem__closer {
  margin-top: 2.2rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- Compare ---------- */
.table-wrap {
  margin-top: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  background: var(--bg-surface);
}
.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare th {
  text-align: left;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
}
.compare td {
  padding: 0.95rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  vertical-align: top;
}
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child {
  font-weight: 600;
  color: var(--fg-primary);
  white-space: nowrap;
}
.compare__eg { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--fg-muted); }
.compare__manevo td { background: var(--accent-muted); }
.compare__manevo td:first-child { color: var(--accent); }
.compare__manevo td:last-child { color: var(--fg-primary); }
.compare__note {
  margin-top: 1.2rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
  max-width: 46rem;
}

/* ---------- Trust ---------- */
.section--trust {
  background: var(--bg-inset);
  border-block: 1px solid var(--border-subtle);
}
.trust {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 820px) { .trust { grid-template-columns: 1fr; } }
.trust__item {
  padding: 1.5rem 1.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}
.trust__item dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}
.trust__item dd { color: var(--fg-secondary); font-size: 0.9375rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(1.6rem, 4vw, 2.4rem); }
.faq__item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0.25rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  color: var(--fg-primary);
  transition: color var(--dur-fast) var(--ease-standard);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-hover); }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 450;
  font-size: 1.1rem;
  color: var(--fg-muted);
  transition: transform var(--dur-base) var(--ease-standard);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq__item p {
  padding: 0 0.25rem 1.3rem;
  color: var(--fg-secondary);
  font-size: 0.9375rem;
  max-width: 46rem;
}

/* ---------- Beta ---------- */
.section--beta { padding-bottom: clamp(5rem, 11vw, 9rem); }
.beta {
  padding: clamp(1.8rem, 5vw, 3rem);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.beta__title { margin-bottom: 1rem; }
.beta p { color: var(--fg-secondary); max-width: 40rem; }
.beta p + p { margin-top: 0.8rem; }
.beta__actions {
  margin-top: 1.6rem;
}
.beta__fine {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  padding-block: 3rem 2.2rem;
}
.footer__top {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 0.7rem; }
.footer__mark { width: 26px; height: 21px; color: var(--accent); }
.footer__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.2;
}
.footer__by { font-size: 0.75rem; color: var(--fg-muted); }
.footer__links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-inline: auto;
}
.footer__links a {
  font-size: 0.875rem;
  color: var(--fg-secondary);
}
.footer__links a:hover { color: var(--fg-primary); }
.footer__studio { opacity: 0.85; transition: opacity var(--dur-fast) var(--ease-standard); }
.footer__studio:hover { opacity: 1; }
.footer__studio img { width: 120px; height: auto; }
.footer__legal {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 0.5rem;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}
.footer__legal a { color: var(--fg-secondary); }
.footer__legal a:hover { color: var(--fg-primary); }

/* ---------- Responsive: tutorial stacks on narrow screens ---------- */
@media (max-width: 960px) {
  .tut {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .tut__steps,
  .tut__visual { min-width: 0; }
  .tut__visual {
    order: -1;
    position: sticky;
    top: var(--nav-h);
    z-index: 5;
    padding: 0.75rem 0 1rem;
    background: linear-gradient(to bottom, var(--bg-base) 82%, transparent);
  }
  .scene { min-height: 340px; }
  .step { min-height: 58vh; }
  .step:last-child { min-height: 46vh; }
  .window__menu { display: none; }
  .hero__caption { text-align: center; }
}

@media (max-width: 640px) {
  .window__body--split { grid-template-columns: minmax(0, 1fr); }
  /* One pane carries the idea on a phone; the status line still says
     "0 moved". The side-by-side diverged view is a wide-screen luxury. */
  .window__body--split .pane--dim { display: none; }
  .scene { min-height: 320px; }
  .strip__row { white-space: normal; flex-wrap: wrap; }
  .strip__tag { margin-left: 0; flex-basis: 100%; padding-left: calc(2.4em + 0.9rem); }
  .problem__closer { white-space: normal; }
  .scene__status,
  .window__status {
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
    row-gap: 2px;
    padding-block: 6px;
    font-size: 0.7rem;
  }
  .scene__status .mono,
  .window__status .mono { font-size: 0.7rem; }
  .window__body--split .pane + .pane {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
  .plan__row { grid-template-columns: auto 1fr; }
  .plan__row .mech { grid-column: 2; justify-self: start; }
  .br-wide { display: none; }
}

/* Static-render hook (?flatvh): vh-based step heights pinned for full-page capture */
html.flat-vh .step { min-height: 640px; }

/* ---------- Print: nothing stays hidden ---------- */
@media print {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .nav { position: static; }
}

/* ---------- Reduced motion: everything collapses ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .aurora-drift,
  .aurora-drift--slow { animation: none !important; }
}
