/*
 * Lugh Xtudio — the home page.
 *
 * One stylesheet, no build step. The palette is the editor's own (apps/editor/src/app/styles.ts),
 * so a recording of the app and the page around it belong to the same product. The cookie bar and
 * the Windows notice live in components.css.
 */

:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  /* Every other section sits on this, so the page reads as bands rather than one long night. */
  --bg-alt: #17171c;
  --panel: #121215;
  --panel-2: #1a1a1f;
  --panel-3: #232329;
  --line: #1f1f25;
  --line-strong: #33333c;

  --ink: #f2f2f5;
  --ink-dim: #9a9aa3;
  --ink-faint: #5f5f6a;

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

  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

html.menu-open body {
  overflow: hidden;
}

a {
  color: inherit;
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

h2 {
  font-size: clamp(34px, 4.6vw, 60px);
}

p {
  margin: 0;
}

.kicker {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary {
  background: var(--accent);
  color: #160a00;
  box-shadow: 0 8px 30px -10px rgb(255 122 26 / 0.7);
}

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

.btn-ghost {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 0.03);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink-dim);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.bar.scrolled,
html.menu-open .bar {
  border-bottom-color: var(--line);
  background: rgb(8 8 10 / 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 25px;
  color: var(--accent);
}

.brand-word {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-word b {
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 14.5px;
  text-decoration: none;
  transition: color 0.2s;
}

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

.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.menu-btn i {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.menu-btn[aria-expanded="true"] i:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] i:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.menu-sheet {
  position: fixed;
  inset: 64px 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  padding: 24px var(--pad);
  background: rgb(8 8 10 / 0.96);
  backdrop-filter: blur(14px);
}

.menu-sheet[hidden] {
  display: none;
}

.menu-sheet a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
  text-decoration: none;
}

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

.hero {
  position: relative;
  padding: 136px 0 110px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  background:
    radial-gradient(40% 50% at 50% 30%, rgb(255 122 26 / 0.22), transparent 70%),
    radial-gradient(30% 35% at 22% 18%, rgb(75 131 238 / 0.12), transparent 70%),
    radial-gradient(30% 35% at 80% 22%, rgb(208 90 156 / 0.1), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  text-align: center;
}

.hero-title {
  max-width: 17ch;
  margin: 0 auto;
  font-size: clamp(42px, 6.4vw, 84px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-sub {
  max-width: 660px;
  margin: 28px auto 0;
  color: var(--ink-dim);
  font-size: clamp(17px, 1.6vw, 19.5px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* Only a phone sees this: the app runs on a computer, so the page offers to carry the link there. */
.send-desk {
  display: none;
}

.send-desk p {
  margin-bottom: 10px;
  color: var(--ink-dim);
  font-size: 14px;
}

.send-done {
  display: block;
  min-height: 1.2em;
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
}

.hero-note {
  margin-top: 18px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.hero-shot {
  position: relative;
  margin-top: 64px;
}

/* ── the app window every recording sits in ──────────────────────────────────── */

.app-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  box-shadow:
    0 40px 120px -40px rgb(0 0 0 / 0.9),
    0 0 0 1px rgb(255 255 255 / 0.02) inset;
}

.hero-shot .app-window {
  box-shadow:
    0 40px 140px -70px rgb(255 122 26 / 0.16),
    0 40px 120px -40px rgb(0 0 0 / 0.9);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.app-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel-3);
}

.app-bar span {
  margin: 0 auto;
  padding-right: 44px;
  color: var(--ink-faint);
  font-size: 12px;
}

.app-window video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--panel);
}

/* The hero is a presentation film, not an editor recording: shown whole, at its own shape. */
.hero-film video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

/* One round button in the middle plays and pauses it, with sound: the click is what lets the
   browser play sound. While it plays the button hides until a mouse comes over the film. */
.hero-film video {
  cursor: pointer;
}

.hero-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition:
    opacity 0.25s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.hero-play:hover {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}

.hero-play svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.hero-play .i-pause,
.hero-film.playing .hero-play .i-play {
  display: none;
}

.hero-film.playing .hero-play .i-pause {
  display: block;
}

.hero-film.playing .hero-play {
  opacity: 0;
}

.hero-film.playing:hover .hero-play,
.hero-film.playing .hero-play:focus-visible {
  opacity: 1;
}

/* A phone opens the film in the viewer from a button under the copy instead. */
.hero-watch {
  display: none;
}

.hero-sound:hover {
  background: rgb(0 0 0 / 0.8);
}

/* ── idea → video ────────────────────────────────────────────────────────────── */

.flow {
  padding: clamp(72px, 9vw, 120px) 0;
}

.flow .center-head {
  margin-bottom: 40px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
  list-style: none;
}

.flow-steps li {
  padding: 28px;
  background: var(--bg);
}

.flow-steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: 14px;
}

.flow-steps h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.flow-steps p {
  color: var(--ink-dim);
  font-size: 15px;
}

.flow-steps > .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.flow-steps > .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.flow-steps > .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.tier-refund {
  margin-top: 10px;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
}

/* ── feature rows ────────────────────────────────────────────────────────────── */

.feature {
  padding: clamp(64px, 7vw, 104px) 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.feature-flip .feature-grid {
  grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
}

.feature-flip .feature-copy {
  order: 2;
}

.feature-copy h2 {
  margin-bottom: 22px;
  font-size: clamp(32px, 3.7vw, 50px);
}

.feature-copy > p {
  color: var(--ink-dim);
}

/* ── centred section heads ───────────────────────────────────────────────────── */

.center-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.center-head h2 {
  margin-bottom: 20px;
}

.center-head > p:not(.kicker) {
  color: var(--ink-dim);
}

/* ── timeline ────────────────────────────────────────────────────────────────── */

.timeline-sec {
  padding: clamp(72px, 9vw, 120px) 0;
}

.app-window-wide video {
  aspect-ratio: 16 / 10;
}

/* ── creative tiles ──────────────────────────────────────────────────────────── */

.create {
  padding: clamp(72px, 9vw, 120px) 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tile h3 {
  margin: 20px 0 8px;
  font-size: 22px;
}

.tile p {
  color: var(--ink-dim);
  font-size: 15.5px;
}

.tile-media {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
}

.tile-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.tile:hover .tile-media video {
  transform: scale(1.03);
}

/* ── your own library: a request and what it became ──────────────────────────── */

.crafts {
  padding: clamp(72px, 9vw, 120px) 0;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.craft {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}

.craft-label {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The request, set like a message in the agent chat. */
.craft-prompt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.craft-you {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.mini {
  padding: 28px;
  background: var(--bg);
  transition: background 0.3s;
}

.mini:hover {
  background: var(--bg-2);
}

.mini h3 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.mini p {
  color: var(--ink-dim);
  font-size: 15px;
}

/* ── the film strip ──────────────────────────────────────────────────────────── */

.reel {
  padding: clamp(64px, 8vw, 110px) 0;
  overflow: hidden;
}

.strip {
  --frame-w: clamp(260px, 30vw, 400px);
  --holes: 30px;
  position: relative;
  padding: var(--holes) 0;
  background: #0b0b0d;
  transform: rotate(-2deg) scale(1.04);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.9);
}

/* The sprocket holes: one row along each edge, drawn rather than imaged. */
.strip::before,
.strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--holes);
  background:
    linear-gradient(90deg, transparent 0 8px, #d9d3c5 8px 22px, transparent 22px 30px) 0 50% / 30px
    12px repeat-x;
  opacity: 0.8;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.strip::before {
  top: 0;
}

.strip::after {
  bottom: 0;
}

.strip-track {
  display: flex;
  gap: 14px;
  width: max-content;
  padding-left: 14px;
  animation: strip 70s linear infinite;
}

.strip.held .strip-track,
.strip.away .strip-track {
  animation-play-state: paused;
}

@keyframes strip {
  to {
    transform: translateX(-50%);
  }
}

.frame {
  position: relative;
  flex: none;
  width: var(--frame-w);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--panel);
  cursor: pointer;
}

.frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition:
    transform 0.5s var(--ease),
    filter 0.5s;
  filter: saturate(0.9);
}

.frame:hover video,
.frame:focus-visible video {
  transform: scale(1.04);
  filter: saturate(1.1);
}

.frame-cap {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.75));
  color: #fff;
  font-size: 13px;
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s,
    transform 0.3s var(--ease);
}

.frame-cap b {
  font-size: 15px;
  font-weight: 600;
}

.frame-cap span {
  color: rgb(255 255 255 / 0.7);
}

.frame:hover .frame-cap,
.frame:focus-visible .frame-cap {
  opacity: 1;
  transform: none;
}

.frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── the viewer ──────────────────────────────────────────────────────────────── */

.viewer {
  width: min(1100px, 92vw);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
}

.viewer::backdrop {
  background: rgb(0 0 0 / 0.78);
  backdrop-filter: blur(6px);
}

.viewer video {
  width: 100%;
  background: #000;
}

.viewer-cap {
  padding: 14px 18px;
  color: var(--ink-dim);
  font-size: 14.5px;
}

.viewer-cap:empty {
  display: none;
}

.viewer-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

/* ── share your creation ─────────────────────────────────────────────────────── */

/* Under the film strip's description: a quiet way into the share form. */
.reel-share {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: 14.5px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.reel-share:hover,
.reel-share:focus-visible {
  color: var(--accent);
}

.share-dialog {
  width: min(520px, 92vw);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
}

.share-dialog::backdrop {
  background: rgb(0 0 0 / 0.78);
  backdrop-filter: blur(6px);
}

.share-form {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.share-form h2 {
  font-size: 26px;
}

.share-lead {
  margin-top: -6px;
  color: var(--ink-dim);
  font-size: 14.5px;
}

.share-file {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.share-file:hover,
.share-file:focus-within {
  border-color: var(--accent);
}

.share-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.share-file b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-file small {
  color: var(--ink-faint);
  font-size: 13px;
}

.share-preview[hidden] {
  display: none;
}

.share-preview {
  width: 100%;
  max-height: 240px;
  border-radius: 8px;
  background: #000;
}

.share-field {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-dim);
}

.share-field input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.share-field input:focus {
  border-color: var(--accent);
  outline: none;
}

.share-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-dim);
  font-size: 13.5px;
  cursor: pointer;
}

.share-check input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.share-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel-3);
}

.share-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--done, 0));
  transform-origin: left;
  transition: transform 0.2s;
}

.share-status {
  min-height: 1.4em;
  color: var(--ink-dim);
  font-size: 14px;
}

.share-status:empty {
  display: none;
}

.share-status[data-kind="error"] {
  color: #ff8a7a;
}

.share-status[data-kind="done"] {
  color: #7ee2a8;
}

/* ── works with ──────────────────────────────────────────────────────────────── */

.works {
  padding: clamp(60px, 8vw, 110px) 0;
}

.works-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 64px;
}

.works h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.works p {
  color: var(--ink-dim);
}

.logos {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logos li {
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 500;
}

/* ── pricing ─────────────────────────────────────────────────────────────────── */

.pricing {
  padding: clamp(72px, 9vw, 120px) 0;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 20px;
}

.tier {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel);
}

.tier-hot {
  border-color: rgb(255 122 26 / 0.6);
  background:
    radial-gradient(120% 80% at 50% 0%, rgb(255 122 26 / 0.14), transparent 60%), var(--panel);
  box-shadow: 0 30px 80px -40px rgb(255 122 26 / 0.5);
}

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

.tier-name {
  font-weight: 600;
}

.tier-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #160a00;
  font-size: 12.5px;
  font-weight: 600;
}

.tier-price {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tier-price span:first-child {
  margin-right: 2px;
  color: var(--ink-dim);
  font-size: 28px;
  vertical-align: 0.7em;
}

.tier-save {
  display: flex;
  gap: 10px;
  color: var(--accent-lift);
  font-size: 14.5px;
}

.tier-save s {
  color: var(--ink-faint);
}

.tier-note,
.tier-when {
  color: var(--ink-dim);
  font-size: 15px;
}

.tier ul {
  display: grid;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 0;
  list-style: none;
}

.tier li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
}

.tier li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.tier .btn {
  margin-top: auto;
}

.buy-msg {
  min-height: 1.5em;
  margin-top: 18px;
  color: var(--ink-dim);
  text-align: center;
}

.pricing-foot {
  color: var(--ink-faint);
  font-size: 13.5px;
  text-align: center;
}

/* ── faq ─────────────────────────────────────────────────────────────────────── */

.faq {
  padding: clamp(60px, 9vw, 120px) 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
}

.faq h2 {
  position: sticky;
  top: 100px;
  align-self: start;
}

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

.faq-list summary {
  position: relative;
  padding: 22px 40px 22px 0;
  font-size: 18px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

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

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 4px;
  color: var(--ink-dim);
  font-size: 24px;
  font-weight: 300;
  transition: transform 0.25s var(--ease);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding: 0 0 22px;
  color: var(--ink-dim);
}

/* ── download ────────────────────────────────────────────────────────────────── */

.download {
  position: relative;
  padding: clamp(100px, 12vw, 170px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  text-align: center;
}

.download .hero-glow {
  inset: 0;
  height: auto;
}

.download-inner {
  position: relative;
}

.download h2 {
  max-width: 14ch;
  margin: 0 auto 20px;
  font-size: clamp(40px, 6vw, 78px);
}

.download p {
  color: var(--ink-dim);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

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

.foot {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}

.foot-line {
  max-width: 22ch;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.foot-grid div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.foot-grid a {
  color: var(--ink-dim);
  font-size: 14.5px;
  text-decoration: none;
}

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

.foot-label {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* Nothing on the page is wider than the window, and nothing may make it scroll sideways. */
body {
  overflow-x: clip;
}

.faq-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.faq-link:hover {
  text-decoration: underline;
}

/* ── bands: every other section on the lighter ground ──────────────────────── */

#how,
#workspaces,
#timeline,
#create,
#reel,
#share,
#pricing,
#download {
  background: var(--bg-alt);
}

/* The cards that sat on the page's black keep standing out on the lighter band. */
#how .flow-steps li {
  background: var(--bg);
}

/* ── reveals ─────────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* A feature's window slides in from its own side and settles, a beat after its copy. */
.feature-media.reveal {
  transform: translateX(56px) scale(0.94);
  transition-delay: 0.12s;
}

.feature-flip .feature-media.reveal {
  transform: translateX(-56px) scale(0.94);
}

.feature-media.reveal.in {
  transform: none;
}

/* The copy's lines come up one after another. */
.feature-copy.reveal {
  transform: none;
}

.feature-copy.reveal > * {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.9s var(--ease);
}

.feature-copy.reveal.in > * {
  opacity: 1;
  transform: none;
}

.feature-copy.reveal.in > :nth-child(2) {
  transition-delay: 0.08s;
}

.feature-copy.reveal.in > :nth-child(3) {
  transition-delay: 0.16s;
}

.feature-copy.reveal.in > :nth-child(4) {
  transition-delay: 0.24s;
}

/* Wide windows grow into place. */
.app-window-wide.reveal,
.hero-shot.reveal {
  transform: translateY(48px) scale(0.95);
}

.app-window-wide.reveal.in,
.hero-shot.reveal.in {
  transform: none;
}

/* Cards in a row arrive in turn. */
.tiles > .reveal:nth-child(2),
.mini-grid > .reveal:nth-child(2),
.tiers > .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.tiles > .reveal:nth-child(3),
.mini-grid > .reveal:nth-child(3),
.tiers > .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.mini-grid > .reveal:nth-child(4) {
  transition-delay: 0.05s;
}

.mini-grid > .reveal:nth-child(5) {
  transition-delay: 0.15s;
}

.mini-grid > .reveal:nth-child(6) {
  transition-delay: 0.25s;
}

/* The hero plays in once, on load. */
.hero-copy > * {
  animation: rise 1s var(--ease) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero-copy > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero-copy > :nth-child(4) {
  animation-delay: 0.24s;
}

.hero-copy > :nth-child(5) {
  animation-delay: 0.32s;
}

.hero-shot.reveal {
  transition-delay: 0.3s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.in,
  .feature-copy.reveal > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-copy > * {
    animation: none;
  }
  .strip-track {
    animation: none;
  }
  /* Standing still, the strip is swiped instead. */
  .strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── narrow ──────────────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .nav {
    display: none;
  }
  .bar-end {
    margin-left: auto;
  }
  .menu-btn {
    display: flex;
  }
  .feature-grid,
  .feature-flip .feature-grid,
  .works-inner,
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .feature-flip .feature-copy {
    order: 0;
  }
  /* Stacked, nothing may slide in from the side: it would push the page wider than the phone. */
  .feature-media.reveal,
  .feature-flip .feature-media.reveal {
    transform: translateY(32px) scale(0.97);
  }
  .feature-media.reveal.in,
  .feature-flip .feature-media.reveal.in {
    transform: none;
  }
  /* Stacked, a row's copy belongs to its video: close to it, and far from the next row. */
  .feature {
    padding: 64px 0;
  }
  .feature-grid,
  .feature-flip .feature-grid {
    gap: 20px;
  }
  .center-head {
    margin-bottom: 24px;
  }
  .tiles,
  .tiers {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }
  .craft-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }
  .mini-grid,
  .flow-steps {
    grid-template-columns: 1fr 1fr;
  }
  .faq h2 {
    position: static;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-line {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  /* A phone shows the part of each editor recording that matters, larger, instead of the whole
     window shrunk to unreadable: every video names its spot in --focus and how close in --zoom. */
  .app-window video {
    aspect-ratio: 4 / 3;
    transform: scale(var(--zoom, 1));
    transform-origin: var(--focus, 50% 50%);
  }
  .hero-shot {
    display: none;
  }
  .hero-watch {
    display: inline-flex;
  }
  .send-desk {
    display: block;
    margin-top: 22px;
  }
  /* A phone gets a shorter page. These recordings stay unreadable even zoomed in, so their rows
     keep only the copy. */
  #multi .feature-media,
  #workspaces .feature-media,
  #skills .feature-media {
    display: none;
  }
  /* Captions wait for the computer: the transcript row already shows them. */
  .mini-grid .mini:nth-child(n + 4) {
    display: none;
  }
  .craft-grid .craft:nth-child(n + 3) {
    display: none;
  }
  /* No installer runs on a phone: the link to the computer is the one way out. */
  .download .downloads,
  [data-download-direct] {
    display: none;
  }
  .download {
    padding: 72px 0;
  }
  .reel,
  .pricing,
  .faq,
  .crafts,
  .create,
  .timeline-sec,
  .flow {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .hero {
    padding-top: 92px;
  }
  .mini-grid,
  .flow-steps {
    grid-template-columns: 1fr;
  }
  .btn {
    height: 46px;
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* ── a computer only: the hero side by side and one window tall, the timeline as a feature ── */

@media (min-width: 1001px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
    gap: clamp(36px, 4vw, 64px);
    align-items: center;
    max-width: 1640px;
  }
  .hero-copy {
    text-align: left;
  }
  .hero-title {
    margin: 0;
    font-size: clamp(36px, 3.7vw, 60px);
  }
  .hero-sub {
    max-width: 520px;
    margin: 22px 0 0;
    font-size: clamp(15.5px, 1.25vw, 18px);
  }
  .hero-actions {
    justify-content: flex-start;
    margin-top: 32px;
  }
  .hero-shot {
    margin-top: 0;
  }

  /* The timeline sits like the features around it: the window on one side, the copy on the other. */
  .timeline-sec {
    padding: clamp(64px, 7vw, 104px) 0;
  }
  .timeline-sec .wrap {
    display: grid;
    grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
    grid-template-areas: "media head";
    column-gap: clamp(32px, 5vw, 72px);
  }
  .timeline-sec .center-head {
    grid-area: head;
    align-self: center;
    max-width: none;
    margin: 0;
    text-align: left;
  }
  .timeline-sec .center-head h2 {
    margin-bottom: 22px;
    font-size: clamp(32px, 3.7vw, 50px);
  }
  .timeline-sec .app-window-wide {
    grid-area: media;
    align-self: center;
  }

  /* The hero alone fills the window. */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
  }
}
