/* Rivlet website. The product's own vocabulary: warm paper, deep navy ink,
   an amber accent and numbered mono labels, set large on a strict grid. */

:root {
  color-scheme: light dark;
  --bg: #f3f1ec;
  --bg-alt: #ebe8e1;
  --surface: #fbfaf7;
  --ink: #0f1626;
  --muted: #4a5263;
  --rule: #d8d3c8;
  --rule-strong: #b9b3a6;
  --accent: #d98a00;
  --accent-ink: #8f5400;
  --on-accent: #0f1626;
  --focus: #0f1626;
  --navy: #0f1626;
  --navy-2: #172036;
  --on-navy: #f3f1ec;
  --on-navy-muted: #b9bfcc;
  --navy-rule: rgba(243, 241, 236, 0.16);
  --bezel: #151b27;
  --bezel-edge: #2c3446;
  --bar: #e4e0d7;
  --bar-dot: #c3bdb1;
  --shadow: 0 1px 2px rgba(15, 22, 38, 0.06), 0 18px 40px -18px rgba(15, 22, 38, 0.32);
  --shadow-soft: 0 1px 2px rgba(15, 22, 38, 0.05), 0 10px 24px -14px rgba(15, 22, 38, 0.25);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2.4vw, 32px);
  --section: clamp(72px, 10vw, 144px);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1222;
    --bg-alt: #0e1628;
    --surface: #121a2c;
    --ink: #ece8df;
    --muted: #a7afbf;
    --rule: #232d44;
    --rule-strong: #34405c;
    --accent: #d98a00;
    --accent-ink: #e39a1c;
    --on-accent: #0f1626;
    --focus: #e39a1c;
    --navy: #070c18;
    --navy-2: #0f1729;
    --bezel: #03060c;
    --bezel-edge: #1f2738;
    --bar: #1b2438;
    --bar-dot: #3a4560;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.75);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  }
}

/* ----- base ------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "kern", "liga", "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 0.9em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent); }
code { font: 500 0.92em/1.4 var(--mono); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.section--navy :focus-visible, .hero :focus-visible, .tv-band :focus-visible, .lightbox :focus-visible { outline-color: #f0b04a; }
::selection { background: var(--accent); color: var(--on-accent); }

.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; text-decoration: none; font: 600 0.875rem var(--sans); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.mono, .tag, .eyebrow, .mono-note, .pill { font-family: var(--mono); }
.small { font-size: 0.875rem; line-height: 1.55; color: var(--muted); }

/* ----- header ----------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wordmark {
  font: 700 1.125rem/1 var(--mono); letter-spacing: 0.08em; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: baseline; padding: 6px 0;
}
.wordmark span { color: var(--accent); margin-left: 0.04em; }
.site-nav { margin-left: auto; position: relative; }
.site-nav ul { display: flex; gap: 2px; }
.site-nav a {
  display: block; padding: 22px 10px 20px; text-decoration: none;
  font: 500 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.site-nav a .n { color: var(--accent-ink); margin-right: 4px; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="location"] { color: var(--ink); border-bottom-color: var(--accent); }
.menu-button { display: none; }
.header-cta { flex: none; }

@media (max-width: 1080px) {
  .site-nav { margin-left: auto; }
  .menu-button {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
    background: transparent; border: 1px solid var(--rule-strong); border-radius: 6px; cursor: pointer;
    font: 600 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  }
  .menu-button::before { content: ""; width: 14px; height: 10px; background: linear-gradient(currentColor 0 0) top/100% 2px no-repeat, linear-gradient(currentColor 0 0) center/100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom/100% 2px no-repeat; }
  .site-nav ul {
    display: none; position: absolute; right: 0; top: calc(100% + 14px); min-width: 230px;
    flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow);
  }
  .site-nav.open ul { display: flex; }
  .site-nav a { padding: 12px 12px; border-bottom: 0; border-radius: 6px; }
  .site-nav a[aria-current="location"] { background: var(--bg-alt); }
  .header-row { gap: 12px; }
}
@media (max-width: 420px) {
  .header-cta .mono-note { display: none; }
}

/* ----- buttons ---------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px;
  border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font: 600 1rem/1.2 var(--sans); letter-spacing: -0.005em; text-align: left;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn--small { min-height: 36px; padding: 6px 12px; font-size: 0.8125rem; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #e89a12; }
.btn--outline { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--ink); }
.btn--outline-light { border-color: rgba(243, 241, 236, 0.35); color: var(--on-navy); background: transparent; }
.btn--outline-light:hover { border-color: var(--on-navy); }
.btn--text { padding: 0; min-height: 32px; background: none; border: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.25em; }
.mono-note { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.btn .dur { font: 500 0.75rem/1 var(--mono); }
.icon-play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; flex: none; }
.icon-pause { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ----- the hero --------------------------------------------------------------------- */

.hero {
  position: relative; color: var(--on-navy); background: var(--navy);
  padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(243, 241, 236, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 241, 236, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
.hero .wrap { position: relative; }
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .n { color: var(--accent-ink); }
.eyebrow--hero, .eyebrow--light { color: var(--on-navy-muted); }
.eyebrow--light .n { color: var(--accent); }
.pill {
  display: inline-block; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--accent);
  color: #f0b04a; background: rgba(217, 138, 0, 0.12); font-weight: 600; letter-spacing: 0.1em;
}
.hero h1 {
  margin-top: 22px; max-width: 15ch;
  font-size: clamp(2.5rem, 1.1rem + 5.6vw, 6rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 750;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: clamp(24px, 3vw, 40px);
  align-items: end;
}
.hero .lead { color: var(--on-navy-muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); }
  .hero-actions { justify-content: flex-end; }
  .hero-try { text-align: right; }
}
.lead { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem); line-height: 1.5; color: var(--muted); max-width: 46ch; }

.cmd { display: grid; gap: 8px; min-width: 0; }
.cmd-line {
  display: flex; align-items: stretch; min-width: 0; max-width: 100%;
  border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); overflow: hidden;
}
.cmd-line code { flex: 1 1 auto; min-width: 0; padding: 12px 14px; white-space: pre; overflow-x: auto; font-size: 0.8125rem; scrollbar-width: thin; }
.cmd-line code::before { content: "$ "; color: var(--accent-ink); }
.copy {
  flex: none; border: 0; border-left: 1px solid var(--rule-strong); background: transparent; padding: 0 14px; cursor: pointer;
  font: 600 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.copy:hover { color: var(--ink); background: var(--bg-alt); }
.copy.done { color: var(--accent-ink); }
.hero .cmd-line { background: rgba(243, 241, 236, 0.06); border-color: rgba(243, 241, 236, 0.22); }
.hero .cmd-line code { color: var(--on-navy); }
.hero .cmd-line code::before { color: var(--accent); }
.hero .copy { color: var(--on-navy-muted); border-left-color: rgba(243, 241, 236, 0.22); }
.hero .copy:hover { color: var(--on-navy); background: rgba(243, 241, 236, 0.08); }
.hero .copy.done { color: #f0b04a; }
.hero-try { flex: 1 1 100%; font-size: 0.9375rem; line-height: 1.55; color: var(--on-navy-muted); }
.hero-try a { color: var(--on-navy); text-underline-offset: 3px; }
.hero-try code { color: #f0b04a; font-size: 0.9em; }

.hero-film { margin: clamp(36px, 5vw, 64px) 0 0; }
.film-frame {
  position: relative; border-radius: 12px; overflow: hidden; background: #0f1626;
  box-shadow: 0 0 0 1px rgba(243, 241, 236, 0.14), 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 9;
}
.film-frame video { width: 100%; height: 100%; object-fit: cover; }
.hero-chapters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.hero-chapters button {
  width: 100%; display: grid; gap: 8px; padding: 6px 0 4px; background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--on-navy-muted); font: 500 0.6875rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-chapters .bar { display: block; height: 3px; border-radius: 2px; background: rgba(243, 241, 236, 0.18); overflow: hidden; }
.hero-chapters .bar span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.hero-chapters button.done .bar span { width: 100%; }
.hero-chapters button[aria-current="true"] { color: var(--on-navy); }
.hero-chapters button:hover { color: var(--on-navy); }
.hero-film-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 16px; align-items: start; margin-top: 18px; }
.hero-film-foot.has-toggle { grid-template-columns: auto minmax(0, 1fr); }
.hero-toggle {
  grid-row: span 2; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid rgba(243, 241, 236, 0.28); color: var(--on-navy);
  font: 600 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.hero-toggle:hover { border-color: var(--on-navy); }
.hero-cue { font-size: 1rem; line-height: 1.5; color: var(--on-navy); min-height: 3em; max-width: 80ch; }
.hero-cue .tc { font: 500 0.75rem/1 var(--mono); color: var(--accent); margin-right: 12px; letter-spacing: 0.06em; }
.hero-note { font-size: 0.8125rem; color: var(--on-navy-muted); margin: 0; }
@media (max-width: 700px) {
  .hero-chapters { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .hero-chapters .t { display: none; }
  .hero-chapters button { padding: 10px 0; }
  .hero-film-foot.has-toggle { grid-template-columns: minmax(0, 1fr); }
  .hero-toggle { grid-row: auto; justify-self: start; }
}

/* ----- sections --------------------------------------------------------------------- */

.section { padding: var(--section) 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy .lead { color: var(--on-navy-muted); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); padding-top: 20px; border-top: 1px solid var(--rule-strong); }
.section--navy .section-head { border-top-color: var(--navy-rule); }
.section-head h2 {
  font-size: clamp(2.125rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch;
}
.section-head .lead { max-width: 58ch; }
@media (min-width: 980px) {
  .section-head { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--gap); }
  .section-head .eyebrow { grid-row: span 2; align-self: start; padding-top: 0.9em; }
}
.h-display { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); line-height: 1.04; letter-spacing: -0.03em; }

/* ----- device frames ---------------------------------------------------------------- */

.frame { margin: 0; min-width: 0; }
.frame .device { position: relative; }
.frame img { width: 100%; }
.frame figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.zoom { display: block; position: relative; cursor: zoom-in; color: inherit; }
.zoom-hint {
  position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 6px;
  background: rgba(15, 22, 38, 0.82); opacity: 0; transition: opacity 0.15s;
  background-image: linear-gradient(#f3f1ec 0 0), linear-gradient(#f3f1ec 0 0);
  background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat;
}
.zoom:hover .zoom-hint, .zoom:focus-visible .zoom-hint { opacity: 1; }

.frame--browser .device {
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.frame--browser .bar {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--bar); border-bottom: 1px solid var(--rule);
}
.frame--browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--bar-dot); }
.frame--browser .bar span {
  margin-left: 10px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

.frame--tablet .device {
  background: var(--bezel); border-radius: clamp(14px, 2vw, 26px); padding: clamp(9px, 1.4vw, 18px);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--shadow);
}
.frame--tablet .device::before {
  content: ""; position: absolute; top: calc(clamp(9px, 1.4vw, 18px) / 2 - 2px); left: 50%; width: 5px; height: 5px; margin-left: -2px;
  border-radius: 50%; background: #2d3547;
}
.frame--tablet img { border-radius: 4px; }

.frame--tv .device {
  background: #04060b; padding: clamp(5px, 0.6vw, 9px); border-radius: 6px;
  box-shadow: 0 0 0 1px #262d3d, 0 40px 70px -30px rgba(0, 0, 0, 0.85);
}
.frame--tv .device::after {
  content: ""; position: absolute; left: 50%; bottom: -22px; width: 26%; height: 22px; transform: translateX(-50%);
  background: linear-gradient(#1a2030, #0c111b); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.frame--tv img { border-radius: 2px; }
.frame--tv figcaption { margin-top: 40px; }

.frame--panel .device {
  border-radius: var(--radius); overflow: hidden; background: #fbfaf7; border: 1px solid var(--rule); box-shadow: var(--shadow-soft);
}
.frame--panel figcaption, .frame--tablet figcaption, .frame--browser figcaption { max-width: 60ch; }

/* ----- 01 the order: a timeline ----------------------------------------------------- */

.journey { position: relative; display: grid; gap: clamp(56px, 8vw, 112px); counter-reset: step; }
.step { display: grid; gap: 24px; align-items: start; position: relative; }
.step-n {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border: 1px solid var(--accent); border-radius: 50%; background: var(--bg);
  font: 600 0.875rem/1 var(--mono); color: var(--accent-ink); letter-spacing: 0.04em;
}
.step h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.step-text p:not(.tag) { color: var(--muted); max-width: 44ch; }
.tag {
  margin-top: 18px !important; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink);
}
.step .frame--tablet { max-width: 640px; }
@media (min-width: 900px) {
  .journey::before {
    content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px;
    background: linear-gradient(var(--accent), var(--rule-strong));
  }
  .step { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--gap); }
  .step-text { padding-left: 76px; position: relative; padding-top: 4px; }
  .step-n { position: absolute; left: 0; top: 0; margin: 0; }
  .step .frame--tablet { justify-self: start; width: 88%; }
}
.after-journey {
  margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between;
}
.after-journey p { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; max-width: 52ch; letter-spacing: -0.01em; }

/* ----- features and cards ----------------------------------------------------------- */

.feature { display: grid; gap: clamp(24px, 3vw, 40px); align-items: center; margin-bottom: clamp(56px, 7vw, 96px); }
.feature-text h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 12px; }
.feature-text h3:not(:first-child) { margin-top: 36px; }
.feature-text p { color: var(--muted); max-width: 48ch; }
.feature-text .btn { margin-top: 24px; }
@media (min-width: 980px) {
  .feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); }
  .feature--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .feature-text { padding: 0 clamp(0px, 2vw, 24px); }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li {
  padding: 7px 11px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface);
  font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.quote {
  margin: 20px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 8px 8px 0; font-size: 1rem; line-height: 1.5; max-width: 48ch;
}

.grid-2 { display: grid; gap: clamp(40px, 5vw, 64px) var(--gap); margin-bottom: clamp(56px, 7vw, 96px); }
.grid-2:last-child { margin-bottom: 0; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card h3 { font-size: 1.3125rem; line-height: 1.2; letter-spacing: -0.015em; margin: 26px 0 10px; }
.card p { color: var(--muted); max-width: 52ch; }
.card .btn--text { margin-top: 12px; }
.grid-2--panels { align-items: start; margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 760px) { .grid-2--panels { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ----- TV band ---------------------------------------------------------------------- */

.tv-band { background: var(--navy); color: var(--on-navy); padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 128px); margin: clamp(56px, 7vw, 96px) 0; }
.tv-grid { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
.tv-text h3 { margin: 16px 0 20px; }
.tv-text p { color: var(--on-navy-muted); max-width: 46ch; }
.tv-text .btn { margin-top: 28px; }
.tv-band figcaption { color: var(--on-navy-muted); }
@media (min-width: 980px) { .tv-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--gap); } }

/* ----- 04 pipeline ------------------------------------------------------------------ */

.pipeline { display: grid; gap: clamp(40px, 5vw, 56px) var(--gap); }
@media (min-width: 700px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pipeline li { position: relative; display: flex; flex-direction: column; }
.pipe-n {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-strong);
  font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.pipe-n span { color: var(--accent-ink); }
@media (min-width: 1100px) {
  .pipeline li:not(:last-child) .pipe-n::after {
    content: ""; position: absolute; right: calc(var(--gap) / -2 - 5px); top: 2px; width: 10px; height: 10px;
    border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
  }
}
.pipeline .frame { margin-bottom: 18px; }
.pipeline li > p:last-child { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.pipeline .frame--tablet .device { border-radius: 14px; padding: 9px; }

/* ----- 05 trust --------------------------------------------------------------------- */

.trust-grid { display: grid; gap: clamp(40px, 5vw, 64px); align-items: start; }
@media (min-width: 980px) { .trust-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); } }
.roles table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.roles caption { caption-side: top; text-align: left; font-size: 0.875rem; line-height: 1.5; color: var(--muted); padding-bottom: 14px; }
.roles th, .roles td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.roles thead th { font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule-strong); }
.roles td { text-align: right; font: 600 1.0625rem/1 var(--mono); }
.roles tbody tr:last-child td { color: var(--accent-ink); }
.roles .small { margin-top: 16px; }
.facts { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts li { background: var(--bg); padding: clamp(20px, 2.4vw, 28px); }
.facts h3 { font-size: 1.125rem; letter-spacing: -0.01em; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.facts h3::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); transform: translateY(-1px); }
.facts p { color: var(--muted); font-size: 0.9688rem; line-height: 1.55; }

/* ----- 06 tiles --------------------------------------------------------------------- */

.tiles { display: grid; gap: 1px; background: var(--rule-strong); border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tiles li { background: var(--bg-alt); padding: clamp(22px, 2.6vw, 32px); min-height: 190px; }
.tile-k { font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px !important; display: flex; gap: 10px; align-items: center; }
.tile-k::before { content: "/"; color: var(--accent-ink); font-weight: 700; }
.tiles p:not(.tile-k) { color: var(--muted); font-size: 0.9688rem; line-height: 1.55; }

/* ----- 07 watch --------------------------------------------------------------------- */

.watch-group {
  display: flex; align-items: center; gap: 14px; margin: clamp(48px, 6vw, 72px) 0 24px;
  font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.watch-group::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-head + .watch-group { margin-top: 0; }
.watch-grid { display: grid; gap: clamp(28px, 3vw, 36px) var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .watch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.watch-card {
  display: grid; gap: 14px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit;
}
.watch-card .poster {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0f1626;
  box-shadow: 0 0 0 1px var(--rule), var(--shadow-soft);
}
.watch-card .poster img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.watch-card .play {
  position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6); transition: transform 0.2s;
}
.watch-card .play::after {
  content: ""; position: absolute; left: 15px; top: 12px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #0f1626;
}
.watch-card:hover .play, .watch-card:focus-visible .play { transform: scale(1.08); }
@media (prefers-reduced-motion: no-preference) { .watch-card:hover .poster img { transform: scale(1.025); } }
.watch-card .meta { display: grid; gap: 6px; }
.watch-card .mono { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); font-weight: 500; }
.watch-grid:not(.watch-grid--feature) .watch-card .area { display: none; }
.watch-card .title { font-weight: 650; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; }
.watch-card .desc { color: var(--muted); font-size: 0.9063rem; line-height: 1.5; }
@media (max-width: 639px) {
  .watch-grid:not(.watch-grid--feature) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .watch-grid:not(.watch-grid--feature) .desc { display: none; }
  .watch-grid:not(.watch-grid--feature) .title { font-size: 0.9375rem; }
  .watch-grid:not(.watch-grid--feature) .play { transform: scale(0.8); left: 6px; bottom: 6px; }
}
@media (min-width: 1100px) {
  .watch-grid--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-grid--feature .title { font-size: 1.375rem; }
}

/* ----- try: the demo accounts -------------------------------------------------------- */

.try-grid { display: grid; gap: clamp(32px, 4vw, 48px); align-items: start; }
@media (min-width: 980px) { .try-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); } }
.try-access {
  display: grid; gap: 20px; justify-items: start; min-width: 0;
  padding: clamp(20px, 2.4vw, 28px); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
@media (min-width: 980px) { .try-access { position: sticky; top: 96px; } }
.try-cred { display: grid; gap: 16px; width: 100%; }
.try-cred dt { font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.try-cred dd { margin: 0; font: 600 1.0625rem/1.3 var(--mono); overflow-wrap: anywhere; }
.try-cred dd a { color: var(--accent-ink); text-underline-offset: 3px; }
.try-cred .cmd-line { width: 100%; }
.cmd-line--plain code { font-size: 1rem; }
.cmd-line--plain code::before { content: none; }
.try-access .small { max-width: 40ch; }

.accounts table { width: 100%; border-collapse: collapse; }
.accounts caption { caption-side: top; text-align: left; font-size: 0.875rem; line-height: 1.5; color: var(--muted); padding-bottom: 14px; }
.accounts th, .accounts td { text-align: left; vertical-align: top; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--rule); }
.accounts th:last-child, .accounts td:last-child { padding-right: 0; }
.accounts thead th { white-space: nowrap; font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule-strong); }
.accounts tbody th code { display: block; font: 600 1rem/1.2 var(--mono); color: var(--accent-ink); }
.accounts tbody th span, .accounts .role span { display: block; margin-top: 4px; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.accounts .role { font-weight: 600; white-space: nowrap; }
.accounts td:last-child { color: var(--muted); font-size: 0.9688rem; line-height: 1.5; }
@media (max-width: 719px) {
  .accounts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .accounts tr { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr); gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .accounts th, .accounts td { display: block; padding: 0; border: 0; }
  .accounts tbody th { grid-row: span 2; }
  .accounts .role { white-space: normal; }
}

.floor-cred { margin-top: clamp(40px, 5vw, 64px); padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.floor-cred h3 { font-size: 1.125rem; letter-spacing: -0.01em; margin-bottom: 18px; }
.floor-cred ul { display: grid; gap: 20px; }
@media (min-width: 900px) { .floor-cred ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); } }
.floor-k { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 10px; }
.floor-cred li p:not(.floor-k) { color: var(--muted); font-size: 0.9688rem; line-height: 1.55; }
.floor-cred a { color: var(--accent-ink); overflow-wrap: anywhere; }

/* ----- run -------------------------------------------------------------------------- */

.run-grid { display: grid; gap: clamp(32px, 4vw, 48px) var(--gap); }
@media (min-width: 900px) { .run-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .run-item--wide { grid-column: 1 / -1; } }
.run-item { display: grid; gap: 14px; align-content: start; justify-items: start; padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.run-item > p:not(.run-k):not(.small) { color: var(--muted); max-width: 52ch; }
.run-k { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; display: flex; gap: 10px; }
.run-k span { color: var(--accent-ink); }
.run .cmd { width: 100%; max-width: 860px; }
@media (max-width: 639px) {
  .cmd-line code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* ----- footer ----------------------------------------------------------------------- */

.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--rule); }
.footer-row { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer-row { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: var(--gap); } }
.wordmark--footer { font-size: 1.375rem; margin-bottom: 8px; }
.footer-links { display: grid; gap: 8px; font-size: 0.9375rem; }
.footer-note { max-width: 60ch; }

/* ----- lightbox --------------------------------------------------------------------- */

.lightbox {
  width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 12px;
  background: #0b1120; color: #f3f1ec; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8); overflow: auto;
}
.lightbox::backdrop { background: rgba(5, 8, 16, 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox-inner { padding: clamp(16px, 2.4vw, 28px); }
.lightbox-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; }
.lightbox-k { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: #f0b04a; margin-bottom: 6px !important; }
.lightbox-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.2; letter-spacing: -0.02em; }
.lightbox-close {
  flex: none; width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(243, 241, 236, 0.28); background: transparent; color: #f3f1ec; cursor: pointer;
  font-size: 1.5rem; line-height: 1;
}
.lightbox-close:hover { border-color: #f3f1ec; }
.lightbox video, .lightbox .lightbox-img { width: 100%; height: auto; max-height: calc(100dvh - 220px); border-radius: 6px; background: #000; object-fit: contain; }
.lightbox .lightbox-img { background: transparent; }
.lightbox-desc { margin-top: 14px; color: #c3c8d3; max-width: 80ch; font-size: 0.9375rem; }
.lightbox-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lightbox-chapters button {
  display: inline-flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(243, 241, 236, 0.22); background: transparent; color: #dfe2e8; font: 500 0.8125rem/1.2 var(--sans);
}
.lightbox-chapters button .t { font: 500 0.6875rem/1 var(--mono); color: #f0b04a; }
.lightbox-chapters button[aria-current="true"] { border-color: #d98a00; background: rgba(217, 138, 0, 0.14); color: #fff; }
.lightbox-chapters button:hover { border-color: #f3f1ec; }
.lightbox video::cue { font-family: var(--sans); background: rgba(5, 8, 16, 0.82); }

/* ----- motion ----------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js [data-reveal].in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .hero-film, .lightbox { display: none; }
  .hero, .section--navy, .tv-band { background: none; color: #000; }
}
