/* Structural styles shared by the three templates. Each page sets the theme tokens:
   --bg --fg --muted --accent --accent-fg --line --radius --overlay */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- video slot ---------- */
.media { position: relative; overflow: hidden; cursor: pointer; background: #111; aspect-ratio: 16 / 9; border-radius: var(--radius, 0); isolation: isolate; }
.media--vertical { aspect-ratio: 9 / 16; }
.media--square { aspect-ratio: 1; }
.media > img, .media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media > img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .4s; }
.media:hover > img { transform: scale(1.05); }
.media > video { opacity: 0; transition: opacity .35s; }
.media.has-video:hover > video { opacity: 1; }
.media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.65)); pointer-events: none; z-index: 1; }
.media .play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.35); transition: transform .3s, background .3s; }
.media .play::before { content: ""; margin-left: 4px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.media:hover .play { transform: scale(1.1); background: var(--accent); border-color: var(--accent); }
.media .dur { position: absolute; z-index: 2; right: 12px; top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 4px 8px; border-radius: 4px; background: rgba(0,0,0,.55); color: #fff; font-variant-numeric: tabular-nums; }
.media .tag { position: absolute; z-index: 2; left: 12px; top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; background: var(--accent); color: var(--accent-fg); }

/* Ken Burns drift for poster-only hero slots */
@keyframes kenburns { from { transform: scale(1.02) translate(0,0); } to { transform: scale(1.14) translate(-2%, -1.5%); } }
.kenburns { animation: kenburns 22s ease-in-out infinite alternate; }
video[data-bg-video] { opacity: 0; transition: opacity 1s; }
video[data-bg-video].is-ready { opacity: 1; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 16px 24px; background: rgba(5,5,5,.92); }
.lightbox.is-open { display: flex; animation: lbin .25s ease; }
@keyframes lbin { from { opacity: 0; } }
.lightbox__stage { width: min(1200px, 100%); aspect-ratio: 16/9; max-height: calc(100vh - 140px); background: #000; }
.lightbox__stage.is-vertical { width: auto; height: min(80vh, 860px); aspect-ratio: 9/16; }
.lightbox__stage video, .lightbox__stage iframe { width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.lightbox__placeholder { width: 100%; height: 100%; background-size: cover; background-position: center; display: grid; place-items: center; text-align: center; color: #fff; font: 600 18px/1.4 system-ui, sans-serif; position: relative; }
.lightbox__placeholder::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.lightbox__placeholder span { position: relative; }
.lightbox__placeholder small { font-weight: 400; font-size: 14px; opacity: .8; }
.lightbox__caption { color: #ddd; font: 500 14px/1.4 system-ui, sans-serif; margin: 0; text-align: center; }
.lightbox__close { position: absolute; top: 10px; right: 14px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

/* ---------- before / after ---------- */
.compare { --pos: 50%; position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: var(--radius, 0); user-select: none; background: #111; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .compare__raw { filter: saturate(.32) contrast(.68) brightness(1.12) sepia(.06); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .compare__graded { filter: saturate(1.12) contrast(1.06); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; box-shadow: 0 0 12px rgba(0,0,0,.4); }
.compare__handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font: 700 16px/1 system-ui, sans-serif; letter-spacing: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.compare__label { position: absolute; bottom: 14px; z-index: 2; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; pointer-events: none; }
.compare__label--raw { left: 14px; }
.compare__label--graded { right: 14px; }

/* ---------- reveal ---------- */
.reveal-ready { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-ready.is-in { opacity: 1; transform: none; }

/* ---------- sticky mobile CTA ---------- */
.sticky-cta { position: fixed; z-index: 900; left: 12px; right: 12px; bottom: 12px; display: none; transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.sticky-cta.is-visible { transform: none; }
@media (max-width: 760px) { .sticky-cta { display: block; } }

/* ---------- forms ---------- */
.form-error { color: #e5484d; font-size: 14px; margin: 10px 0 0; }

/* ---------- FAQ disclosure ---------- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
