/* =====================================================================
   Step 28 — site styles
   1. Tokens (from the Step 28 design system; change colours here only)
   2. Base and type
   3. Components (buttons, cards, chips, fields, icons)
   4. Layout and sections
   5. Opening animation, motion, reduced motion
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root, [data-theme="light"] {
  --brand-ink: #0e1217;
  --brand-orange: #d63b14;
  --brand-orange-light: #ff8a66;
  --brand-slate: #5b6b7f;
  --brand-grey: #f1f3f6;
  --brand-white: #ffffff;
  --brand-panel: #1e2733;
  --logo-ink: #12151a;
  --logo-white: #f7f8f5;
  --logo-orange: #ff5a1f;

  --surface: var(--brand-white);
  --surface-alt: var(--brand-grey);
  --surface-raised: var(--brand-white);
  --surface-inverse: var(--brand-ink);
  --ink: var(--brand-ink);
  --ink-muted: var(--brand-slate);
  --ink-inverse: var(--brand-white);
  --ink-inverse-muted: #a7b3c1;
  --accent: var(--brand-orange);
  --accent-inverse: var(--brand-orange-light);
  --accent-fill: var(--brand-orange);
  --accent-fill-hover: #b5300f;
  --on-accent: var(--brand-white);
  --accent-soft: #fbebe8;
  --accent-soft-inverse: #3a2a27;
  --line: #e3e7ec;
  --line-strong: #7f8c9c;
  --line-inverse: #2a3442;
  --line-strong-inverse: #6b788a;
  --focus-ring: var(--accent);
  --success: #1f7a4d;
  --danger: #b42318;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --intro-step: var(--logo-ink);

  --shadow-card: 0 1px 2px rgba(14, 18, 23, 0.05), 0 8px 24px rgba(14, 18, 23, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(14, 18, 23, 0.06), 0 16px 40px rgba(14, 18, 23, 0.10);
  --shadow-nav: 0 1px 0 #e3e7ec;
  color-scheme: light;
}
[data-theme="dark"] {
  --surface: var(--brand-ink);
  --surface-alt: #151b23;
  --surface-raised: var(--brand-panel);
  --surface-inverse: var(--brand-panel);
  --ink: var(--brand-white);
  --ink-muted: #a7b3c1;
  --accent: var(--brand-orange-light);
  --accent-soft: #3a2a27;
  --line: #2a3442;
  --line-strong: #6b788a;
  --focus-ring: var(--brand-orange-light);
  --success: #6fd3a0;
  --danger: #ff9c8f;
  --nav-bg: rgba(14, 18, 23, 0.86);
  --intro-step: var(--logo-white);

  --shadow-card: 0 0 0 1px #2a3442, 0 8px 32px rgba(255, 138, 102, 0.05);
  --shadow-card-hover: 0 0 0 1px #3a4656, 0 12px 40px rgba(255, 138, 102, 0.10);
  --shadow-nav: 0 1px 0 #2a3442;
  color-scheme: dark;
}
:root {
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-6: 48px; --space-8: 64px; --space-12: 96px; --space-16: 128px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-pill: 999px;
  --container-max: 1200px; --measure: 68ch; --nav-height: 112px; --nav-height-compact: 76px; --tap-min: 44px;
  --font-serif: "Source Serif 4", Cambria, Caladea, Georgia, "Times New Roman", serif;
  --font-sans: Inter, Carlito, Calibri, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base and type ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height-compact) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden;
  font-family: var(--font-sans); font-size: 17px; line-height: 28px;
  background: var(--surface); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color 240ms ease, color 240ms ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 var(--space-2); }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-2); }
@media (min-width: 768px) { .container { padding: 0 var(--space-4); } }

.display, .h1, .h2, .h3 { font-family: var(--font-serif); color: var(--ink); font-weight: 700; text-wrap: balance; }
.display { font-size: clamp(44px, 2.2rem + 4.6vw, 80px); line-height: 1.04; letter-spacing: -0.02em; }
.h1 { font-size: clamp(40px, 1.9rem + 2.6vw, 56px); line-height: 1.08; letter-spacing: -0.02em; }
.h2 { font-size: clamp(32px, 1.6rem + 1.4vw, 40px); line-height: 1.15; letter-spacing: -0.015em; }
.h3 { font-size: clamp(24px, 1.3rem + .5vw, 28px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.lead { font-size: clamp(18px, 1rem + .3vw, 20px); line-height: 1.6; color: var(--ink-muted); max-width: 60ch; }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--ink-muted); }
.accent { color: var(--accent); }
.eyebrow { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-2); }
.card-title { font-family: var(--font-sans); font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }

.skip-link { position: absolute; left: var(--space-2); top: -60px; z-index: 200; padding: 8px 16px; border-radius: var(--radius-md); background: var(--accent-fill); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: var(--space-2); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Animated underline link */
.link { color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 240ms var(--ease), color 160ms ease; padding-bottom: 2px; }
.link:hover { background-size: 100% 1.5px; color: var(--accent); }

/* ---------- 3. Components ---------- */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-height: var(--tap-min); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid transparent;
  font: 600 16px/20px var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 200ms var(--ease);
}
.btn .icon { width: 20px; height: 20px; transition: transform 200ms var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 0 var(--space-4); font-size: 17px; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 var(--space-1); }
.btn-ghost:hover { color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: progress; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min);
  border-radius: var(--radius-pill); border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--accent); }
.icon-btn .icon { width: 20px; height: 20px; }

.iconbadge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); flex: none; }
.iconbadge-lg { width: 64px; height: 64px; }
.iconbadge-lg .icon { width: 28px; height: 28px; }

.card {
  background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-3); box-shadow: var(--shadow-card);
  transition: transform 260ms var(--ease), box-shadow 260ms ease, background-color 240ms ease, border-color 240ms ease;
}
@media (min-width: 768px) { .card { padding: var(--space-4); } }
.card p { color: var(--ink-muted); }
.card .card-title { color: var(--ink); }
.h2 + .lead, .h1 + .lead { margin-top: var(--space-2); }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap-min); padding: 0 20px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font: 500 16px/20px var(--font-sans); cursor: pointer; text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease, transform 200ms var(--ease);
}
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.chip[aria-pressed="true"]::before { content: ""; width: 14px; height: 8px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); flex: none; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); font: 600 13px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.tag-neutral { border: 1px dashed var(--line-strong); color: var(--ink-muted); }

.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.input {
  width: 100%; min-height: 48px; padding: 11px var(--space-2); border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font: 400 16px/24px var(--font-sans); transition: border-color 160ms ease, background-color 240ms ease;
}
textarea.input { min-height: 112px; resize: vertical; }
.input:hover { border-color: var(--ink); }
.field-error { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 14px; line-height: 20px; color: var(--danger); }
.field-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; border: 1.75px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; }
.field[data-invalid="true"] .input { border-color: var(--danger); }

.social { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min);
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); color: var(--ink);
  transition: color 160ms ease, border-color 160ms ease, transform 200ms var(--ease);
}
.social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social .icon { width: 20px; height: 20px; }

/* Logo: two supplied files, swapped by theme with a crossfade. Never recoloured. */
.logo { position: relative; display: inline-block; height: 48px; aspect-ratio: 110 / 112; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 240ms ease; }
.logo-dark { opacity: 0; }
[data-theme="dark"] .logo-light, .inverse .logo-light { opacity: 0; }
[data-theme="dark"] .logo-dark, .inverse .logo-dark { opacity: 1; }
.logo-footer { height: 84px; }

/* A dark band: remaps tokens for everything inside */
.inverse {
  background: var(--surface-inverse); color: var(--ink-inverse);
  --ink: var(--ink-inverse); --ink-muted: var(--ink-inverse-muted); --accent: var(--accent-inverse);
  --accent-soft: var(--accent-soft-inverse); --focus-ring: var(--accent-inverse);
  --line: var(--line-inverse); --line-strong: var(--line-strong-inverse); --surface-raised: var(--brand-panel);
  --danger: #ff9c8f; --success: #6fd3a0;
  --shadow-card: 0 0 0 1px #2a3442, 0 8px 32px rgba(255, 138, 102, 0.05);
}
[data-theme="dark"] .inverse { --surface-raised: var(--brand-ink); }

/* ---------- 4. Layout and sections ---------- */
/* Nav */
body { padding-top: var(--nav-height); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-height); background: var(--nav-bg); -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); transition: height 280ms var(--ease), box-shadow 240ms ease, background-color 240ms ease; }
.nav.is-scrolled { height: var(--nav-height-compact); box-shadow: var(--shadow-nav); }
.nav .logo { height: 84px; transition: height 280ms var(--ease); }
.nav.is-scrolled .logo { height: 56px; }
.nav-inner { height: 100%; display: flex; align-items: center; gap: var(--space-3); }
.nav-logo { display: inline-flex; border-radius: var(--radius-sm); }
.nav-links { display: flex; gap: var(--space-3); margin-left: auto; font-size: 16px; font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: var(--space-1); }
.menu-toggle { display: none; }
@media (max-width: 899px) {
  :root { --nav-height: 84px; --nav-height-compact: 64px; }
  .nav .logo { height: 64px; }
  .nav.is-scrolled .logo { height: 48px; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: var(--space-2) var(--space-2) var(--space-3);
    flex-direction: column; gap: 0; background: var(--surface); box-shadow: var(--shadow-nav), 0 16px 32px rgba(14, 18, 23, .12);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 200ms ease, transform 200ms var(--ease), visibility 0s 200ms;
  }
  .nav-links.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 200ms ease, transform 200ms var(--ease); }
  .nav-links .link { display: flex; align-items: center; min-height: 48px; font-size: 18px; background: none; border-bottom: 1px solid var(--line); }
  .btn-nav { padding: 0 var(--space-2); }
}
@media (max-width: 380px) { .theme-toggle { width: 40px; } .btn-nav { font-size: 15px; padding: 0 12px; } .nav-inner { gap: var(--space-1); } }

/* Sections */
.section { padding: var(--space-8) 0; position: relative; }
@media (min-width: 768px) { .section { padding: var(--space-12) 0; } }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 760px; margin-bottom: var(--space-6); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: var(--space-8) 0 var(--space-12); }
@media (min-width: 768px) { .hero { padding: var(--space-12) 0 var(--space-16); } }
.hero-inner { position: relative; z-index: 1; }
.hero .display { max-width: 11em; margin-bottom: var(--space-3); }
.hero-sub { margin-bottom: var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-kicker { margin: var(--space-4) 0 0; }
.hero-motif { position: absolute; right: -40px; bottom: 0; width: min(680px, 64vw); height: auto; z-index: 0; pointer-events: none; will-change: transform; }
.motif-steps path { fill: none; stroke: var(--line); stroke-width: 2; }
.motif-path { fill: none; stroke: none; }
.motif-nodes rect { fill: var(--accent); opacity: .9; }
@media (max-width: 767px) { .hero-motif { width: 120%; right: -30%; opacity: .55; } }
/* Find / Build / Run: cards rise like steps */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.step3 { position: relative; display: flex; flex-direction: column; gap: var(--space-2); }
.step3-num { position: absolute; top: var(--space-3); right: var(--space-3); font: 600 14px/20px var(--font-sans); color: var(--ink-muted); }
@media (min-width: 900px) {
  .steps3 { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .steps3 .step3:nth-child(1) { margin-top: var(--space-8); }
  .steps3 .step3:nth-child(2) { margin-top: var(--space-4); }
  .step3-num { top: var(--space-4); right: var(--space-4); }
}

/* Service intro */
.service-intro { display: grid; gap: var(--space-4); }
.service-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); max-width: 60ch; }
.service-punch { font-family: var(--font-serif); font-weight: 700; font-size: 24px; line-height: 1.3; color: var(--ink); }
@media (min-width: 900px) { .service-intro { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: end; } }

/* 8-step flow */
.flow-grid { display: grid; gap: var(--space-6); }
@media (min-width: 900px) {
  .flow-grid { grid-template-columns: 5fr 7fr; gap: var(--space-8); align-items: start; }
  .flow-head { position: sticky; top: calc(var(--nav-height-compact) + var(--space-6)); }
}
.flow-wrap { position: relative; }
.flow-wrap::before, .flow-fill { content: ""; position: absolute; left: 19px; top: 22px; width: 2px; border-radius: 2px; }
.flow-wrap::before { bottom: 22px; background: var(--line); }
.flow-fill { background: var(--accent); height: 0; transition: height 520ms var(--ease); z-index: 0; }
.flow { list-style: none; margin: 0; padding: 0; position: relative; }
.flow-item { position: relative; padding-bottom: var(--space-1); }
.flow-btn {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: var(--tap-min); padding: 0;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink-muted); border-radius: var(--radius-sm);
  font: 500 18px/24px var(--font-sans); transition: color 200ms ease;
}
.flow-btn:hover { color: var(--ink); }
.flow-btn:focus-visible { outline-offset: 4px; }
.flow-num {
  position: relative; z-index: 1; width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--surface-raised); border: 1px solid var(--line-strong); color: var(--ink-muted);
  font: 600 14px/1 var(--font-sans); transition: background-color 260ms ease, border-color 260ms ease, color 260ms ease, transform 260ms var(--ease);
}
.flow-item.is-done .flow-num { border-color: var(--accent); color: var(--accent); }
.flow-item.is-done .flow-btn { color: var(--ink); }
.flow-item.is-active .flow-num { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); transform: scale(1.06); }
.flow-item.is-active .flow-btn { color: var(--ink); font-weight: 600; }
.flow-panel { display: grid; gap: var(--space-2); margin: var(--space-1) 0 var(--space-3) 56px; color: var(--ink-muted); animation: rise 360ms var(--ease); }
.flow-panel p { margin: 0; max-width: 46ch; }
@media (min-width: 560px) { .flow-panel { grid-template-columns: 1fr 120px; align-items: center; gap: var(--space-3); } }

/* Small step visuals (play while their step is open) */
.viz { width: 120px; height: 72px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viz rect { fill: var(--line); stroke: none; }
.viz .v-dot { fill: currentColor; stroke: none; }
.viz-target circle:not(.v-dot) { opacity: .5; }
.is-active .viz-target circle:nth-child(1) { animation: pulse 1.8s var(--ease) infinite; transform-origin: 60px 36px; }
.viz-verify .v-check { stroke-dasharray: 20; stroke-dashoffset: 20; }
.is-active .viz-verify g:nth-child(1) .v-check { animation: draw 400ms var(--ease) 200ms forwards; }
.is-active .viz-verify g:nth-child(2) .v-check { animation: draw 400ms var(--ease) 600ms forwards; }
.is-active .viz-verify g:nth-child(3) .v-check { animation: draw 400ms var(--ease) 1000ms forwards; }
.viz-signals .v-arc { opacity: 0; }
.is-active .viz-signals .a1 { animation: blink 1.8s ease infinite; }
.is-active .viz-signals .a2 { animation: blink 1.8s ease .3s infinite; }
.viz-write .v-line { fill: currentColor; opacity: .85; transform: scaleX(0); transform-origin: 10px 0; transform-box: view-box; }
.is-active .viz-write .l1 { animation: grow 600ms var(--ease) 100ms forwards; }
.is-active .viz-write .l2 { animation: grow 600ms var(--ease) 600ms forwards; }
.is-active .viz-write .l3 { animation: grow 500ms var(--ease) 1100ms forwards; }
.viz-warm path { opacity: .5; }
.viz-warm .v-needle path { opacity: 1; }
.viz-warm .v-needle { transform-origin: 60px 62px; transform: rotate(-70deg); }
.is-active .viz-warm .v-needle { animation: needle 2.4s var(--ease) forwards; }
.viz-send .v-pkt { fill: currentColor; }
.is-active .viz-send .v-pkt { animation: travel 2.4s linear infinite; }
.is-active .viz-send .p2 { animation-delay: .8s; }
.is-active .viz-send .p3 { animation-delay: 1.6s; }
.viz-send .v-pkt { opacity: 0; }
.viz-route .v-dot { offset-rotate: 0deg; opacity: 0; }
.viz-route .r1 { offset-path: path("M8 36h36c14 0 18-22 34-22h34"); }
.viz-route .r2 { offset-path: path("M8 36h36c14 0 18 22 34 22h34"); }
.is-active .viz-route .r1 { animation: route 2.2s var(--ease) infinite; }
.is-active .viz-route .r2 { animation: route 2.2s var(--ease) 1.1s infinite; }
.viz-report .v-bar { fill: currentColor; transform-box: fill-box; transform-origin: bottom; transform: scaleY(.15); }
.is-active .viz-report .b1 { animation: bar1 900ms var(--ease) forwards; }
.is-active .viz-report .b2 { animation: bar2 900ms var(--ease) 150ms forwards; }
.is-active .viz-report .b3 { animation: bar3 900ms var(--ease) 300ms forwards; }

/* Demo */
.demo-grid { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .demo-grid { grid-template-columns: 5fr 7fr; gap: var(--space-8); align-items: start; } }
.demo-head .h2 { margin: var(--space-2) 0; }
.demo-choices { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-3) 0 var(--space-1); }
.demo-panel { display: grid; gap: var(--space-3); }
.demo-stage { opacity: .28; transition: opacity 400ms ease; }
.demo-stage.is-on { opacity: 1; }
.demo-label { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--space-1); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); }
.demo-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.demo-fact, .demo-msg, .demo-reply, .demo-report { margin: 0; padding: var(--space-2); border-radius: var(--radius-md); background: var(--surface-alt); color: var(--ink); font-size: 16px; line-height: 26px; }
[data-theme="dark"] .demo-fact, [data-theme="dark"] .demo-msg, [data-theme="dark"] .demo-reply, [data-theme="dark"] .demo-report { background: var(--brand-ink); }
.demo-msg { min-height: 132px; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: text-bottom; background: var(--accent); animation: caret 1s steps(1) infinite; }
.demo-reply { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1); }
.demo-reply-text { margin: 0; font-style: italic; }
.demo-route { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--accent); color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 600; opacity: 0; transform: translateX(-6px); transition: opacity 300ms ease, transform 300ms var(--ease); }
.demo-route.is-on { opacity: 1; transform: none; }
.demo-route::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* Beyond + chips */
.beyond { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .beyond { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; } }
.stop-q { font-weight: 600; margin-bottom: var(--space-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }

/* Principles + who */
.principles { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principles .card { display: flex; flex-direction: column; gap: var(--space-2); }
.card-tilt { transform-style: preserve-3d; }
.card-tilt:hover { box-shadow: var(--shadow-card-hover); }
.who { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.who-title { margin-bottom: var(--space-4); }
.who-cols { display: grid; gap: var(--space-4); }
.who-col p { color: var(--ink-muted); margin-top: var(--space-1); max-width: 48ch; }
@media (min-width: 768px) { .who-cols { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }

/* Booking */
.book-grid { display: grid; gap: var(--space-6); }
@media (min-width: 1000px) { .book-grid { grid-template-columns: 5fr 7fr; gap: var(--space-8); align-items: start; } .book-head { position: sticky; top: calc(var(--nav-height-compact) + var(--space-6)); } }
.book-list { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.book-list li { display: flex; gap: 12px; align-items: flex-start; }
.book-list .icon { color: var(--accent); margin-top: 2px; width: 20px; height: 20px; }
.book-note { padding: 12px var(--space-2); border-radius: var(--radius-md); background: var(--accent-soft); color: var(--ink); font-size: 15px; line-height: 24px; }
.book-note-label { font-weight: 600; }
.booker { position: relative; min-height: 560px; padding: 0; overflow: hidden; }
.cal-inline { width: 100%; min-height: 560px; overflow: auto; }
.booker-fallback, .booked { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); padding: var(--space-4); text-align: center; }
.booker-fallback .icon { color: var(--accent); margin-bottom: var(--space-1); }
.booker.is-loaded .booker-fallback { display: none; }
.booked { background: var(--surface-raised); animation: rise 400ms var(--ease); }
.booked-check { width: 72px; height: 72px; margin-bottom: var(--space-2); }
.booked-check circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 600ms var(--ease) forwards; }
.booked-check path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 400ms var(--ease) 500ms forwards; }


/* Slogan band */
.slogan-band { overflow: hidden; }
@media (min-width: 768px) { .slogan-band { padding: var(--space-16) 0; } }
.slogan-band .container { position: relative; z-index: 1; }
.slogan { font-family: var(--font-serif); font-weight: 700; color: var(--ink); font-size: clamp(52px, 1.4rem + 7.4vw, 136px); line-height: .98; letter-spacing: -0.03em; margin: 0 0 var(--space-3); max-width: 10em; text-wrap: balance; }
.slogan-steps { position: absolute; right: -40px; bottom: -2px; width: min(600px, 54vw); height: auto; fill: none; stroke: var(--line-strong); stroke-width: 2; opacity: .55; z-index: 0; }
@media (max-width: 767px) { .slogan-steps { width: 90%; opacity: .3; } }

/* Footer sign-off */
.footer-sign { margin: var(--space-6) 0 0; font-family: var(--font-serif); font-weight: 700; color: var(--ink); font-size: clamp(40px, 8.2vw, 124px); line-height: .95; letter-spacing: -0.035em; text-wrap: balance; }

/* Contact */
.contact-grid { display: grid; gap: var(--space-6); }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 6fr 5fr; gap: var(--space-8); align-items: start; } }
.contact-head .h1 { max-width: 16ch; margin-bottom: var(--space-4); }
.contact-actions { margin-bottom: var(--space-3); }
.contact-direct { color: var(--ink-muted); margin-bottom: var(--space-3); }
.contact-form { display: grid; gap: var(--space-2); }
.contact-form .card-title { margin-bottom: var(--space-1); }
.form-submit { justify-self: start; margin-top: var(--space-1); }
.form-status { margin: 0; font-size: 15px; line-height: 22px; min-height: 22px; display: flex; gap: 8px; align-items: center; }
.form-status.is-ok { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: var(--space-3); align-items: center; }
.footer-brand { display: flex; align-items: center; gap: var(--space-2); }
.footer-brand p { margin: 0; max-width: 40ch; }
.footer-legal { display: flex; gap: var(--space-3); flex-wrap: wrap; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1fr auto auto; gap: var(--space-6); } }

/* Scroll progress: a staircase that fills */
.progress { position: fixed; right: 16px; bottom: 20px; z-index: 40; display: none; align-items: flex-end; gap: 3px; opacity: .9; pointer-events: none; }
.progress span { width: 5px; border-radius: 1px; background: var(--line); transition: background-color 300ms ease; }
.progress span:nth-child(1) { height: 6px; } .progress span:nth-child(2) { height: 11px; } .progress span:nth-child(3) { height: 16px; }
.progress span:nth-child(4) { height: 21px; } .progress span:nth-child(5) { height: 26px; } .progress span:nth-child(6) { height: 31px; }
.progress span.on { background: var(--accent); }
@media (min-width: 768px) { .progress { display: flex; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: var(--space-3); z-index: 120; transform: translateX(-50%); padding: 12px 20px; border-radius: var(--radius-md); background: var(--brand-ink); color: var(--brand-white); box-shadow: 0 12px 32px rgba(0,0,0,.2); font-size: 15px; animation: rise 300ms var(--ease); max-width: calc(100% - 32px); }
[data-theme="dark"] .toast { background: var(--brand-panel); border: 1px solid var(--line); }

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 5. Opening animation ---------- */
.intro-overlay, .intro-skip { display: none; }
.intro .intro-overlay { display: block; position: fixed; inset: 0; z-index: 100; background: var(--surface); transition: background-color 600ms ease; }
.intro .intro-overlay.is-gliding { background-color: transparent; }
.intro .intro-skip {
  display: inline-flex; position: fixed; right: var(--space-3); bottom: var(--space-3); z-index: 101; align-items: center;
  min-height: var(--tap-min); padding: 0 var(--space-2); border-radius: var(--radius-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 500 15px/20px var(--font-sans); cursor: pointer;
}
.intro .nav-logo .logo { visibility: hidden; }
.intro-logo { position: absolute; left: 50%; top: 50%; width: min(46vw, 200px); aspect-ratio: 474 / 483; transform: translate(-50%, -50%); transform-origin: 0 0; }
.intro-logo.is-gliding { transition: transform 700ms var(--ease); }
.intro-step, .intro-square, .intro-word { position: absolute; display: block; }
.intro-step { background: var(--intro-step); transform: scaleY(0); transform-origin: bottom; bottom: 0.4%; backface-visibility: hidden; }
.s1 { left: .21%; width: 24.4%; height: 23.6%; animation: build 420ms var(--ease) 150ms forwards; }
.s2 { left: 24.1%; width: 24.6%; height: 47.2%; animation: build 420ms var(--ease) 450ms forwards; }
.s3 { left: 48.15%; width: 24%; height: 70.81%; animation: build 420ms var(--ease) 750ms forwards; }
.intro-square { left: 75.53%; top: 0; width: 24.26%; height: 23.81%; background: var(--logo-orange); opacity: 0; transform: translateY(-160%); animation: drop 620ms var(--ease) 1150ms forwards; }
.intro-word { left: 79.54%; top: 29.4%; width: 20.25%; height: 69.57%; opacity: 0; transform: translateY(14%); animation: slidein 420ms var(--ease) 1650ms forwards; }
.intro-word-dark { display: none; }
.intro-slogan { position: absolute; left: 0; right: 0; top: calc(50% + min(23.5vw, 102px) + 28px); margin: 0; text-align: center; font-family: var(--font-serif); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.015em; color: var(--ink); opacity: 0; transform: translateY(10px); animation: slidein 520ms var(--ease) 1950ms forwards; }
[data-theme="dark"] .intro-word-dark { display: block; }
[data-theme="dark"] .intro-word-light { display: none; }
.intro .hero .w { display: inline-block; opacity: 0; transform: translateY(.3em); }
.intro.words .hero .w { animation: wordin 520ms var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }

/* Keyframes */
@keyframes build { to { transform: scaleY(1); } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-160%); } 20% { opacity: 1; } 70% { transform: translateY(6%); } 85% { transform: translateY(-2%); } 100% { opacity: 1; transform: none; } }
@keyframes slidein { to { opacity: 1; transform: none; } }
@keyframes wordin { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.08); opacity: .9; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes needle { to { transform: rotate(35deg); } }
@keyframes travel { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(108px); opacity: 0; } }
@keyframes route { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes bar1 { to { transform: scaleY(.45); } }
@keyframes bar2 { to { transform: scaleY(.7); } }
@keyframes bar3 { to { transform: scaleY(1); } }
@keyframes caret { 50% { opacity: 0; } }

/* Reduced motion: everything settles instantly, nothing loops */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .motif-nodes { display: none; }
  .viz-send .v-pkt, .viz-route .v-dot { opacity: 1; animation: none !important; }
  .caret { display: none; }
}

/* Theme toggle shows the theme you will switch to */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon { animation: turn 320ms var(--ease); }
@keyframes turn { from { transform: rotate(-60deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Simple text pages (privacy, 404) */
.page { padding: var(--space-8) 0 var(--space-12); }
.page .container { max-width: 760px; }
.page h1 { margin-bottom: var(--space-3); }
.page h2 { font-family: var(--font-serif); font-size: 24px; line-height: 1.3; margin: var(--space-6) 0 var(--space-2); }
.page p, .page li { color: var(--ink-muted); }
.page ul { padding-left: 1.2em; margin: 0 0 var(--space-2); }
.page li { margin-bottom: var(--space-1); }
.page .link { color: var(--accent); }
.nav-simple .nav-actions { margin-left: auto; }
