/* Creative section + hero phone + full-screen ad player — shared by the v3, warm and blue designs.
   Load after site.css. Each design sets its colours with --cr-* variables on :root (navy defaults below). */

/* ================= Creative section ================= */
.creative { padding: clamp(72px, 11vw, 140px) 0; overflow: hidden; background: var(--cr-bg, #13233d); color: var(--cr-text, #fff); }
.creative h2 { color: var(--cr-text, #fff); }
.creative .section-head .muted { color: var(--cr-muted, #a8b5c5); }
.creative .kicker { color: var(--cr-kicker, #8fcaff); }
.creative .section-head { max-width: 820px; }
.creative h2 .serif { color: var(--cr-serif, #6cb8ff); }
.creative-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ad-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-filters button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cr-line, rgba(200, 220, 240, 0.26)); background: none; color: var(--cr-muted, #a8b5c5); font: 600 0.88rem/1 var(--f-body); cursor: pointer; transition: all 0.2s; }
.ad-filters button[aria-pressed="true"] { background: var(--cr-on-bg, #fff); color: var(--cr-on-fg, #13233d); border-color: var(--cr-on-bg, #fff); }
.rail-nav { display: none; gap: 8px; }
.rail-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cr-line, rgba(200, 220, 240, 0.26)); background: none; color: var(--cr-text, #fff); font-size: 1.1rem; cursor: pointer; }
.rail-nav button:disabled { opacity: 0.3; cursor: default; }
@media (min-width: 900px) { .rail-nav { display: flex; } }

/* runs to the screen edge (not the content edge) so it obviously scrolls */
.ad-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 214px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 6px 18px; margin-inline: calc(50% - 50vw); --rail-edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); padding-inline: var(--rail-edge); scroll-padding-inline: var(--rail-edge); }
.ad-rail::-webkit-scrollbar { display: none; }
.ad { scroll-snap-align: start; }
.ad[hidden] { display: none; }

.phone { position: relative; aspect-ratio: 9 / 19; border-radius: 34px; background: #0a1220; padding: 7px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.phone::before { content: ""; position: absolute; top: 14px; left: 50%; width: 30%; height: 16px; margin-left: -15%; border-radius: 99px; background: #0a1220; z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: 27px; overflow: hidden; background: linear-gradient(165deg, var(--a, #2b5a92), var(--b, #13233d)); }
.phone-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.ad-placeholder svg { width: 62%; opacity: 0.38; }
.ad-badge { position: absolute; top: 40px; left: 12px; z-index: 2; font: 700 0.62rem/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: #13233d; background: rgba(255, 255, 255, 0.9); padding: 6px 8px; border-radius: 6px; }
.ad-ui { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 60px 14px 16px; background: linear-gradient(transparent, rgba(5, 10, 20, 0.75)); color: #fff; }
.ad-handle { display: block; font: 700 0.78rem/1 var(--f-body); margin-bottom: 6px; }
.ad-caption { font: 500 0.82rem/1.35 var(--f-body); margin: 0; }
.ad-side { position: absolute; right: 10px; bottom: 92px; display: grid; gap: 14px; justify-items: center; }
.ad-side i { display: block; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.ad-sound { position: absolute; top: 36px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(5, 10, 20, 0.55); color: #fff; font-size: 0.85rem; cursor: pointer; display: none; }
.has-video .ad-sound { display: block; }
.has-video .ad-placeholder, .has-video .ad-ui { display: none; }  /* real ads carry their own captions */
.has-video { cursor: pointer; }

.ad-meta { padding: 16px 4px 0; }
.ad-format { font: 600 0.72rem/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cr-accent, #8fcaff); margin-bottom: 8px; }
.ad-meta h3 { font-size: 1.12rem; color: var(--cr-text, #fff); margin-bottom: 6px; }
.ad-meta p:last-child { font-size: 0.88rem; color: var(--cr-muted, #a8b5c5); margin: 0; line-height: 1.45; }

.creative-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--cr-line, rgba(200, 220, 240, 0.26)); }
.creative-foot p { margin: 0; font-size: 0.84rem; color: var(--cr-muted, #a8b5c5); max-width: 46rem; }

/* Hero phone: a face above the fold. Fades out as the scroll story starts (site.js). */
.hero-phone { display: none; }
@media (min-width: 1100px) {
  .story-sticky { position: sticky; }
  .hero-phone { display: block; position: absolute; left: -34px; bottom: 116px; width: 140px; z-index: 4; pointer-events: none; transition: opacity 0.3s; transform: rotate(-5deg); }
  .hero-phone .phone { border-radius: 26px; padding: 5px; }
  .hero-phone .phone::before { top: 10px; height: 11px; }
  .hero-phone .phone-screen { border-radius: 21px; }
  .hero-phone .ad-badge { top: 28px; left: 8px; }
  .hero-phone .ad-ui { padding: 40px 10px 12px; }
  .hero-phone .ad-caption { font-size: 0.68rem; }
  .hero-phone .ad-side { bottom: 64px; right: 6px; gap: 9px; }
  .hero-phone .ad-side i { width: 20px; height: 20px; }
  .hero-chip { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(5deg); white-space: nowrap; font: 700 0.68rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; background: #fff; color: #13233d; padding: 7px 10px; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(19, 35, 61, 0.4); }
}

/* Hero reel: the hero phone swipes through a few sample ads on its own (site.js) */
.hero-reel { position: absolute; inset: 0; overflow: hidden; }
.hero-reel video { transform: translateX(100%); transition: transform 0.7s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)); }
.hero-reel video.is-on { transform: none; }
.hero-reel video.is-out { transform: translateX(-100%); }
.hero-reel video.no-anim { transition: none; }
.reel-dots { position: absolute; left: 0; right: 0; bottom: 9px; z-index: 3; display: flex; justify-content: center; gap: 4px; }
.reel-dots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); transition: width 0.3s, background 0.3s; }
.reel-dots i.is-on { width: 14px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .hero-reel video { transition: none; } }

/* ================= Full-screen ad player (tap-to-expand) ================= */
.ad-expand { position: absolute; top: 36px; right: 56px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(5, 10, 20, 0.55); color: #fff; font-size: 1rem; cursor: pointer; display: none; }
.has-video .ad-expand { display: block; }
.hero-phone .ad-expand, .hero-phone .ad-sound { display: none !important; }
html.av-open, html.av-open body { overflow: hidden; }
.ad-viewer { position: fixed; inset: 0; z-index: 300; background: rgba(3, 7, 14, 0.94); display: grid; place-items: center; animation: fadeUp 0.25s var(--ease); }
.ad-viewer[hidden] { display: none; }
.av-stage { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; touch-action: none; }
.av-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-progress { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); z-index: 2; overflow: hidden; }
.av-progress i { display: block; height: 100%; width: 0; background: #fff; }
.av-close, .av-sound { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 14px); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(5, 10, 20, 0.5); color: #fff; font-size: 1.05rem; cursor: pointer; }
.av-close { right: 12px; } .av-sound { right: 64px; }
.av-nav { display: none; }
.av-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 70px 18px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); color: #fff; pointer-events: none; }
.av-meta .ad-format { color: #8fcaff; margin-bottom: 6px; } /* player is always dark */
.av-meta h3 { font-size: 1.3rem; }
.av-hint { margin: 8px 0 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.65); }
/* desktop: a phone-sized player in the middle of a dark backdrop, with arrow buttons */
@media (min-width: 768px) {
  .av-stage { width: min(420px, 92vw); height: min(92vh, 820px); border-radius: 28px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); }
  .av-nav { display: grid; place-items: center; position: fixed; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 1.6rem; cursor: pointer; z-index: 4; }
  .av-prev { left: calc(50% - min(210px, 46vw) - 76px); } .av-next { right: calc(50% - min(210px, 46vw) - 76px); }
  .av-hint { display: none; }
}

/* filters with no ads behind them are hidden (site.js) */
.ad-filters[hidden], .ad-filters button[hidden] { display: none !important; }
