/*
 * Lugh Xtudio — marketing site.
 *
 * One stylesheet, no build step. The palette is the editor's own tokens (apps/editor/src/app
 * /styles.ts) so a screenshot of the app and a section of this page belong to the same product.
 */

:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --panel: #121215;
  --panel-2: #1a1a1f;
  --panel-3: #232329;
  --line: #1f1f25;
  --line-strong: #33333c;

  --ink: #f2f2f5;
  --ink-dim: #96969f;
  --ink-faint: #5f5f6a;

  --accent: #ff7a1a;
  --accent-lift: #ff9a4d;
  --accent-deep: #ef680a;

  --clip-video: #2b5fd0;
  --clip-video-edge: #4b83ee;
  --clip-audio: #16a06f;
  --clip-audio-edge: #2fc98f;
  --clip-text: #d9a520;
  --clip-text-edge: #f0c44a;
  --clip-caption: #a87a12;
  --clip-effect: #d05a9c;
  --waveform: #6ff0be;

  --sheet: #e7e5e1;
  --sheet-ink: #0d0d0f;
  --sheet-dim: #55555c;
  --sheet-line: #cfccc6;

  --pad: clamp(20px, 4vw, 64px);
  --maxw: 1400px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/*
 * Smooth scroll: `.scroll` is lifted out of flow and translated by js/scroll.js, while a spacer
 * of the same height keeps the native scrollbar — and therefore trackpad momentum, keyboard
 * paging and the browser's own scroll restoration — completely real.
 */
body.is-smooth .scroll {
  position: fixed;
  inset: 0 0 auto 0;
  will-change: transform;
}

.spacer {
  pointer-events: none;
}

img,
canvas,
video {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #180800;
}

/* ── film grain over everything, like the reference's shader plate ───────────── */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.7s steps(4) infinite;
}

@keyframes grain-shift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-3%, 2%);
  }
  50% {
    transform: translate(2%, -3%);
  }
  75% {
    transform: translate(-2%, -2%);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* ── floating chrome ─────────────────────────────────────────────────────────── */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  pointer-events: none;
}

.chrome > * {
  pointer-events: auto;
}

/*
 * The chrome floats over both grounds. `difference` carries it over the dark half and over the
 * baked gradient, where no fixed colour would survive; over the light sheet it lands on a grey
 * that reads as broken, so js/main.js flips the header to `.on-light` while the sheet is behind
 * it and the two elements that need a real colour take one.
 */
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  mix-blend-mode: difference;
  transition: color 0.35s var(--ease);
}

.chrome.on-light .brand {
  mix-blend-mode: normal;
  color: var(--sheet-ink);
}

.chrome.on-light .brand-mark,
.chrome.on-light .brand-word {
  color: inherit;
}

.chrome.on-light .cta-pill {
  background: var(--sheet-ink);
  color: #f5f4f1;
}

.chrome.on-light .cta-pill:hover {
  background: var(--accent-deep);
  color: #fff;
}

.brand-mark {
  /* Taller than wide: the mark is a spear, and the viewBox is cropped to its ink. */
  width: auto;
  height: 25px;
  color: #fff;
  margin-top: -11px;
}

.brand-word {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #fff;
}

.brand-sub {
  margin-left: 6px;
  font-weight: 400;
  opacity: 0.55;
}

.pillnav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(22, 22, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
}

.pillnav-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.dots {
  display: grid;
  grid-template-columns: 3px 3px;
  gap: 2px;
}

.dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.pillnav-note {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}

.pillnav-sheet {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(20, 20, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.pillnav-sheet a {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--ink-dim);
  transition:
    background 0.18s,
    color 0.18s;
}

.pillnav-sheet a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.cta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0c;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--ease),
    background 0.3s;
}

.cta-pill:hover {
  transform: translateY(-1px);
  background: var(--accent-lift);
}

.cta-pill .spark {
  font-size: 11px;
}

/* ── typography primitives ───────────────────────────────────────────────────── */
.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.16);
}

.statement {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(34px, 5.6vw, 76px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

/* Words start dim and are lit by scroll — the reference's signature move. */
[data-split] .w {
  color: #4a4a52;
  transition: color 0.35s linear;
}

[data-split] .w.lit {
  color: var(--ink);
}

.sheet [data-split] .w {
  color: #b3b0a9;
}

.sheet [data-split] .w.lit {
  color: var(--sheet-ink);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  /* Every other .btn is a link, which the browser already points at. This one is a button. */
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--ease),
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #1a0900;
}

.btn-primary:hover {
  background: var(--accent-lift);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn-dark {
  background: var(--sheet-ink);
  color: #f5f4f1;
}

.btn-dark:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-line {
  border: 1px solid var(--sheet-line);
  color: var(--sheet-ink);
}

.btn-line:hover {
  border-color: var(--sheet-ink);
}

/* ── hero ────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--pad) 34px;
  overflow: hidden;
}

.hero-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  /* Until the video paints — and forever, if it never does. */
  background: radial-gradient(
    120% 95% at 50% 120%,
    #ffb066 0%,
    #ff7a1a 16%,
    #8c2308 40%,
    #08080a 76%
  );
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(90% 55% at 24% 62%, rgba(8, 8, 10, 0.82), transparent 72%),
    linear-gradient(
      180deg,
      rgba(8, 8, 10, 0.86) 0%,
      rgba(8, 8, 10, 0.1) 38%,
      rgba(8, 8, 10, 0.45) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-title {
  margin: 22px 0 0;
  max-width: 15ch;
  font-size: clamp(42px, 7.6vw, 116px);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.05em;
}

.hero-sub {
  margin: 26px 0 0;
  max-width: 56ch;
  font-size: clamp(15.5px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--ink-dim);
}

.hero-sub em {
  font-style: normal;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-offer {
  margin: 14px 0 0;
  max-width: 48ch;
  color: var(--ink-dim);
  font-size: 13px;
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 20px;
  width: 100%;
  max-width: var(--maxw);
  margin: 56px auto 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-scroll i {
  display: inline-block;
  font-style: normal;
  animation: nudge 1.9s var(--ease) infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* ── section rhythm ──────────────────────────────────────────────────────────── */
.stagewrap,
.axes,
.craft {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(90px, 14vh, 190px) var(--pad) 0;
}

.stagewrap-head,
.craft-head {
  display: grid;
  gap: 22px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.stagewrap-head .statement,
.craft-head .statement {
  max-width: 21ch;
}

.stagewrap-note {
  margin: 22px 0 0;
  font-size: 13.5px;
  color: var(--ink-faint);
  max-width: 62ch;
}

.demo-context {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-dim);
  font-size: 16px;
}

/* ── the demo: one take, two windows ─────────────────────────────────────────
 *
 * The stage is a fixed box — roughly what a 16:9 editor window plus a 9:16 agent window plus the
 * gap between them add up to once each has given a title bar back. So the split state fills the
 * box, and the opening state is the same box with the agent window alone in the middle of it.
 * Only the right window animates: its width goes from nothing to whatever is left over, and the
 * left one slides across as a consequence rather than being moved by hand.
 */
.demo-stage {
  display: flex;
  justify-content: center;
  align-items: stretch;
  aspect-ratio: 2.25;
  max-height: 640px;
  margin-inline: auto;
}

/*
 * The window is its title bar plus the recording, so the aspect belongs to the recording: the
 * video takes whatever height the bar left and derives its own width from that.
 */
.win-video {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  background: #0a0a0c;
}

/* Portrait recording, so the window takes the portrait shape and the video fills it. */
.win-agent {
  flex: none;
  height: 100%;
  aspect-ratio: 540 / 834;
}

.win-agent .win-video {
  object-fit: cover;
}

/*
 * Before the recording opens the film there is nothing to show on the right, so the window is
 * genuinely zero-width — it is not a pane sitting there empty. `flex-shrink` is what makes the
 * split state land: it asks for the whole stage and settles for what the agent window left.
 */
.win-lens {
  flex: 0 1 auto;
  height: 100%;
  min-width: 0;
  width: 0;
  margin-left: 0;
  opacity: 0;
  transform: translateX(-14px);
  transition:
    width 0.85s var(--ease),
    margin-left 0.85s var(--ease),
    opacity 0.5s ease 0.12s,
    transform 0.85s var(--ease);
}

.demo.is-split .win-lens {
  width: 100%;
  margin-left: 14px;
  opacity: 1;
  transform: none;
}

.win-lens .win-video {
  aspect-ratio: 1280 / 714;
}

/* The run is over: the dot settles back to green and the label stops claiming otherwise. */
.win-chip-end,
.demo.is-done .win-chip-run {
  display: none;
}

.demo.is-done .win-chip-end {
  display: inline;
}

.demo.is-done .win-chip-live.busy {
  border-color: var(--line-strong);
  background: none;
  color: var(--ink-faint);
}

.demo.is-done .win-chip-live.busy::before {
  background: var(--clip-audio-edge);
  animation: none;
}

.demo-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.demo-foot .stagewrap-note {
  margin: 0;
}

.demo-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

/*
 * The one control in the whole stage: the take holds on its last frame, so this is how you ask
 * for it again. It sits out here rather than in the editor's title bar because that bar only
 * exists after the split, and the ask has to be possible before it.
 */
.demo-replay {
  flex: none;
  opacity: 0;
  pointer-events: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition:
    opacity 0.5s ease 0.35s,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.9s var(--ease);
}

/*
 * It holds its slot in the row the whole time, so nothing shifts when it turns up — and when the
 * film button leaves for the middle of the stage it slides over to take the edge the film button
 * was holding, on the same clock, rather than sitting against the gap it left behind.
 */
.demo.is-done .demo-replay {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(var(--replay-dx, 0px));
}

.demo-replay:disabled {
  cursor: default;
}

.demo-replay:not(:disabled):hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}

/* The spin lives on the glyph so the button's own transform stays free for the slide. */
.demo-replay > span {
  display: block;
  transition: transform 0.5s var(--ease);
}

.demo-replay:not(:disabled):hover > span {
  transform: rotate(-180deg);
}

/*
 * When the run ends the film is the only thing left to do, so the button leaves the corner and
 * lands in the middle of the stage, over the frame the agent stopped on. The distance is a pair
 * of custom properties because only layout knows it — js/demo.js measures and writes them.
 */
.demo-open {
  position: relative;
  z-index: 3;
  flex: none;
  gap: 10px;
  transform: translate(0, 0);
  transition: transform 0.9s var(--ease);
}

.demo.is-done .demo-open {
  transform: translate(var(--film-dx, 0px), var(--film-dy, 0px)) scale(1.06);
}

.demo-open-arrow {
  transition: transform 0.3s var(--ease);
}

.demo-open:hover .demo-open-arrow {
  transform: translateX(3px);
}

/* ── the finished film, over the page ────────────────────────────────────────── */
.film-open,
.film-open body {
  overflow: hidden;
}

.filmbox {
  position: fixed;
  inset: 0;
  /* Over the floating header too — the film is the only thing on the page while it is open. */
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
}

.filmbox-veil {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.86);
  backdrop-filter: blur(8px);
  animation: film-veil 0.32s ease both;
}

.filmbox-panel {
  position: relative;
  width: min(1180px, 100%);
  animation: film-rise 0.42s var(--ease) both;
}

.filmbox-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 80px 180px -60px rgba(0, 0, 0, 1);
}

.filmbox-cap {
  margin: 14px 2px 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.filmbox-cap strong {
  color: var(--ink-dim);
  font-weight: 500;
}

/* Inside the frame, top right — the video's own controls live along the bottom edge. */
.filmbox-x {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.filmbox-x:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(10, 10, 12, 0.85);
}

@keyframes film-veil {
  from {
    opacity: 0;
  }
}

@keyframes film-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.win {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 60px 140px -70px rgba(0, 0, 0, 0.95);
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.tl-dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.tl-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--panel-3);
}

.win-name {
  font-size: 12.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-chip {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.win-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clip-audio-edge);
}

.win-chip-live.busy {
  border-color: rgba(255, 122, 26, 0.35);
  background: rgba(255, 122, 26, 0.1);
  color: var(--accent-lift);
}

.win-chip-live.busy::before {
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* ── the two axes ────────────────────────────────────────────────────────────── */
.axes .statement {
  max-width: 20ch;
  margin-bottom: clamp(40px, 6vw, 76px);
}

.axes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.axis {
  padding: clamp(26px, 3vw, 44px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
}

.axis-no {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
}

.axis h3 {
  margin: 18px 0 14px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.axis p {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-dim);
  font-size: 15.5px;
}

.axis-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.axis-list li {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--ink-dim);
}

.axis-list code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--accent-lift);
}

/* ── capability cards, with the hover zoom-out ───────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card-wide {
  grid-column: 1 / -1;
  min-height: 150px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 210px;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    transform 0.55s var(--ease),
    opacity 0.45s var(--ease),
    border-color 0.45s,
    background 0.45s;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card-no {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent);
}

.card-tag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.card h3 {
  margin: auto 0 0;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.card-detail {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition:
    max-height 0.55s var(--ease),
    opacity 0.4s var(--ease) 0.08s,
    transform 0.5s var(--ease) 0.08s;
}

/* Pull back: the hovered card shrinks a hair and opens, everything else recedes. */
.cards.hot .card {
  opacity: 0.4;
  transform: scale(0.985);
}

.cards.hot .card.zoom {
  opacity: 1;
  transform: scale(0.97);
  border-color: rgba(255, 122, 26, 0.4);
  background: linear-gradient(180deg, #17130f, var(--panel));
}

.card.zoom .card-detail {
  max-height: 260px;
  opacity: 1;
  transform: none;
}

/* ── the light sheet ─────────────────────────────────────────────────────────── */
.sheet {
  position: relative;
  z-index: 3;
  margin-top: clamp(90px, 14vh, 180px);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--sheet);
  color: var(--sheet-ink);
}

.sheet a:not(.btn) {
  color: inherit;
}

.stack,
.pricing,
.faq {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 160px) var(--pad) 0;
}

.stack-title {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: clamp(34px, 6.4vw, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.stack-line-right {
  justify-self: end;
  text-align: right;
}

.stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}

.ticon {
  position: relative;
  display: grid;
  place-items: center;
  min-width: clamp(46px, 5vw, 62px);
  height: clamp(38px, 4.2vw, 52px);
  padding: 0 14px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--sheet-line);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(10.5px, 1.05vw, 13px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--sheet-ink);
  cursor: default;
  transition:
    transform 0.45s var(--ease),
    background 0.3s,
    color 0.3s;
}

/* Same zoom-out idea as the cards: the icon pulls back and names itself. */
.ticon:hover {
  transform: scale(0.9);
  background: var(--sheet-ink);
  color: #fff;
}

.ticon::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--sheet-ink);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.35s var(--ease);
}

.ticon:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ticon-more {
  background: transparent;
  border-style: dashed;
  color: var(--sheet-dim);
}

.stack-body {
  display: grid;
  gap: 22px;
  justify-items: start;
  max-width: 52ch;
  margin: clamp(40px, 6vw, 70px) 0 0;
  color: var(--sheet-dim);
  font-size: 16.5px;
}

.offer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: clamp(46px, 7vw, 84px);
}

.offer-card {
  padding: 30px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--sheet-line);
}

.offer-card-alt {
  background: var(--sheet-ink);
  color: #f2f0ec;
  border-color: var(--sheet-ink);
}

.offer-card h3 {
  margin: 0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.offer-lead {
  margin: 8px 0 22px;
  font-size: 14.5px;
  color: var(--sheet-dim);
}

.offer-card-alt .offer-lead {
  color: #a3a099;
}

.offer-card ul,
.tier ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}

.offer-card li,
.tier li {
  display: flex;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--sheet-line);
}

.offer-card-alt li {
  border-color: rgba(255, 255, 255, 0.12);
}

.offer-card li::before,
.tier li::before {
  content: "↳";
  color: var(--accent-deep);
}

/* ── pricing ─────────────────────────────────────────────────────────────────── */
.pricing-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(34px, 5.4vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.pricing-lead {
  margin: 22px 0 0;
  max-width: 52ch;
  color: var(--sheet-dim);
  font-size: 16.5px;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 6vw, 70px);
}

.tier {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--sheet-line);
}

.tier-hot {
  background: var(--sheet-ink);
  color: #f2f0ec;
  border-color: var(--accent-deep);
  box-shadow: inset 0 3px 0 var(--accent);
}

.tier-hot li {
  border-color: rgba(255, 255, 255, 0.12);
}

.tier header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tier-name {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sheet-dim);
}

.tier-hot .tier-name {
  color: var(--accent-lift);
}

.tier-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0900;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tier-price {
  margin: 0;
  font-size: clamp(46px, 5vw, 66px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.tier-price span {
  font-size: 0.45em;
  vertical-align: 0.55em;
  opacity: 0.55;
}

.tier-note {
  margin: 0;
  font-size: 14px;
  color: var(--sheet-dim);
}

.tier-hot .tier-note {
  color: #a3a099;
}

.tier .btn {
  margin-top: auto;
  justify-content: center;
}

.pricing-footnote {
  margin: 20px 0 0;
  color: var(--sheet-dim);
  font-size: 13px;
}

/* ── faq ─────────────────────────────────────────────────────────────────────── */
.faq {
  padding-bottom: clamp(80px, 12vh, 160px);
}

.faq-title {
  margin: 0 0 clamp(30px, 4vw, 54px);
  font-size: clamp(32px, 4.6vw, 62px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.faq-list {
  border-top: 1px solid var(--sheet-line);
}

.faq details {
  border-bottom: 1px solid var(--sheet-line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--sheet-line);
  font-size: 17px;
  font-weight: 400;
  transition:
    transform 0.35s var(--ease),
    background 0.3s,
    color 0.3s;
}

.faq details[open] summary::after {
  content: "−";
  background: var(--sheet-ink);
  color: #fff;
  transform: rotate(180deg);
}

.faq details p {
  margin: 0;
  padding: 0 0 26px;
  max-width: 74ch;
  color: var(--sheet-dim);
  font-size: 16px;
}

/* ── waitlist ────────────────────────────────────────────────────────────────── */
.waitlist {
  position: relative;
  overflow: hidden;
  padding: clamp(100px, 16vh, 200px) var(--pad);
  background: var(--bg);
}

/*
 * The same baked loop as the hero, but this section has no dark half of its own to fall into:
 * the light lands right where the headline and the field are. So it is dimmed and then buried
 * under a veil of its own, and what is left is a glow at the horizon rather than a wall.
 */
.waitlist-shader {
  opacity: 0.42;
  /* Sit on the upper, darker part of the loop: the bright shore at the bottom of the frame is
     what was burning here, and this section is too short to swallow it. */
  object-position: 50% 26%;
}

.waitlist-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(86% 66% at 18% 40%, rgba(8, 8, 10, 0.94), transparent 78%),
    linear-gradient(
      180deg,
      rgba(8, 8, 10, 0.86) 0%,
      rgba(8, 8, 10, 0.66) 34%,
      rgba(8, 8, 10, 0.88) 68%,
      rgba(8, 8, 10, 0.97) 100%
    );
}

.waitlist-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  justify-items: start;
}

.waitlist-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(34px, 5.6vw, 78px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.048em;
}

.waitlist-sub {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-dim);
  font-size: 16.5px;
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(620px, 100%);
  margin-top: 10px;
}

.waitlist-form input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 15px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.3s,
    background 0.3s;
}

.waitlist-form input::placeholder {
  color: var(--ink-faint);
}

.waitlist-form input:focus {
  border-color: var(--accent);
  background: rgba(255, 122, 26, 0.06);
}

.waitlist-form button {
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0900;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.3s var(--ease);
}

.waitlist-form button:hover {
  background: var(--accent-lift);
  transform: translateY(-2px);
}

.waitlist-form button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

/*
 * The honeypot. `display: none` is the one thing a bot checks for, so the field is laid out
 * and then put where nothing can reach it — off the flow, off the screen, out of the tab order.
 */
.waitlist-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.waitlist-msg {
  margin: 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--accent-lift);
}

.waitlist-help {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.waitlist-legal {
  max-width: 62ch;
}

.waitlist-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.waitlist-legal a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── footer ──────────────────────────────────────────────────────────────────── */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 40px;
}

.foot-top {
  padding: clamp(40px, 6vw, 70px) 0;
  border-top: 1px solid var(--line);
}

.foot-line {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 26px;
  padding-bottom: 46px;
}

.foot-grid div {
  display: grid;
  gap: 9px;
  align-content: start;
  font-size: 14.5px;
  color: var(--ink-dim);
}

.foot-label {
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.foot-grid a:hover {
  color: var(--ink);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── narrow ──────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pillnav-note {
    display: none;
  }

  /*
   * No room for two windows side by side, so the stage stacks: the agent on top, the editor
   * dropping in underneath at the same moment it would have arrived on the right. Height is
   * what animates here rather than width, so the two rules are separate rather than shared.
   */
  .demo-stage {
    flex-direction: column;
    align-items: center;
    aspect-ratio: auto;
    max-height: none;
  }

  .win-agent {
    aspect-ratio: auto;
    height: auto;
    width: min(300px, 76%);
  }

  .win-agent .win-video {
    aspect-ratio: 540 / 834;
    width: 100%;
  }

  .win-lens {
    width: 100%;
    height: auto;
    max-height: 0;
    margin-left: 0;
    margin-top: 0;
    border-width: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition:
      max-height 0.7s var(--ease),
      margin-top 0.7s var(--ease),
      opacity 0.45s ease 0.1s,
      transform 0.7s var(--ease);
  }

  .demo.is-split .win-lens {
    max-height: 70vh;
    margin-left: 0;
    margin-top: 14px;
    border-width: 1px;
  }

  .stack-line-right {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .cta-pill span.spark {
    display: none;
  }

  /* Three things share one narrow bar; below 400px the waitlist pill was wrapping onto two
     lines and landing on top of the menu. */
  .chrome {
    gap: 8px;
    padding: 14px var(--pad);
  }

  .cta-pill {
    padding: 9px 15px;
    font-size: 13.5px;
    white-space: nowrap;
  }

  .pillnav {
    padding: 6px 13px;
  }

  .pillnav-toggle {
    font-size: 14px;
  }

  .brand-word {
    font-size: 17px;
  }

  /*
   * On a phone the hero was a third of a screen of nothing. The 140px of top padding is there to
   * clear the floating header on a desktop, where the section is 900px tall and the gap reads as
   * air; on a 400px-wide screen it is just a hole. So the block centres in what is left after the
   * header instead of hanging off the bottom, and the foot keeps the bottom to itself.
   */
  .hero {
    justify-content: center;
    min-height: 40svh;
    padding: 88px var(--pad) 26px;
  }

  .stagewrap,
  .axes {
    padding-top: 80px;
  }

  .hero-foot {
    margin-top: auto;
    padding-top: 40px;
  }

  .hero-sub {
    margin-top: 20px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .card {
    min-height: 0;
  }

  /* No hover on touch: the detail is simply always open. */
  .card-detail {
    max-height: 260px;
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain {
    animation: none;
  }

  .win-lens,
  .demo-open,
  .filmbox-veil,
  .filmbox-panel {
    transition: none;
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  [data-split] .w {
    color: var(--ink);
  }

  .sheet [data-split] .w {
    color: var(--sheet-ink);
  }
}

/*
 * Cookie preferences stay outside the transformed scrolling surface, and sit along the bottom
 * edge rather than in the middle of the screen. The bar is opened non-modally (`show()`, in
 * js/cookies.js), so the page behind it stays readable and scrollable while the choice is
 * pending — which is the whole reason to prefer a bar to a box.
 *
 * `display` is set on `[open]` and nowhere else: an author `display` on the bare selector beats
 * the UA's `dialog:not([open]) { display: none }`, and the bar would sit there with the page
 * closed over it.
 */
.cookie-dialog {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 130;
  width: 100%;
  max-width: none;
  max-height: min(72dvh, 100%);
  overflow: auto;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 40px);
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: 0 -16px 60px #0007;
}
.cookie-dialog[open] {
  display: block;
}
.cookie-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px clamp(20px, 4vw, 48px);
}
.cookie-copy {
  flex: 1 1 420px;
  min-width: 0;
}
.cookie-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cookie-label {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.cookie-dialog h2 {
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.2;
  margin: 4px 0 6px;
}
.cookie-dialog p {
  line-height: 1.55;
  font-size: 14px;
}
.cookie-detail {
  font-size: 13px;
  color: var(--ink-dim);
  margin: 6px 0 0;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cookie-actions button {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.cookie-actions button:last-child {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.cookie-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.cookie-actions button:focus-visible,
.cookie-settings:focus-visible {
  outline: 2px solid var(--accent-lift);
  outline-offset: 4px;
}
/* It sits on the footer's base line, so it takes that line's size, case and colour. */
.cookie-settings {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.18s;
}
.cookie-settings:hover {
  color: var(--ink);
}
.cookie-status {
  font-size: 13px;
  color: var(--ink-dim);
}
.cookie-status:empty {
  display: none;
}
/* On a phone the bar is two stacked blocks, and the buttons take the width they are given. */
@media (max-width: 620px) {
  .cookie-side,
  .cookie-actions {
    width: 100%;
  }
  .cookie-actions button {
    flex: 1 1 140px;
  }
}

@media (min-width: 620px) {
  .cookie-dialog {
    max-width: 70%;
    margin: 0 auto;
    margin-bottom: 20px;
    border-radius: 30px;
  }
}
