/* Text-free scroll film at the top of the page.
   Engine: js/cinematic-scroll.js. Clips: js/intro-config.js. */

html, body { background: var(--ll-ink); color: #fff; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

#scrollProgress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: rgba(255,255,255,.08); overflow: hidden; }
#scrollProgress span { display: block; height: 100%; width: 100%; background: var(--ll-pink); transform-origin: left center; transform: scaleX(0); }

/* Top bar: logo + Apply only */
.cin-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--ll-gutter); pointer-events: none;
  transition: opacity .35s ease;
}
.cin-brand { display: flex; align-items: center; pointer-events: auto; }
.cin-brand img { height: clamp(30px, 4.4vw, 42px); width: auto; display: block; filter: drop-shadow(0 2px 12px rgba(0,0,0,.35)); }
.cin-cta-top {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px;
  background: var(--ll-pink-strong); color: #fff; text-decoration: none;
  font-family: var(--ll-font-body); font-weight: 600; font-size: 15px;
  min-height: 44px; padding: 0 22px; border-radius: var(--ll-r-pill);
  box-shadow: var(--ll-shadow-pink);
  transition: transform .2s var(--ll-ease-press), background .2s ease;
}
.cin-cta-top:hover { transform: translateY(-2px); background: var(--ll-pink-press); }
.cin-cta-top:active { transform: translateY(0) scale(.97); }

/* Scene dots */
#navDots {
  position: fixed; right: clamp(14px, 3vw, 28px); top: 50%; transform: translateY(-50%);
  z-index: 140; display: flex; flex-direction: column; gap: 4px;
}
#navDots button {
  width: 24px; height: 24px; border: none; padding: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
#navDots button::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4); box-shadow: 0 0 8px rgba(0,0,0,.3);
  transition: transform .25s var(--ll-ease), background .25s ease;
}
#navDots button.is-active::before { background: var(--ll-pink); transform: scale(1.45); }

/* Film stage */
#cinStage { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #0d0b0c; }
.cin-layer { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.cin-layer__still, .cin-layer video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.cin-layer video { opacity: 0; transition: opacity .25s ease; }
.cin-layer.has-video video { opacity: 1; }
/* Gentle top shade for the logo and a soft vignette; no copy sits on the film */
#cinStage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(180deg, rgba(13,11,12,.42) 0%, rgba(13,11,12,0) 18%),
    radial-gradient(ellipse 95% 85% at 50% 50%, transparent 62%, rgba(0,0,0,.28) 100%);
}

/* Scroll hint: an icon, no words */
.cin-scroll-hint {
  position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  z-index: 120; width: 26px; height: 40px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,.75); box-shadow: 0 2px 14px rgba(0,0,0,.35);
  transition: opacity .4s ease;
}
.cin-scroll-hint i {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: cinWheel 1.8s var(--ll-ease) infinite;
}
@keyframes cinWheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

@media (max-width: 640px) {
  #navDots { display: none; }
  .cin-cta-top { font-size: 14px; padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cin-scroll-hint i { animation: none; }
  .cin-layer video { transition: none; }
}

/* Hand-off from the film to the page below */
#cinExperience { transition: opacity .2s linear; }
body.cinematic-handoff #cinExperience { pointer-events: none; }
body.cinematic-complete #cinExperience { opacity: 0 !important; visibility: hidden; pointer-events: none; }
body.cinematic-complete .cin-scroll-hint,
body.cinematic-complete #navDots,
body.cinematic-complete .cin-topbar { opacity: 0; pointer-events: none; }
body.cinematic-handoff .cin-topbar { opacity: 0; pointer-events: none; }

#landingSite { position: relative; z-index: 30; background: var(--ll-cream); color: var(--ll-ink); overflow-x: clip; }
#landingNav { opacity: 0; pointer-events: none; transition: opacity .55s ease; }
body.cinematic-complete #landingNav,
body.cinematic-handoff #landingNav { opacity: 1; pointer-events: auto; }
body.cinematic-complete { background: var(--ll-cream); color: var(--ll-ink); }
