/* ==========================================================================
   AI Story Video (/ai-story-video)
   Page-only layouts. Shared pieces come from components.css; values are tokens.
   ========================================================================== */

/* ── Hero: from storyboard to screen ───────────────────────────────────── */
.as-hero { position: relative; padding-bottom: var(--section-pad-tight); overflow-x: clip; isolation: isolate; }
.as-hero__light { position: absolute; z-index: -1; inset: -15% -10% auto 40%; height: 120%; background: var(--light-spot); pointer-events: none; }
.as-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 992px) { .as-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.as-hero__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); justify-items: start; }
.as-hero__title { max-width: 14ch; }
.as-hero__answer { color: var(--c-text); max-width: 52ch; }
.as-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
@media (max-width: 575.98px) { .as-hero__actions .btn { width: 100%; white-space: normal; text-align: center; } }
.js-motion .as-hero__copy > * { animation: as-rise var(--dur-slow) var(--ease-signature) backwards; }
.js-motion .as-hero__copy > :nth-child(2) { animation-delay: var(--stagger-items); }
.js-motion .as-hero__copy > :nth-child(3) { animation-delay: calc(var(--stagger-items) * 2); }
.js-motion .as-hero__copy > :nth-child(n + 4) { animation-delay: calc(var(--stagger-items) * 3); }
@keyframes as-rise { from { opacity: 0.01; transform: translateY(var(--reveal-rise)); } }

.as-stage { display: grid; gap: var(--sp-2); }
.as-screen { position: relative; }
.js-motion .as-screen { animation: as-on var(--dur-slow) var(--ease-signature) calc(var(--stagger-items) * 2) backwards; }
@keyframes as-on { from { opacity: 0; filter: brightness(2.5) blur(6px); } }
/* the projector beam: a soft cone of light falling onto the screen */
.as-screen__beam { position: absolute; z-index: -1; left: -18%; top: -18%; width: 75%; height: 110%; background: linear-gradient(150deg, rgb(255 160 79 / 0.14), transparent 65%); clip-path: polygon(0 0, 12% 0, 100% 40%, 100% 100%); filter: blur(32px); pointer-events: none; }
.as-screen__frame { position: relative; aspect-ratio: 16 / 9; border: var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); box-shadow: var(--shadow), 0 0 120px -30px var(--glow-color); }
.as-screen__frame img,
.as-screen__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-screen__frame video { opacity: 0; transition: opacity var(--dur-base) var(--ease-signature); }
.as-screen__frame video.is-playing { opacity: 1; }
.as-screen__tag { position: absolute; left: var(--sp-2); bottom: var(--sp-2); display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--sp-1); border-radius: var(--r-sm); background: var(--c-overlay); font-family: var(--font-mono); font-size: var(--fs-caption); }

/* the storyboard: pencil-sketch panels that develop into colour, one by one */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-1); list-style: none; }
.board__panel { position: relative; display: grid; gap: 4px; align-content: start; font-size: var(--fs-caption); color: var(--c-text-muted); line-height: 1.35; }
.board__panel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); transition: filter var(--dur-slow) var(--ease-signature), border-color var(--dur-base) var(--ease-signature), box-shadow var(--dur-base) var(--ease-signature); }
.board__no { font-family: var(--font-mono); color: var(--c-accent-text); }
.board.is-boarding .board__panel img { filter: grayscale(1) contrast(1.7) brightness(1.3); }
.board.is-boarding .board__panel.is-lit img { filter: none; border-color: var(--c-accent); box-shadow: 0 0 24px -6px var(--glow-color); }
.board.is-boarding .board__panel.is-lit p { color: var(--c-text); }
@media (max-width: 575.98px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-1); } }

/* ── 01 · What it is ───────────────────────────────────────────────────── */
.as-what__grid { display: grid; gap: var(--sp-5) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) {
  .as-what__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .as-what__grid > div { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}
.as-what__grid > div { display: grid; gap: var(--sp-3); }
.as-what__grid .t-h2 { max-width: 12ch; }
.as-lines { list-style: none; border-top: var(--border-strong); }
.as-lines li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--border); }
.as-lines span { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--c-accent-text); padding-top: 0.35em; }
.as-lines p { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--c-text-muted); }
.as-lines strong { display: block; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.1; color: var(--c-text); margin-bottom: 4px; }

/* ── 02 · Where it works: six takes ────────────────────────────────────── */
.takes { display: grid; gap: var(--grid-gutter); list-style: none; }
@media (min-width: 576px) { .takes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .take--wide, .take--versions { grid-column: span 2; } .take--versions .take__media { aspect-ratio: 11 / 3; } }
@media (min-width: 992px) {
  .takes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .take--tall { grid-row: span 2; }
  .take--tall .take__media { aspect-ratio: auto; flex: 1; min-height: 0; }
  .take--versions .take__media { aspect-ratio: 11 / 3; }
}
.take { display: flex; flex-direction: column; gap: var(--sp-2); }
.take__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); cursor: pointer; }
.take__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.85); transition: transform var(--dur-slow) var(--ease-signature), filter var(--dur-base) var(--ease-signature); }
.take__media:hover img { transform: scale(1.04); filter: none; }
.take__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 3.5rem; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--c-overlay); transition: background-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover), scale var(--dur-base) var(--ease-signature); }
.take__play .icon { --icon-size: 1.1rem; fill: currentColor; }
.take__media:hover .take__play { background: var(--c-accent); color: var(--c-accent-ink); scale: 1.1; }
.take__body { display: grid; gap: 4px; }
.take__no { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--c-accent-text); }
.take__body h3 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.take__body p { color: var(--c-text-muted); font-size: var(--fs-small); max-width: 46ch; }
.take--wide .take__body h3 { font-size: var(--fs-h3); letter-spacing: var(--display-tracking); }
@media (max-width: 575.98px) { .take--tall .take__media { aspect-ratio: 4 / 5; } }
/* "Many versions": one story in three sizes */
.take__media--versions { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); cursor: default; background: radial-gradient(circle at 50% 120%, rgb(var(--c-accent-rgb) / 0.2), transparent 60%), var(--c-bg); }
.vers { display: grid; place-items: center; border: 2px solid var(--c-accent); border-radius: 6px; font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--c-accent-text); }
.vers--wide { height: 45%; aspect-ratio: 16 / 9; }
.vers--tall { height: 62%; aspect-ratio: 9 / 16; }
.vers--square { height: 45%; aspect-ratio: 1; }
.js-motion .vers { animation: as-vers 6s var(--ease-signature) infinite; }
.js-motion .vers--tall { animation-delay: 2s; }
.js-motion .vers--square { animation-delay: 4s; }
@keyframes as-vers { 0%, 30%, 100% { box-shadow: none; background: transparent; } 8%, 22% { box-shadow: 0 0 24px -4px var(--glow-color); background: rgb(var(--c-accent-rgb) / 0.14); } }

/* ── 03 · AI or a real shoot ───────────────────────────────────────────── */
.as-vs__grid { display: grid; gap: var(--sp-5) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) {
  .as-vs__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .as-vs__intro { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}
.as-vs__intro { display: grid; gap: var(--sp-3); justify-items: start; }
.as-vs__intro .t-h2 { max-width: 13ch; }
.vs { overflow-x: auto; border: var(--border); border-radius: var(--r-lg); background: var(--c-surface-1); }
.vs__table { width: 100%; border-collapse: collapse; }
.vs__table th,
.vs__table td { padding: var(--sp-2) var(--sp-3); border-bottom: var(--border); text-align: left; vertical-align: middle; }
.vs__table tbody tr:last-child > * { border-bottom: 0; }
.vs__table thead th { font-size: var(--fs-caption); font-weight: var(--text-weight-bold); letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; color: var(--c-text-muted); }
.vs__table tbody th { font-weight: var(--text-weight); color: var(--c-text); }
.vs__table td { width: 9.5rem; }
@media (min-width: 576px) { .vs__table thead th { white-space: nowrap; } }
.vs__head { display: inline-flex; align-items: center; gap: 6px; }
.vs__head .icon { --icon-size: 1rem; }
.vs__head--ai { color: var(--c-accent-text); }
.vs__mark { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: var(--text-weight-bold); white-space: nowrap; }
.vs__mark::before { content: ""; width: 10px; aspect-ratio: 1; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 12px var(--glow-color); }
.vs__dash { color: var(--c-text-muted); }
.vs__table tbody tr { transition: background-color var(--dur-fast) var(--ease-hover); }
.vs__table tbody tr:hover { background: var(--c-surface-2); }
@media (max-width: 575.98px) {
  /* Phones: each row stacks — the idea on its own line, the two verdicts side by side under the column heads. */
  .vs__table, .vs__table thead, .vs__table tbody { display: block; }
  .vs__table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: var(--border); }
  .vs__table tbody tr:last-child { border-bottom: 0; }
  .vs__table th, .vs__table td { display: block; width: auto; padding: var(--sp-1) var(--sp-2); border-bottom: 0; }
  .vs__table tr > th:first-child { grid-column: 1 / -1; padding-top: var(--sp-2); }
  .vs__table thead tr > th:first-child { padding-bottom: 0; }
  .vs__table tbody td { padding-bottom: var(--sp-2); }
}

/* ── 04 · How we make it: a film strip ─────────────────────────────────── */
.strip { display: grid; gap: var(--sp-2); list-style: none; }
@media (min-width: 576px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip__frame:last-child { grid-column: 1 / -1; } }
@media (min-width: 900px) { .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .strip__frame:last-child { grid-column: auto; } }
@media (min-width: 1200px) { .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; } }
.strip__frame { position: relative; display: grid; align-content: start; gap: var(--sp-1); padding: calc(var(--sp-3) + 14px) var(--sp-3); background: var(--c-bg); border: 1px solid var(--c-line); transition: border-color var(--dur-base) var(--ease-signature), background-color var(--dur-base) var(--ease-signature); }
/* sprocket holes above and below each frame */
.strip__frame::before,
.strip__frame::after { content: ""; position: absolute; left: 8px; right: 8px; height: 8px; background: repeating-linear-gradient(90deg, var(--c-line-strong) 0 10px, transparent 10px 18px); border-radius: 2px; opacity: 0.8; }
.strip__frame::before { top: 6px; }
.strip__frame::after { bottom: 6px; }
.strip__no { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--c-text-muted); transition: color var(--dur-base) var(--ease-signature); }
.strip__frame > .icon { --icon-size: 1.5rem; margin-block: var(--sp-1); color: var(--c-text-muted); transition: color var(--dur-base) var(--ease-signature); }
.strip__frame h3 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.2; }
.strip__frame p { color: var(--c-text-muted); font-size: var(--fs-small); }
.strip.is-tracked .strip__frame:not(.is-lit) h3 { color: var(--c-text-muted); }
.strip__frame.is-lit,
.strip:not(.is-tracked) .strip__frame { border-color: rgb(var(--c-accent-rgb) / 0.5); background: radial-gradient(circle at 50% 0%, rgb(var(--c-accent-rgb) / 0.14), transparent 70%), var(--c-bg); }
.strip__frame.is-lit .strip__no,
.strip__frame.is-lit > .icon,
.strip:not(.is-tracked) .strip__frame > .icon { color: var(--c-accent-text); }
@media (min-width: 1200px) {
  .strip__frame:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
  .strip__frame:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
}
@media (max-width: 1199.98px) { .strip__frame { border-radius: var(--r-md); } }
