/* AI video page. Builds on studio-home.css tokens (Syne display, Instrument Sans, paper, ink, slate). */
.ai-video { --slate: #475c89; --navy: #273449; --film: #121417; }
.ai-video :focus-visible { outline: 3px solid var(--slate); outline-offset: 3px; }
.av-spots :focus-visible, .av-cinema :focus-visible, .av-player :focus-visible { outline-color: #fff; }
.ai-video .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html:has(.av-player[open]) { overflow: hidden; }

/* 1. Hero: the feed */
.av-hero { position: relative; background: linear-gradient(135deg, #f6cbb0 0%, #f0d9d0 32%, #e8e6e2 72%); }
.av-stage {
  position: relative; min-height: calc(100svh - 96px); overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center;
  gap: clamp(24px, 4vw, 72px); padding: clamp(32px, 5vw, 72px) var(--px) clamp(64px, 7vw, 104px);
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) { .av-stage { height: 100svh; min-height: 0; } }
.av-copy { max-width: 680px; }
.av-eyebrow { margin: 0 0 22px; font-size: 15px; font-weight: 500; letter-spacing: 0.02em; color: var(--slate); }
.av-title {
  margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: clamp(52px, 7.4vw, 124px); line-height: 0.92; letter-spacing: -0.045em; max-width: 9.5ch;
}
.av-sub { margin: 30px 0 0; max-width: 36ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: #414b60; }
.av-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin-top: 38px; }
.av-primary {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--slate); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none;
}
.av-primary:hover { background: #303f5d; }
.av-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 16px; font-weight: 500; text-underline-offset: 5px; }

.av-phone {
  justify-self: center; width: min(clamp(250px, 23vw, 340px), calc((100svh - 190px) * 9 / 19.5)); aspect-ratio: 9 / 19.5; padding: 10px;
  border-radius: 48px; background: #101215;
  box-shadow: 0 50px 90px -40px rgba(39, 52, 73, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.av-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #000; }
.av-feed { list-style: none; margin: 0; padding: 0; height: 100%; will-change: transform; }
.av-post { position: relative; height: 100%; }
.av-post video { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-post-ui { position: absolute; inset: 0; color: #fff; font-size: 12px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); pointer-events: none; }
.av-tabs { position: absolute; top: 18px; left: 0; right: 0; text-align: center; opacity: 0.9; letter-spacing: 0.01em; }
.av-tabs b { margin-right: 12px; font-weight: 600; }
.av-rail { position: absolute; right: 12px; bottom: 96px; display: grid; gap: 14px; }
.av-rail i { display: block; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.24); }
.av-handle { position: absolute; left: 16px; bottom: 20px; font-size: 13px; font-weight: 600; }
.av-handle small { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; opacity: 0.82; }

.av-cinema { position: absolute; inset: 0; z-index: 3; display: none; background: var(--film); visibility: hidden; }
.av-motion .av-cinema { display: block; }
.av-cinema::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 9, 11, 0.74), rgba(8, 9, 11, 0.2) 62%, rgba(8, 9, 11, 0) 80%); pointer-events: none; }
.av-wide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-card { position: absolute; z-index: 1; left: var(--px); bottom: clamp(36px, 7vh, 80px); color: #fff; }
.av-card-kicker { margin: 0; font-size: 15px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.av-card-name {
  margin: 10px 0 26px; font-family: var(--display); font-weight: 600;
  font-size: clamp(56px, 7.4vw, 124px); line-height: 0.92; letter-spacing: -0.045em;
}
.av-watch {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px 0 20px;
  border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none;
}
.av-watch::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.av-watch:hover { background: #f0d9d0; }
.av-dur { font-weight: 400; opacity: 0.74; }

.av-pause {
  position: absolute; z-index: 4; right: var(--px); top: 22px; display: none; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(23, 26, 28, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.72);
  color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.av-js .av-pause { display: inline-flex;
}

/* The spots (index, and the fallback without motion) */
.av-spots { background: var(--film); color: #ece9e4; padding: clamp(80px, 10vw, 150px) var(--px); }
.av-spots-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(40px, 5vw, 72px); }
.av-spots-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5vw, 76px); letter-spacing: -0.04em; line-height: 1; color: #f6f3ee; }
.av-spots-head p { margin: 0; max-width: 34ch; color: #b9bdc6; font-size: 17px; line-height: 1.5; }
.av-spot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px); }
.av-spot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.av-spot-text h3 { margin: 24px 0 8px; font-family: var(--display); font-weight: 600; font-size: clamp(28px, 2.6vw, 40px); letter-spacing: -0.03em; color: #f6f3ee; }
.av-spot-text p { margin: 0 0 22px; max-width: 46ch; color: #c3c6cd; font-size: 16px; line-height: 1.55; }

/* Film dialog */
.av-player { margin: auto; width: min(1200px, 92vw, calc((100dvh - 230px) * 16 / 9)); padding: 0; border: 0; background: #000; border-radius: 8px; overflow: visible; }
.av-player::backdrop { background: rgba(10, 12, 14, 0.86); }
.av-player video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; }
.av-close {
  position: absolute; top: -58px; right: 0; min-height: 44px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px; background: transparent; color: #fff; font: 500 15px/1 var(--sans); cursor: pointer;
}
.av-player-info { position: absolute; top: calc(100% + 14px); left: 0; right: 0; color: #d8dbe0; font-size: 14px; line-height: 1.5; }
.av-player-info p { margin: 0 0 4px; max-width: 80ch; }
.av-player-name { font-weight: 600; color: #fff; }
.av-player-error a { color: #fff; }

@media (max-width: 899px) {
  .av-stage { grid-template-columns: 1fr; min-height: 0; padding-top: 28px; gap: 48px; }
  .av-title { font-size: clamp(46px, 13vw, 72px); }
  .av-phone { width: min(70vw, 300px); }
  .av-pause { position: static; justify-self: center; }
  .av-spot-list { grid-template-columns: 1fr; }
}
/* The work: kickers and the documentary feature */
.av-spot-text .av-spot-kicker { margin: 24px 0 0; font-size: 14px; letter-spacing: 0.02em; color: #a9afbb; }
.av-spot-text .av-spot-kicker + h3 { margin-top: 8px; }
.av-spot-doc .av-spot-kicker { color: #d9b45a; }
.av-spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.av-visit { display: inline-flex; align-items: center; min-height: 48px; color: #f6f3ee; font-size: 16px; font-weight: 500; text-underline-offset: 5px; }
.av-visit::after { content: '\2197'; margin-left: 8px; }
.av-spot-text .av-credit { margin: 22px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: #a9afbb; }
@media (min-width: 900px) {
  .av-spot-doc {
    grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: center;
    padding-top: clamp(32px, 4vw, 64px); border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .av-spot-doc .av-spot-text .av-spot-kicker { margin-top: 0; }
}

/* Your brand: one template, three formats */
.av-brand {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 5vw, 96px); align-items: center;
  padding: clamp(80px, 10vw, 150px) var(--px); background: linear-gradient(135deg, #dfe3f2 0%, #e8e6e2 58%, #f0d9d0 100%);
}
.av-h2 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); font-size: clamp(40px, 5vw, 76px); line-height: 0.98; letter-spacing: -0.04em; }
.av-brand-lede { margin: 24px 0 0; max-width: 46ch; font-size: 17px; line-height: 1.6; color: #414b60; }
.av-brand-form { display: none; gap: 20px; margin-top: 36px; max-width: 520px; }
.av-js .av-brand-form { display: grid; }
.av-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.av-field label, .av-field legend { font-size: 14px; font-weight: 500; color: var(--ink); }
.av-field input[type="text"] {
  min-height: 48px; padding: 0 16px; border: 1px solid #7d8392; border-radius: 10px;
  background: rgba(255, 255, 255, 0.72); color: var(--ink); font: 400 16px/1.2 var(--sans);
}
.av-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.av-swatches legend { width: 100%; margin-bottom: 8px; padding: 0; }
.av-swatches input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.av-swatches label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px;
  border: 1px solid #7d8392; border-radius: 999px; background: rgba(255, 255, 255, 0.5); cursor: pointer;
}
.av-swatches input:checked + label { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.av-swatches input:focus-visible + label { outline: 3px solid var(--slate); outline-offset: 3px; }
.av-swatch { width: 20px; height: 20px; border-radius: 50%; background: var(--ad-bg); }
.av-sw-lagoon, .av-formats[data-colour="lagoon"] { --ad-bg: #1d6a73; --ad-fg: #fff; --ad-accent: #f6cbb0; }
.av-sw-coral, .av-formats[data-colour="coral"] { --ad-bg: #c4472c; --ad-fg: #fff; --ad-accent: #fde3c8; }
.av-sw-ink, .av-formats[data-colour="ink"] { --ad-bg: #273449; --ad-fg: #fff; --ad-accent: #f6cbb0; }
.av-sw-gold, .av-formats[data-colour="gold"] { --ad-bg: #d6a83c; --ad-fg: #171a1c; --ad-accent: #fff8e6; }
.av-note { margin: 20px 0 0; font-size: 14px; color: #505459; }
.av-brand-hint { margin: 0; font-size: 15px; color: #414b60; }
@media (forced-colors: active) { .av-swatches input:checked + label { outline: 3px solid Highlight; } }

.av-formats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; align-items: start; }
.av-f-916 { grid-row: span 2; }
.av-format-label { margin: 12px 0 0; font-size: 14px; color: #414b60; }
.av-ad {
  container-type: inline-size; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8%; border-radius: 14px; background: radial-gradient(120% 100% at 15% 10%, rgba(255, 255, 255, 0.14), transparent 58%), var(--ad-bg); color: var(--ad-fg);
  box-shadow: 0 40px 70px -40px rgba(39, 52, 73, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22); transition: background-color 0.4s ease, color 0.4s ease;
}
.av-ad::before {
  content: ''; position: absolute; top: -18%; right: -34%; width: 82%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fff, var(--ad-accent) 68%); opacity: 0.92;
}
.av-ad::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--ad-accent); transform-origin: left center; transform: scaleX(1); opacity: 0.85;
}
.av-ad > span { position: relative; }
.av-f-916 .av-ad { aspect-ratio: 9 / 16; }
.av-f-45 .av-ad { aspect-ratio: 4 / 5; }
.av-f-169 .av-ad { aspect-ratio: 16 / 9; padding: 4.5% 5.5%; }
.av-ad-tag {
  align-self: flex-start; margin-bottom: auto; padding: 1.6cqi 3.6cqi; border-radius: 999px; background: var(--ad-fg); color: var(--ad-bg);
  font: 600 4.4cqi/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
}
.av-ad-name { font-family: var(--display); font-weight: 600; font-size: 13cqi; line-height: 0.95; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.av-ad-offer { margin-top: 3cqi; font: 500 max(6cqi, 11px)/1.25 var(--sans); }
.av-ad-cta { align-self: flex-start; margin-top: 5cqi; padding: 2.4cqi 4.6cqi; border-radius: 999px; background: var(--ad-accent); color: #171a1c; font: 600 4.6cqi/1 var(--sans); }
.av-f-45 .av-ad-name { font-size: 11cqi; }
.av-f-45 .av-ad-offer { font-size: 5cqi; }
.av-f-169 .av-ad-name { font-size: 7.2cqi; }
.av-f-169 .av-ad-offer { margin-top: 1.6cqi; font-size: 3.2cqi; }
.av-f-169 .av-ad-cta { margin-top: 2.6cqi; }
.av-f-169 .av-ad-tag, .av-f-169 .av-ad-cta { padding: 1.3cqi 2.6cqi; font-size: max(2.5cqi, 10px); }
.av-f-169 .av-ad::before { top: -34%; right: -10%; width: 40%; }
.av-f-169 .av-ad > span { max-width: 60%; }
.av-f-45 { --d: 0.12s; }
.av-f-169 { --d: 0.24s; }
@media (prefers-reduced-motion: no-preference) {
  .av-run .av-ad::before { animation: av-orb 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s) both; }
  .av-run .av-ad::after { animation: av-progress 3.2s cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0s) both; }
  .av-run .av-ad-tag { animation: av-fade 0.5s var(--d, 0s) both; }
  .av-run .av-ad-name { animation: av-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0s) + 0.15s) both; }
  .av-run .av-ad-offer { animation: av-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0s) + 0.45s) both; }
  .av-run .av-ad-cta { animation: av-pop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) calc(var(--d, 0s) + 0.8s) both; }
}
@keyframes av-rise { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes av-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes av-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes av-orb { from { transform: translate(28%, -28%) scale(0.6); } to { transform: none; } }
@keyframes av-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Monthly plans (homepage service rows) */
.av-plans-lede { margin: 0 0 40px; max-width: 52ch; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: #414b60; }
.av-plans-note { margin: 36px 0 0; max-width: 70ch; font-size: 16px; line-height: 1.6; color: #414b60; }

/* Questions */
.av-faq { padding: clamp(80px, 10vw, 140px) var(--px); background: var(--paper); }
.av-faq .section-title { margin: 0 0 40px; font-style: normal; font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5vw, 76px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.av-faq-list { max-width: 920px; border-top: 1px solid var(--rule); }
.av-faq details { border-bottom: 1px solid var(--rule); }
.av-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 16px 0;
  color: var(--ink); font: 500 clamp(18px, 1.6vw, 22px)/1.3 var(--sans); list-style: none; cursor: pointer;
}
.av-faq summary::-webkit-details-marker { display: none; }
.av-faq summary::after { content: '+'; flex: none; color: var(--slate); font-size: 30px; font-weight: 300; line-height: 1; transition: transform 0.2s ease; }
.av-faq details[open] summary::after { transform: rotate(45deg); }
.av-faq details p { margin: 0 0 24px; max-width: 64ch; font-size: 16px; line-height: 1.6; color: #414b60; }

/* Closing call to action, matched to the homepage invitation */
.av-closing-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 40px; min-height: 76px; min-width: 250px; padding: 18px 26px;
  border: 1px solid #253047; border-radius: 100px; background: #253047; color: #e8e6e2; font-size: 18px; line-height: 1.2; text-decoration: none;
}
.av-closing-cta > span { font-size: 36px; font-weight: 400; }
.av-closing-cta:hover { background: #303f5d; }
.closing .invitation-side .av-closing-cta, .closing .invitation-side .av-closing-cta:hover { color: #e8e6e2; text-decoration: none; }

@media (max-width: 899px) {
  .av-brand { grid-template-columns: 1fr; }
  .av-formats { gap: 20px 16px; }
}
@media (max-width: 599px) {
  .av-formats { gap: 22px 14px; }
  .av-f-916 { grid-row: auto; }
  .av-f-169 { grid-column: 1 / -1; }
  .av-ad { padding: 9% 8%; }
  .av-ad-tag, .av-f-169 .av-ad-tag { font-size: max(4.6cqi, 12px); padding: 4px 10px; }
  .av-ad-name, .av-f-45 .av-ad-name { font-size: max(13cqi, 18px); line-height: 1.02; }
  .av-ad-offer, .av-f-45 .av-ad-offer { font-size: max(6.5cqi, 13px); line-height: 1.3; margin-top: 6px; }
  .av-ad-cta, .av-f-169 .av-ad-cta { font-size: max(5cqi, 12px); padding: 6px 12px; margin-top: 10px; }
  .av-f-169 .av-ad-name { font-size: max(8cqi, 20px); }
  .av-f-169 .av-ad-offer { font-size: max(4.2cqi, 14px); }
}
/* Matching chrome-cobalt gradient button treatment on /ai-video */
.av-primary {
  border-radius: 999px;
  background: linear-gradient(135deg, #151c28 0%, #243452 50%, #3d5687 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 28px -10px rgba(21, 28, 40, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.av-primary:hover {
  background: linear-gradient(135deg, #1e293d 0%, #2f456d 50%, #4d6ba6 100%);
  transform: translateY(-1px);
}
.av-link {
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(226, 229, 238, 0.66) 100%);
  border: 1px solid rgba(71, 92, 137, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px -8px rgba(23, 26, 28, 0.15);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.av-link:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #1d2738 0%, #354c78 100%);
  transform: translateY(-1px);
}
.av-closing-cta {
  background: linear-gradient(135deg, #151c28 0%, #243452 50%, #3d5687 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(10, 14, 22, 0.5), 0 18px 36px -12px rgba(21, 28, 40, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.av-closing-cta:hover {
  background: linear-gradient(135deg, #1e293d 0%, #2f456d 50%, #4d6ba6 100%);
  transform: translateY(-2px);
}
/* Viewport-contained scrollable film dialog for all aspect ratios including 844x390 landscape */
.av-player {
  width: min(1120px, 94vw);
  max-height: calc(100dvh - 24px);
  padding: 14px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0d1015;
  border-radius: 12px;
  overflow-y: auto;
  box-sizing: border-box;
}
.av-player video {
  max-height: min(64dvh, 640px);
}
.av-close {
  position: static;
  display: flex;
  align-items: center;
  margin: 0 0 10px auto;
  background: rgba(255, 255, 255, 0.08);
}
.av-player-info {
  position: static;
  margin-top: 12px;
}