/* VideoMonk — broadcast reference-instrument.
 *
 * The whole identity is one pairing: IBM Plex Mono carries every label, readout
 * and section marker, the way the app's own control bar does, and IBM Plex Sans
 * carries prose. Surfaces are equipment panels — hairline border, a lit top
 * edge, a deep inset — rather than cards floating on nothing. The six colours
 * are the app icon's bar palette and appear only as a rule, never as decoration
 * on their own.
 */

/* ── tokens ────────────────────────────────────────────────────────────────── */

:root {
  --bg:        oklch(11% 0.008 255);
  --bg-lift:   oklch(14% 0.010 255);
  --panel:     oklch(16% 0.010 255);
  --panel-top: oklch(21% 0.012 255);
  --line:      oklch(26% 0.012 255);
  --line-soft: oklch(21% 0.010 255);

  --ink:   oklch(96% 0.004 255);
  --ink-2: oklch(74% 0.008 255);
  --ink-3: oklch(56% 0.010 255);

  --live: oklch(80% 0.19 152);
  --warn: oklch(82% 0.16 78);

  /* The icon's bars, in order. */
  --b1: oklch(83% 0.16 88);    /* amber  */
  --b2: oklch(78% 0.14 190);   /* teal   */
  --b3: oklch(78% 0.17 152);   /* green  */
  --b4: oklch(68% 0.20 300);   /* violet */
  --b5: oklch(67% 0.20 15);    /* rose   */
  --b6: oklch(68% 0.17 258);   /* blue   */

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --text-body:  clamp(1rem, 0.96rem + 0.18vw, 1.075rem);
  --text-lead:  clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --text-h1:    clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);
  --text-h2:    clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --text-h3:    clamp(1.075rem, 1rem + 0.3vw, 1.2rem);
  --text-label: 0.72rem;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --section: clamp(4rem, 2.5rem + 6vw, 8.5rem);
  --radius: 14px;

  --fast: 150ms;
  --normal: 320ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── base ──────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Scanlines, at the threshold of visible: a monitor in a dark gallery, not a
     retro-CRT costume. Fixed so it reads as the surface of the screen, not as
     texture printed on the page. */
  background-image:
    radial-gradient(120% 80% at 50% -10%, oklch(20% 0.02 255 / 0.55), transparent 62%),
    repeating-linear-gradient(
      to bottom,
      oklch(100% 0 0 / 0.014) 0 1px,
      transparent 1px 3px
    );
  background-attachment: fixed;
}

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

a { color: var(--ink); text-decoration-color: var(--line);
    text-underline-offset: 0.22em; transition: color var(--fast) var(--ease); }
a:hover { color: var(--live); text-decoration-color: currentColor; }

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

::selection { background: oklch(78% 0.17 152 / 0.28); }

/* ── layout ────────────────────────────────────────────────────────────────── */

.wrap { width: min(100% - var(--gutter) * 2, 1180px); margin-inline: auto; }
.narrow { width: min(100% - var(--gutter) * 2, 46rem); margin-inline: auto; }
/* A reading column that hugs the left edge instead of centring, so on the home
   page every band starts on the same line as the one above it. */
.col { width: min(100%, 46rem); }

.skip {
  position: absolute; left: -9999px;
  background: var(--panel); color: var(--ink);
  padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--mono); font-size: var(--text-label);
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* The six-bar rule. Appears under the header and as a section divider — the one
   place colour is allowed to be purely itself. */
.bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 2px;
  border: 0;
  margin: 0;
}
.bars i { display: block; }
.bars i:nth-child(1) { background: var(--b1); }
.bars i:nth-child(2) { background: var(--b2); }
.bars i:nth-child(3) { background: var(--b3); }
.bars i:nth-child(4) { background: var(--b4); }
.bars i:nth-child(5) { background: var(--b5); }
.bars i:nth-child(6) { background: var(--b6); }

/* ── header ────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: oklch(11% 0.008 255 / 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.site-header > .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 62px;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em; text-decoration: none; color: var(--ink);
}
.brand img { width: 26px; height: 26px; border-radius: 6px; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  font-family: var(--mono); font-size: var(--text-label);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-shadow: 0 0 18px oklch(78% 0.17 152 / 0.5); }
.site-nav .lang { color: var(--ink-3); }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); padding: 0.4rem; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }
.nav-toggle[aria-expanded="true"] .ic-burger { display: none; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 62px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-lift); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
  }
  .site-nav a { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .site-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  /* Without JS the menu must not be permanently unreachable. */
  html:not(.js) .site-nav { position: static; opacity: 1; transform: none; pointer-events: auto; }
  html:not(.js) .nav-toggle { display: none; }
}

/* ── type ──────────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: var(--text-h1); margin: 0; letter-spacing: -0.035em; }
h2 { font-size: var(--text-h2); margin: 0 0 0.9rem; }
h3 { font-size: var(--text-h3); margin: 2rem 0 0.4rem; letter-spacing: -0.01em; }
p { margin: 0 0 1.1rem; max-width: var(--measure); }
.lead { font-size: var(--text-lead); color: var(--ink-2); line-height: 1.5; }

/* The section marker: a monospace tag, the way a rack unit is labelled. */
.marker {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--mono); font-size: var(--text-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 1.1rem;
}
.marker::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ── buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none;
  padding: 0.78rem 1.25rem; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink);
  background: linear-gradient(to bottom, var(--panel-top), var(--panel));
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.07), 0 1px 2px oklch(0% 0 0 / 0.5);
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); color: var(--ink); }
.btn:active { transform: none; }
.btn-primary {
  border-color: oklch(78% 0.17 152 / 0.45);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), 0 0 0 1px oklch(78% 0.17 152 / 0.12),
              0 6px 24px oklch(78% 0.17 152 / 0.14);
}
.btn-primary:hover { border-color: var(--live); color: var(--live); }

/* Not on the store yet, so the primary action is a readout rather than a link
   that goes nowhere. It keeps the shape of the button it will become. */
.btn-soon { color: var(--ink-2); cursor: default; border-style: dashed; }
.btn-soon:hover { transform: none; border-color: var(--line); }
.btn-soon .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); animation: none; }

/* ── panels ────────────────────────────────────────────────────────────────── */

.panel {
  background: linear-gradient(to bottom, var(--panel-top) 0, var(--panel) 22%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.05), 0 14px 40px oklch(0% 0 0 / 0.4);
  padding: clamp(1.15rem, 0.9rem + 1vw, 1.7rem);
}

.callout {
  border-left: 2px solid var(--live);
  background: oklch(16% 0.010 255 / 0.7);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── hero ──────────────────────────────────────────────────────────────────── */

.hero { padding: clamp(3rem, 2rem + 5vw, 6.5rem) 0 var(--section); }
.hero-grid {
  display: grid; gap: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  /* Deliberately uneven: the copy holds the left, the instrument runs wider and
     bleeds toward the edge. */
  .hero-grid { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
}

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live);
       box-shadow: 0 0 10px var(--live); }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2.6s var(--ease) infinite; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero p.lead { margin-top: 1.3rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; }

/* Spec readout under the hero copy — the app's own status strip, flattened. */
.specs {
  display: flex; flex-wrap: wrap; gap: 0 1.6rem;
  margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: var(--text-label); color: var(--ink-3);
  letter-spacing: 0.06em;
}
.specs b { color: var(--ink-2); font-weight: 500; }

/* ── bands ─────────────────────────────────────────────────────────────────── */

.band { padding: 0 0 var(--section); }
.band-top { padding-top: var(--section); border-top: 1px solid var(--line-soft); }

/* ── the instrument (screenshots) ──────────────────────────────────────────── */

/* A screenshot is the product, so it gets the bezel of a rack monitor rather
   than a drop shadow on white: lit top edge, hairline frame, black matte, and
   the same 4 pt of inner black the app itself puts around the picture. */
.monitor {
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(to bottom, var(--panel-top), var(--panel) 40%, var(--bg-lift));
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.08),
    0 24px 70px oklch(0% 0 0 / 0.55);
}
.monitor img {
  width: 100%;
  border-radius: var(--radius);
  background: oklch(0% 0 0);
  border: 1px solid oklch(0% 0 0 / 0.6);
}
.monitor figcaption {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: var(--text-label);
  letter-spacing: 0.06em; color: var(--ink-3);
  padding: 0.75rem 0.4rem 0.2rem;
}
.monitor figcaption b {
  color: var(--ink-2); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* Gallery: two columns, the right one dropped half a step so the pair reads as
   a staggered contact sheet instead of a tidy 2 × 2 grid. */
.shots { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
@media (min-width: 900px) {
  .shots { grid-template-columns: 1fr 1fr; align-items: start; padding-bottom: 3.5rem; }
  .shots > :nth-child(even) { transform: translateY(3.5rem); }
}

/* ── feature list ──────────────────────────────────────────────────────────── */

.features { display: grid; gap: 1px; background: var(--line-soft);
            border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { background: var(--panel); padding: clamp(1.3rem, 1rem + 1vw, 1.9rem); }
/* Hierarchy rather than a uniform grid: the first item spans and leads. */
@media (min-width: 720px) { .feature:first-child { grid-column: 1 / -1; } }
.feature:first-child h3 { font-size: calc(var(--text-h3) * 1.22); }
.feature h3 { margin: 0 0 0.35rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.feature .k {
  font-family: var(--mono); font-size: var(--text-label); color: var(--ink-3);
  letter-spacing: 0.14em; text-transform: uppercase; display: block; margin-bottom: 0.7rem;
}
.feature:hover { background: var(--bg-lift); }

/* ── keys and paths ────────────────────────────────────────────────────────── */

kbd, code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--bg-lift); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 0.12em 0.42em;
}
kbd { box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.06), 0 1px 0 oklch(0% 0 0 / 0.5); }

.keys { width: 100%; max-width: 34rem; border-collapse: collapse; }
.keys caption { text-align: left; color: var(--ink-3); font-size: 0.9rem; padding-bottom: 0.8rem; }
.keys th, .keys td { text-align: left; padding: 0.72rem 0; border-bottom: 1px solid var(--line-soft); }
.keys th {
  font-family: var(--sans); font-weight: 400; color: var(--ink-2); font-size: 0.95rem;
}
.keys td { width: 1%; white-space: nowrap; }

.paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
         background: var(--line-soft); border: 1px solid var(--line);
         border-radius: var(--radius); overflow: hidden; }
.paths li { background: var(--panel); padding: 1rem 1.15rem; display: flex;
            flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.9rem; }
.paths code { flex: none; }
.paths span { color: var(--ink-2); font-size: 0.95rem; }

/* ── documents (support / privacy) ─────────────────────────────────────────── */

.doc { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 var(--section); }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem); }
.doc h2 { margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 { color: var(--ink); }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.1rem; max-width: var(--measure); }
.doc li { margin-bottom: 0.45rem; }
.doc .updated {
  font-family: var(--mono); font-size: var(--text-label); color: var(--ink-3);
  letter-spacing: 0.1em; text-transform: uppercase; margin: 0.9rem 0 2rem;
}

/* A question-and-answer block that reads as a labelled panel row. */
.qa { border-top: 1px solid var(--line-soft); padding: 1.4rem 0; }
.qa:last-of-type { border-bottom: 1px solid var(--line-soft); }
.qa h3 { margin: 0 0 0.5rem; }
.qa p:last-child { margin-bottom: 0; }

/* ── footer ────────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line); padding: 2.6rem 0 3.2rem;
               background: oklch(9% 0.008 255); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: space-between; }
.site-footer p { margin: 0 0 0.3rem; font-size: 0.86rem; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: flex-start; }
.footer-links a {
  font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); text-decoration: none;
}
.footer-links a:hover { color: var(--live); }

/* ── load sequence ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(14px); }
  html.js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  }
  html.js .reveal.d1.in { transition-delay: 90ms; }
  html.js .reveal.d2.in { transition-delay: 180ms; }
  html.js .reveal.d3.in { transition-delay: 270ms; }
}
