/* The desktop app's landing (/overlay): the only page built as a product page —
   a launch film, chapters with their own clips, a stills lightbox — so its
   rules live here rather than in style.css. Same layout as thefinals'
   thefinals-overlay.html, in Endfield's yellow (dark ink on it), with tinted
   backgrounds instead of yellow outlines. The films and stills are made by
   ../arknightsendfield-showcase (npm run showcase) from the app's own build;
   every player in them is invented. */
.overlay-landing { padding: 36px 0 64px; }
.overlay-landing .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--primary-color); margin: 0 0 14px; }

/* ---- hero: the pitch, then the launch film tilted back and settling as the page scrolls ---- */
.app-hero { text-align: center; max-width: 860px; margin: 0 auto 56px; }
.app-hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 15px; margin-bottom: 26px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-color); font-size: 13px; color: var(--text-secondary); }
.app-hero-badge b { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.app-hero-badge .material-icons { font-size: 14px; color: var(--primary-color); }
.app-hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); animation: ov-pulse 2.2s ease-in-out infinite; }
@keyframes ov-pulse { 50% { opacity: .35; } }
.app-hero h1 { margin: 0 0 22px; font: italic 800 clamp(44px, 7.4vw, 96px)/.92 var(--f-display); text-transform: uppercase; letter-spacing: -.01em; }
.app-hero h1 .lead { display: block; color: var(--text-secondary); font-size: .5em; letter-spacing: .02em; margin-bottom: 8px; }
.app-hero h1 .accent { background: linear-gradient(135deg, var(--primary-light), var(--primary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; padding-right: .06em; }
.app-hero-lede { margin: 0 auto 32px; color: var(--text-secondary); font-size: 18px; line-height: 1.65; max-width: 58ch; }
.app-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }

.btn-download { background: var(--primary-color); color: var(--acc-ink); padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; border: none; cursor: pointer; font-family: inherit; box-shadow: 0 4px 20px var(--primary-glow); transition: transform .2s ease, box-shadow .2s ease; }
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 6px 26px var(--primary-glow); color: var(--acc-ink); }
.btn-download:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-download .material-icons { font-size: 20px; }
.btn-download--ghost { background: var(--surface-2); color: var(--text-primary); box-shadow: none; }
.btn-download--ghost:hover { color: var(--text-primary); box-shadow: none; background: var(--s3, var(--surface-2)); }
.soon-pill { display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 999px; border: 1px dashed var(--line-3); background: var(--acc-a08); color: var(--text-secondary); font-size: 14px; }
.soon-pill b { color: var(--text-primary); }
.soon-pill .material-icons { font-size: 18px; color: var(--primary-color); }

.app-hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 28px; font-size: 14px; color: var(--text-secondary); }
.app-hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.app-hero-trust .material-icons { font-size: 18px; color: var(--primary-color); }

.hero-stage { position: relative; margin: 0 auto 96px; max-width: 1180px; perspective: 2200px; }
.hero-stage::before { content: ''; position: absolute; inset: 6% 4% 10% 4%; background: radial-gradient(closest-side, var(--primary-soft), transparent); filter: blur(60px); animation: ov-glow 6s ease-in-out infinite alternate; }
@keyframes ov-glow { to { transform: translateY(-16px) scale(1.05); opacity: .7; } }
/* --tilt runs from 1 (film just below the fold) to 0 (film in the middle of the screen). */
.film--hero { --tilt: 1; transform-origin: 50% 0; transform: rotateX(calc(var(--tilt) * 20deg)) scale(calc(1 - var(--tilt) * .07)); will-change: transform; }

/* ---- a film: the clip, a pause button, and its chapters as segments that fill as it plays ---- */
.film { position: relative; margin: 0; }
.film__screen { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); background: #07070a; box-shadow: 0 40px 100px rgba(0,0,0,.65); }
.film__screen video { display: block; width: 100%; height: auto; cursor: pointer; }
.film__toggle { position: absolute; right: 14px; bottom: 14px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(8,8,10,.62); color: #fff; cursor: pointer; backdrop-filter: blur(8px); opacity: .75; transition: opacity .2s ease, transform .2s ease; }
.film__toggle:hover, .film__toggle:focus-visible { opacity: 1; transform: scale(1.06); }
.film__toggle:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
.film__toggle svg { width: 18px; height: 18px; fill: currentColor; }
.film__toggle .i-pause, .film.is-playing .film__toggle .i-play { display: none; }
.film.is-playing .film__toggle .i-pause { display: block; }
.film__steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.film__step { display: grid; gap: 9px; padding: 0; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; transition: color .2s ease; }
.film__step:hover, .film__step.is-on { color: var(--text-primary); }
.film__step:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; border-radius: 4px; }
.film__bar { position: relative; height: 3px; border-radius: 3px; background: var(--line-3); overflow: hidden; }
.film__bar i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--primary-color); border-radius: inherit; }
.film__step small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.film--hero .film__steps { max-width: 760px; margin: 22px auto 0; }

/* ---- numbers strip ---- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border-radius: 12px; overflow: hidden; margin-bottom: 104px; }
.fact { background: var(--surface-color); padding: 22px 24px; }
.fact b { display: block; font: italic 800 34px/1.1 var(--f-display); color: var(--text-primary); text-transform: uppercase; }
.fact span { font-size: 14px; color: var(--text-secondary); }

/* ---- section intros ---- */
.section-intro { max-width: 680px; margin-bottom: 44px; }
.section-intro--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-intro h2 { margin: 0 0 14px; font: italic 800 clamp(34px, 4.6vw, 56px)/.98 var(--f-display); text-transform: uppercase; }
.section-intro p { margin: 0; color: var(--text-secondary); font-size: 17px; line-height: 1.65; }

/* ---- how it works ---- */
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 120px; padding: 0; counter-reset: step; }
.how li { position: relative; list-style: none; padding: 24px 22px 22px; border-radius: 12px; background: var(--surface-color); counter-increment: step; }
.how li::before { content: counter(step, decimal-leading-zero); display: block; font: italic 800 38px/1 var(--f-display); color: var(--acc-a30); margin-bottom: 12px; }
.how h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.how p { margin: 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; }
.how .material-icons { position: absolute; top: 22px; right: 20px; color: var(--primary-color); font-size: 22px; }

/* ---- chapters: text on one side, the chapter's film on the other ---- */
.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: center; gap: 64px; margin-bottom: 120px; scroll-margin-top: 90px; }
.chapter--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.chapter--reverse .chapter__text { order: 2; }
.chapter__num { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.chapter__num .n { font: italic 800 56px/1 var(--f-display); color: var(--acc-a30); }
.chapter__tag { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-color); background: var(--acc-a08); border-radius: 999px; padding: 6px 12px; }
.chapter__text h2 { margin: 0 0 16px; font: italic 800 clamp(32px, 3.6vw, 46px)/.98 var(--f-display); text-transform: uppercase; }
.chapter__text > p { margin: 0 0 24px; color: var(--text-secondary); font-size: 16px; line-height: 1.7; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-secondary); line-height: 1.55; }
.feature-icon { color: var(--primary-color); font-size: 20px; flex-shrink: 0; }
.chapter .film::before { content: ''; position: absolute; inset: 10% 8% 16%; background: radial-gradient(closest-side, var(--primary-soft), transparent); filter: blur(50px); z-index: -1; }

/* What the app does not know, and does not guess. */
.fairplay { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; padding: 28px 30px; margin: -40px 0 120px; border-radius: 14px; background: linear-gradient(135deg, var(--acc-a08), transparent 60%), var(--surface-color); }
.fairplay .material-icons { font-size: 34px; color: var(--primary-color); }
.fairplay h3 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.fairplay p { margin: 0; color: var(--text-secondary); font-size: 15.5px; line-height: 1.65; max-width: 80ch; }

/* ---- the rest of the kit: stills, opened full size in the lightbox ---- */
.kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-bottom: 96px; }
.kit-card { border-radius: 12px; background: var(--surface-color); padding: 18px; transition: background-color .25s ease, transform .25s ease; }
.kit-card:hover { background: var(--surface-2); transform: translateY(-3px); }
.kit-card .shot { overflow: hidden; border-radius: 8px; border: 1px solid var(--line-2); margin-bottom: 18px; background: #07070a; aspect-ratio: 1600 / 1012; }
.kit-card .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; cursor: zoom-in; transition: transform .5s ease; }
.kit-card:hover .shot img { transform: scale(1.025); }
.kit-card .shot img:focus-visible { outline: 2px solid var(--primary-color); outline-offset: -2px; }
.kit-card h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.kit-card p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line-2); border-radius: 12px; overflow: hidden; margin: 0 0 96px; }
.spec { background: var(--background-color); padding: 22px; }
.spec dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-color); margin-bottom: 8px; }
.spec dd { margin: 0; font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

.final-cta { text-align: center; padding: 72px 24px; border-radius: 16px; background: radial-gradient(120% 140% at 50% 0%, var(--acc-a16), transparent 60%), var(--surface-color); }
.final-cta h2 { margin: 0 0 14px; font: italic 800 clamp(34px, 5vw, 60px)/.98 var(--f-display); text-transform: uppercase; }
.final-cta p { margin: 0 auto 32px; max-width: 54ch; color: var(--text-secondary); font-size: 17px; line-height: 1.65; }
.final-cta .final-cta__note { margin: 30px auto 0; max-width: 60ch; font-size: 14px; color: var(--text-muted); }

/* Sections rise into view once, as the page scrolls (only once the script runs). */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

.lightbox { position: fixed; inset: 0; z-index: 4000; display: grid; grid-template-rows: 1fr auto; gap: 16px; padding: 56px 24px 28px; background: rgba(6,6,8,.9); backdrop-filter: blur(10px); }
.lightbox[hidden] { display: none; }
.lightbox__stage { display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.7); background: var(--surface-color); animation: ov-lightbox-in .18s ease both; }
@keyframes ov-lightbox-in { from { opacity: 0; transform: scale(.97); } }
.lightbox__close { position: absolute; top: 16px; right: 20px; background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--line-2); border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--text-secondary); font-size: 14px; text-align: center; }
.lightbox__bar button { flex-shrink: 0; background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--line-2); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; }
.lightbox__count { color: var(--text-muted); }

@media (max-width: 1100px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .chapter, .chapter--reverse { grid-template-columns: 1fr; gap: 32px; margin-bottom: 96px; }
  .chapter--reverse .chapter__text { order: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fairplay { margin-top: -24px; }
}
@media (max-width: 900px) { .kit { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .overlay-landing { padding-top: 24px; }
  .app-hero-badge { flex-wrap: wrap; justify-content: center; gap: 4px 10px; border-radius: 16px; }
  .hero-stage { margin-bottom: 72px; }
  .film--hero { transform: rotateX(calc(var(--tilt) * 12deg)) scale(calc(1 - var(--tilt) * .04)); }
  .film__screen { border-radius: 10px; }
  .film__toggle { width: 34px; height: 34px; right: 10px; bottom: 10px; }
  .film__step { font-size: 12px; }
  .film__step small { display: none; }
  .lightbox { padding: 52px 12px 20px; }
  .how { grid-template-columns: 1fr; margin-bottom: 96px; }
  .fairplay { grid-template-columns: 1fr; padding: 22px; }
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 18px; }
  .fact b { font-size: 26px; }
  .chapter__num .n { font-size: 44px; }
  .btn-download, .soon-pill { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox__img, .hero-stage::before, .app-hero-badge .dot { animation: none; }
  .btn-download, .kit-card, .kit-card .shot img, .film__toggle { transition: none; }
  .film--hero { transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
