/* Slate landing page. Same family as demo.css: near-black ground, violet to pink accent,
   Inter + JetBrains Mono. Layout idea: one big type column, and the proof (the original
   beside the vertical, frame-locked) as the widest thing on every screen. */

:root {
  --bg: #08090c;
  --panel: #111318;
  --panel-2: #161922;
  --line: #232734;
  --line-soft: #1b1e28;
  --text: #eceef4;
  --muted: #9298ab;
  --faint: #656b7e;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));

  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --wrap: 1240px;
  --gap: 28px;               /* gap between the wide frame and the vertical frame */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 24px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; flex: none; }
.brand-mark span { width: 9px; height: 16px; border-radius: 3px; border: 2px solid rgba(255, 255, 255, .92); }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:not(.btn):hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--text); color: #0a0b10; text-decoration: none;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(167, 139, 250, .55); }
.btn svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.btn.sm { padding: 8px 16px; font-size: 14px; }
.btn.lg { padding: 18px 32px; font-size: 18px; }
.link { color: var(--muted); font-size: 15px; text-decoration: none; padding: 8px 1px; border-bottom: 1px solid var(--line); }
.link:hover { color: var(--text); border-color: var(--faint); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(20px, 3.4vw, 48px) clamp(64px, 9vw, 120px); }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 clamp(18px, 2.5vw, 28px); display: flex; align-items: center; gap: 10px; }
.eyebrow i { width: 22px; height: 1px; background: var(--faint); }
.hero-head, .row-head, .close-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 28px clamp(32px, 6vw, 96px); align-items: end; }
h1 {
  margin: 0; font-weight: 600; font-size: clamp(46px, 7.8vw, 112px);
  line-height: .94; letter-spacing: -.045em;
}
h1 span { display: block; }
h1 .dim { color: #5a6073; }
.hero-side { display: flex; flex-direction: column; gap: 26px; padding-bottom: .6vw; }
.hero-side p { margin: 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 26px; }

/* ---------- the pair: original + vertical, frame-locked ---------- */
.pair {
  position: relative; margin: clamp(36px, 5vw, 72px) 0 0;
  container-type: inline-size; container-name: pair;
  --aw: 1.7778; --ar: .5639;  /* aspect of the wide frame / of the vertical frame */
}
.panes {
  --h: calc((100cqw - var(--gap)) / (var(--aw) + var(--ar)));
  display: flex; justify-content: center; align-items: flex-start; gap: var(--gap);
}
.col { flex: none; min-width: 0; }
.col.wide { width: calc(var(--h) * var(--aw)); }
.col.phone { width: calc(var(--h) * var(--ar)); }
.pane {
  position: relative; overflow: hidden; background-color: #000;
  background-image: var(--poster); background-repeat: no-repeat;
  height: var(--h); width: 100%;
}
.col.wide .pane { border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, .9); }
.col.phone .pane { border-radius: 26px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.col.phone .pane::after {   /* the one place the accent touches the footage: the output frame */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .25s; }
.pair.live canvas { opacity: 1; }
.pair video { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; font: 500 11.5px/1.3 var(--mono); letter-spacing: .02em; color: var(--faint); white-space: nowrap; }
.cap b { font-weight: 500; color: var(--muted); }
.cap .tc { font-variant-numeric: tabular-nums; color: var(--muted); }
.col.phone .cap b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.toggle {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(8, 9, 12, .62); color: #fff; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: .75; transition: opacity .15s;
}
.toggle:hover, .toggle:focus-visible { opacity: 1; }
.toggle svg { width: 12px; height: 12px; fill: currentColor; }
.toggle .i-play { display: none; }
.toggle[aria-pressed="true"] .i-play { display: block; }
.toggle[aria-pressed="true"] .i-pause { display: none; }
.src { margin: 20px 0 0; font: 500 11.5px/1.4 var(--mono); color: var(--faint); letter-spacing: .02em; }

/* ---------- feature rows ---------- */
.row { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line-soft); }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; display: flex; align-items: center; gap: 10px; }
.kicker i { width: 22px; height: 1px; background: currentColor; opacity: .6; }
h2 { margin: 0; font-weight: 600; font-size: clamp(34px, 5vw, 68px); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.55; max-width: 42ch; text-wrap: pretty; padding-bottom: .4em; }

/* ---------- steps ---------- */
.how { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line-soft); }
.how h2 { max-width: 12ch; }
.steps { list-style: none; margin: clamp(44px, 6vw, 84px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 28px; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: calc((100% - 140px) / 6); top: 33px; height: 1px; background: var(--line); }
.step { position: relative; padding-top: 88px; }
.mark { position: absolute; left: 0; top: 0; height: 66px; padding-right: 14px; display: flex; align-items: center; background: var(--bg); }
.mark.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--faint); }
.step.key .mark.dot::before { border-color: var(--accent); background: var(--accent); }
.step h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 22ch; }
.g-wide { width: 58px; height: 33px; border-radius: 5px; border: 1.5px solid var(--muted); }
.g-tall { width: 30px; height: 54px; border-radius: 8px; background: var(--grad); position: relative; }
.g-tall::after { content: ""; position: absolute; inset: 1.5px; border-radius: 6.5px; background: var(--bg); }

/* ---------- closing ---------- */
.close { padding-block: clamp(72px, 10vw, 150px); border-top: 1px solid var(--line-soft); }
.close h2 { font-size: clamp(40px, 6.4vw, 92px); line-height: .96; }
.close p { margin: 0 0 28px; color: var(--muted); max-width: 36ch; font-size: clamp(16px, 1.4vw, 18.5px); text-wrap: pretty; }
.close .mono { margin: 18px 0 0; font: 500 11.5px/1.4 var(--mono); color: var(--faint); letter-spacing: .02em; }

footer { border-top: 1px solid var(--line-soft); padding-block: 28px 40px; }
.foot { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; color: var(--faint); font-size: 13px; }
.foot .brand { margin-right: 0; gap: 9px; }
.foot .brand-name { font-size: 15px; color: var(--text); }
.foot .brand-mark { width: 22px; height: 22px; border-radius: 6px; }
.foot .brand-mark span { width: 7px; height: 12px; border-width: 1.5px; border-radius: 2px; }
.foot p { margin: 0; flex: 1 1 320px; max-width: 60ch; padding-left: clamp(0px, 3vw, 40px); }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .hero-head, .row-head, .close-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side p, .lede, .close p { max-width: 52ch; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { left: 32px; right: auto; top: 14px; bottom: 14px; width: 1px; height: auto; }
  .step { padding: 0 0 38px 88px; min-height: 28px; }
  .step:last-child { padding-bottom: 0; }
  .mark { width: 64px; height: auto; padding: 4px 0; justify-content: center; top: -2px; }
  .step.io .mark { top: 0; }
  .step p { max-width: 42ch; }
}
@container pair (max-width: 720px) {
  .panes { flex-direction: column; align-items: center; gap: 22px; }
  .col.wide { width: 100%; }
  .col.wide .pane { height: auto; aspect-ratio: var(--aw); }
  .col.phone { width: auto; }
  .col.phone .pane { height: 92cqw; width: auto; aspect-ratio: var(--ar); border-radius: 22px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav a.link-how { display: none; }
  .cta-row .link { display: none; }
  .hero-side .btn.lg { width: 100%; justify-content: center; }
  .foot p { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .pane canvas, .toggle { transition: none; }
}
