/* Codevisra Labs homepage
   Brand: Outfit, Ink #16213E, Gold #F2B705, Gold Deep #E3A600, Cream #FBF6E6
   Shape rule: interactive controls are pills, containers are 24px, form inputs are 12px. */

/* ---------- Fonts (self-hosted Outfit variable, SIL OFL) ---------- */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #16213E;
  --gold: #F2B705;
  --gold-deep: #E3A600;
  --cream: #FBF6E6;

  --bg: var(--cream);
  --surface: #FFFDF6;
  --surface-2: #F4ECD4;
  --text: var(--ink);
  --muted: #4A5470;
  --line: #E6DCBF;
  --field-border: #8C8FA0;
  --focus: var(--ink);
  --comet-tail: var(--ink);
  --comet-dot: var(--gold-deep);
  --tile-ink: var(--ink);
  --tile-ink-text: var(--cream);
  --tile-ink-muted: #C5CBDD;
  --shadow: 0 1px 0 rgb(22 33 62 / 0.04), 0 18px 40px -24px rgb(22 33 62 / 0.28);
  --hero-field: url("../assets/pattern/meteor-light-field.svg");
  --tile-field: url("../assets/pattern/meteor-ink-field.svg");
  --error: #A3261B;

  --radius-box: 24px;
  --radius-field: 12px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --surface: #1C2848;
    --surface-2: #22305A;
    --text: var(--cream);
    --muted: #B9C0D6;
    --line: #2C3B68;
    --field-border: #6E7A9E;
    --focus: var(--gold);
    --comet-tail: var(--cream);
    --comet-dot: var(--gold);
    --tile-ink: #0F1830;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 18px 40px -24px rgb(0 0 0 / 0.6);
    --hero-field: url("../assets/pattern/meteor-ink-field.svg");
    --error: #FF9C8F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --surface: #1C2848;
  --surface-2: #22305A;
  --text: var(--cream);
  --muted: #B9C0D6;
  --line: #2C3B68;
  --field-border: #6E7A9E;
  --focus: var(--gold);
  --comet-tail: var(--cream);
  --comet-dot: var(--gold);
  --tile-ink: #0F1830;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 18px 40px -24px rgb(0 0 0 / 0.6);
  --hero-field: url("../assets/pattern/meteor-ink-field.svg");
  --error: #FF9C8F;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Shown only if content.js fails to load */
.content-error { margin: 0; padding: 16px 24px; background: var(--gold); color: var(--ink); font-weight: 600; text-align: center; }

/* Logo swap per theme */
.logo-for-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-for-light { display: none; }
  :root:not([data-theme="light"]) .logo-for-dark { display: block; }
}
:root[data-theme="dark"] .logo-for-light { display: none; }
:root[data-theme="dark"] .logo-for-dark { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1rem; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 42px; padding: 0 20px; font-size: 0.95rem; }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-deep); }
.btn-primary .icon { transition: transform 0.25s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-ghost { color: var(--text); border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.btn-ghost:hover { border-color: var(--text); }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn .icon { width: 20px; height: 20px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}
.text-link .icon { transition: transform 0.25s var(--ease); }
.text-link:hover .icon { transform: translate(2px, -2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; /* z-scale: header 50, skip-link 100 */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-links .nav-links-cta { display: none; }

.theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(calc(100dvh - var(--nav-h)), 820px);
  display: flex; align-items: center;
  padding-block: 64px 80px;
  background: var(--hero-field) center / cover no-repeat;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; gap: 24px; }
.hero-title { font-size: clamp(2.5rem, 4.9vw, 4.1rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; max-width: 13.5em; }
.hero-sub { margin-top: 24px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 38ch; text-wrap: pretty; }
.hero-ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { justify-self: end; width: 100%; max-width: 520px; }
.comet { width: 100%; height: auto; overflow: visible; }
.comet-tail { fill: var(--comet-tail); }
.comet-dot { fill: var(--comet-dot); }
.comet-rays line { stroke: var(--comet-dot); stroke-width: 11; stroke-linecap: round; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 10vw, 128px); }
.section-title { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; letter-spacing: -0.03em; }
.section-lede { margin-top: 16px; max-width: 52ch; color: var(--muted); font-size: 1.15rem; }

/* Services bento: 3 items, 3 cells */
.bento {
  margin-top: 56px; display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
}
.tile { border-radius: var(--radius-box); padding: clamp(28px, 3.4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.tile h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 700; }
.tile p { max-width: 42ch; }
.tile-icon { width: 44px; height: 44px; fill: currentColor; margin-bottom: 12px; }

.tile-web {
  grid-row: span 2; min-height: 460px; justify-content: flex-end;
  background: var(--tile-field) 70% 30% / 240% auto no-repeat, var(--tile-ink);
  color: var(--tile-ink-text);
  border: 1px solid var(--line);
}
.tile-web .tile-icon { color: var(--gold); margin-bottom: auto; }
.tile-web p { color: var(--tile-ink-muted); }
.tile-auto { background: var(--gold); color: var(--ink); }
.tile-auto p { color: #2A3350; }
.tile-custom { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile-custom p { color: var(--muted); }
.tile-custom .tile-icon { color: var(--comet-dot); }

.ticks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.ticks .icon { color: var(--gold); }

/* Use cases: tab list + detail panel */
.use-cases { padding-top: 0; }
.uc {
  margin-top: 48px; display: grid; gap: 20px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch;
}
.uc-tabs { display: grid; gap: 6px; align-content: start; }
.uc-tab {
  display: grid; gap: 4px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); background: transparent;
  padding: 16px 20px 16px 22px; border: 0; border-radius: 16px;
  position: relative; transition: background-color 0.2s var(--ease);
}
.uc-tab::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
  background: var(--comet-dot); transform: scaleY(0); transition: transform 0.3s var(--ease);
}
.uc-tab:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.uc-tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow); }
.uc-tab[aria-selected="true"]::before { transform: scaleY(1); }
.uc-industry { font-size: 0.9rem; color: var(--muted); }
.uc-tab-title { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }

.uc-panels { display: grid; }
.uc-panel {
  border-radius: var(--radius-box); padding: clamp(28px, 4vw, 48px);
  background: var(--tile-field) 85% 15% / 220% auto no-repeat, var(--tile-ink);
  color: var(--tile-ink-text); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 20px;
}
.uc-panel[hidden] { display: none; }
.uc-panel h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; max-width: 20ch; }
.uc-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.uc-tags li { padding: 5px 14px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.uc-blocks { margin: 8px 0 0; display: grid; gap: 20px; }
.uc-block dt { font-weight: 600; color: var(--gold); font-size: 0.95rem; }
.uc-block dd { margin: 4px 0 0; color: var(--tile-ink-muted); max-width: 52ch; }
.uc-result dd { color: var(--tile-ink-text); font-weight: 500; }

/* Video demos: featured player + playlist */
.demo-layout { margin-top: 48px; display: grid; gap: 28px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.demo-layout.demo-single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.demo-player {
  aspect-ratio: 16 / 9; border-radius: var(--radius-box); overflow: hidden;
  background: var(--tile-ink); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.demo-player iframe, .demo-player video { width: 100%; height: 100%; border: 0; display: block; background: #0B1122; }
.demo-poster {
  width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--tile-field) center / cover no-repeat, var(--tile-ink);
  background-size: cover; background-position: center;
}
.demo-play {
  width: 84px; height: 84px; border-radius: 999px; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); box-shadow: 0 12px 30px -10px rgb(11 17 34 / 0.6);
  transition: transform 0.25s var(--ease), background-color 0.2s;
}
.demo-play .icon { width: 30px; height: 30px; margin-left: 4px; }
.demo-poster:hover .demo-play { transform: scale(1.06); background: var(--gold-deep); }
.demo-poster:active .demo-play { transform: scale(0.97); }
.demo-soon {
  width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--tile-field) center / cover no-repeat, var(--tile-ink); color: var(--tile-ink-text);
}
.demo-soon img { width: 64px; height: auto; }
.demo-soon p { font-weight: 600; font-size: 1.1rem; }
.demo-soon-sm { gap: 0; }
.demo-soon-sm .icon { width: 26px; height: 26px; color: var(--gold); }
.demo-title { margin-top: 22px; font-size: 1.5rem; font-weight: 700; }
.demo-text { margin-top: 8px; color: var(--muted); max-width: 60ch; }

.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-item {
  width: 100%; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
  padding: 10px; border-radius: 18px; border: 1px solid transparent; background: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.demo-item:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.demo-item[aria-current="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.demo-thumb {
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--tile-ink); color: var(--gold);
}
.demo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.demo-meta { display: grid; gap: 4px; }
.demo-item-title { font-weight: 600; line-height: 1.3; }
.demo-item-sub { font-size: 0.9rem; color: var(--muted); }

/* Automation examples marquee */
.examples { padding-bottom: clamp(64px, 8vw, 96px); }
.marquee {
  margin-top: 40px; display: flex; overflow: hidden; gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex: none; min-width: 100%; }
.marquee-track li {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 14px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 500;
}
.marquee-track .icon { color: var(--comet-dot); }

/* Process timeline */
.timeline {
  list-style: none; padding: 0; margin: 56px 0 0; position: relative;
  display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 32px;
  padding-top: 44px;
}
/* The comet trail: a line that draws left to right, gold head at the end */
.timeline::before {
  content: ""; position: absolute; left: 0; right: 14px; top: 6px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 55%, transparent));
  transform-origin: left; transform: scaleX(var(--trail, 1));
  transition: transform 1.4s var(--ease);
}
.timeline::after {
  content: ""; position: absolute; right: 0; top: -2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--comet-dot);
  opacity: var(--trail, 1); transition: opacity 0.4s 1.2s;
}
.timeline h3 { font-size: 1.5rem; font-weight: 700; }
.timeline p { margin-top: 10px; color: var(--muted); max-width: 30ch; }

/* Commitments: sticky heading */
.promises { background: var(--surface-2); }
.promises-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.promises-head { position: sticky; top: calc(var(--nav-h) + 40px); display: grid; gap: 28px; justify-items: start; }
.promises-list { display: grid; gap: 0; }
.promise { padding-block: 32px; border-top: 1px solid color-mix(in srgb, var(--text) 16%, transparent); }
.promise:first-child { border-top: 0; padding-top: 0; }
.promise h3 { font-size: 1.45rem; font-weight: 600; }
.promise p { margin-top: 10px; color: var(--muted); max-width: 52ch; }

/* FAQ */
.faq-wrap { max-width: 860px; }
.faq-list { margin-top: 40px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 24px; font-size: 1.2rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; transition: transform 0.3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--muted); max-width: 62ch; }

/* Contact */
.contact { padding-top: 0; }
.contact-panel {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-box);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-intro p { margin-top: 16px; color: var(--muted); max-width: 36ch; }
.contact-email { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--field-border); border-radius: var(--radius-field);
  padding: 12px 14px; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: 0.9rem; color: var(--muted); }
.field-error { font-size: 0.9rem; color: var(--error); font-weight: 500; }

.form-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 4px; }
.form-status { font-weight: 500; color: var(--muted); }
.form-status.is-error { color: var(--error); }
.btn .spin { display: none; }
.is-sending .btn .spin { display: block; animation: spin 0.8s linear infinite; }
.is-sending .btn { pointer-events: none; opacity: 0.85; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 32px; align-items: start; }
.footer-brand img { height: 36px; width: auto; }
.footer-brand p { margin-top: 14px; color: var(--muted); max-width: 34ch; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-legal { color: var(--muted); font-size: 0.95rem; }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes comet-in { from { opacity: 0; transform: translate(-300px, 210px); } to { opacity: 1; transform: none; } }
@keyframes rays-in { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(calc(-100% - 14px)); } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: copy rises in sequence, then the brand comet streaks into place */
  .load-in { animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 80ms); }
  .comet-body { animation: comet-in 1.3s var(--ease) 0.3s both; }
  .comet-rays { transform-box: view-box; transform-origin: 1305.6px 388.8px; animation: rays-in 0.6s var(--ease) 1.25s both; }

  /* Scroll reveal (only when JS is running, so content is never hidden without it) */
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .timeline:not(.is-visible) { --trail: 0; }

  .uc-panel:not([hidden]) { animation: panel-in 0.45s var(--ease); }
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { flex-wrap: wrap; min-width: 0; padding-inline: 24px; max-width: 1240px; margin-inline: auto; }
  .marquee-track[aria-hidden="true"] { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 24px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding-block: 14px; font-size: 1.1rem; color: var(--text); }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }

  .hero { min-height: 0; padding-block: 48px 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 300px; margin-bottom: 8px; }

  .bento { grid-template-columns: 1fr; }

  /* Use cases: tabs become a horizontal scroll row above the panel */
  .uc { grid-template-columns: 1fr; }
  .uc-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding: 4px 2px 10px; scrollbar-width: thin; }
  .uc-tab { flex: 0 0 auto; width: min(72vw, 260px); scroll-snap-align: start; border: 1px solid var(--line); }
  .uc-tab::before { left: 14px; right: 14px; top: auto; bottom: 0; width: auto; height: 3px; transform: scaleX(0); }
  .uc-tab[aria-selected="true"]::before { transform: scaleX(1); }

  .demo-layout { grid-template-columns: 1fr; }
  .tile-web { grid-row: auto; min-height: 380px; }

  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .promises-grid, .contact-panel { grid-template-columns: 1fr; gap: 40px; }
  .promises-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .container { padding-inline: 16px; }
  .nav-links { padding-inline: 16px; }
  .timeline { grid-template-columns: 1fr; padding-top: 0; padding-left: 36px; }
  .timeline::before { left: 7px; right: auto; top: 0; bottom: 14px; width: 3px; height: auto; transform-origin: top; transform: scaleY(var(--trail, 1)); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--text) 55%, transparent)); }
  .timeline::after { right: auto; left: 0; top: auto; bottom: 0; }
  .contact-form { grid-template-columns: 1fr; }
  .demo-item { grid-template-columns: 112px minmax(0, 1fr); }
  .demo-play { width: 64px; height: 64px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav-cta { display: none; }
  .nav-links .nav-links-cta { display: flex; justify-content: center; margin-top: 8px; padding-block: 12px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 600; text-decoration: none; }
  .nav-logo img { height: 34px; }
  .hero-ctas .btn { width: 100%; }
}
