/* Cinema — scroll scenes, blurred background canvas (terminals + token stream), motion. Light theme. Loads after style.css. */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* background film: a blurred canvas of terminals running scripts and a model streaming tokens (bgterm.js), washed to paper so type stays crisp */
.film { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg2); }
.film video { display: none; }
.film canvas { position: absolute; inset: -3%; width: 106%; height: 106%; opacity: 0; transition: opacity 1.6s ease; }
.film canvas.on { opacity: 1; }
.film::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(245,247,250,.82) 0%, rgba(245,247,250,.6) 36%, rgba(245,247,250,.3) 60%, rgba(245,247,250,.12) 100%),
  linear-gradient(180deg, rgba(245,247,250,.55) 0%, rgba(245,247,250,.1) 26%, rgba(245,247,250,.1) 72%, var(--bg) 100%); }
.phero .film::after { background: linear-gradient(90deg, rgba(245,247,250,.95) 0%, rgba(245,247,250,.85) 42%, rgba(245,247,250,.55) 100%), linear-gradient(180deg, rgba(245,247,250,.6), rgba(245,247,250,.3) 40%, var(--bg) 100%); }
@media (max-width: 960px) { .film::after, .phero .film::after { background: rgba(245,247,250,.9); } }
.nav, header, section, footer, .strip, main { position: relative; z-index: 1; }
.hero > .wrap, .phero > .wrap { position: relative; z-index: 2; }

/* nav: white glass, hairline appears once you move */
.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 50; background: rgba(245,247,250,.72); border-bottom-color: transparent; transition: background .35s, border-color .35s; }
.nav.scrolled { background: rgba(245,247,250,.9); border-bottom-color: var(--line); }
.phero { padding-top: 160px; }

/* progress + section dots */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 14px; }
.dots a { display: flex; align-items: center; gap: 10px; justify-content: flex-end; color: var(--muted); font-size: 12px; font-weight: 500; opacity: .6; transition: opacity .25s; }
.dots a span { opacity: 0; transform: translateX(6px); transition: .25s; }
.dots a i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); transition: .25s; }
.dots a:hover span, .dots a.on span { opacity: 1; transform: none; }
.dots a.on, .dots a:hover { opacity: 1; }
.dots a.on i { background: var(--text); transform: scale(1.25); }
@media (max-width: 960px) { .dots { display: none; } }

/* scenes */
.scene { min-height: 100vh; display: flex; align-items: center; padding: 120px 0; }
.scene > .wrap { width: 100%; }
section.tight.scene { min-height: 70vh; }
section.scene { background: var(--bg); }

/* hero */
.hero.cine { min-height: 100vh; padding: 120px 0 80px; display: flex; align-items: center; overflow: hidden; background: var(--bg); }
.hero.cine > .wrap { width: 100%; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; z-index: 3; }
.scroll-hint span { width: 1px; height: 46px; background: linear-gradient(to bottom, var(--line2), transparent); position: relative; overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; left: 0; top: -20px; width: 1px; height: 20px; background: var(--text); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { to { top: 56px; } }
.desk { position: relative; }
.desk .sent { position: absolute; right: 14px; top: 10px; background: var(--ok-soft); border: 1px solid rgba(31,157,99,.35); color: var(--ok); font-weight: 600; font-size: 12px; padding: 6px 12px; border-radius: 4px; opacity: 0; transform: translateY(8px); }

/* marquee strip */
.strip { overflow: hidden; }
.strip .track { display: flex; gap: 64px; width: max-content; animation: marq 32s linear infinite; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; padding: 0 32px; }
.strip .track span::before { content: "·"; color: var(--line2); font-size: 18px; margin-right: 22px; vertical-align: middle; line-height: 0; }
@keyframes marq { to { transform: translateX(-50%); } }
.strip:hover .track { animation-play-state: paused; }

/* pipeline scene */
#pipeline { min-height: 100vh; display: flex; align-items: center; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#pipeline > .wrap { width: 100%; position: relative; z-index: 2; }
#pipeline .film::after { background: linear-gradient(90deg, rgba(245,247,250,.93) 0%, rgba(245,247,250,.78) 42%, rgba(245,247,250,.25) 70%, rgba(245,247,250,.05) 100%), linear-gradient(180deg, rgba(245,247,250,.6), rgba(245,247,250,0) 30%, rgba(245,247,250,0) 70%, var(--bg2) 100%); }
.pipe { display: grid; grid-template-columns: 56px minmax(0, 560px); gap: 28px; align-items: stretch; justify-content: start; min-height: 60vh; }
.pipe-bar { width: 2px; background: var(--line); position: relative; margin: 8px auto; }
.pipe-bar i { position: absolute; inset: 0; background: var(--text); transform-origin: 50% 0; transform: scaleY(0); }
.pipe-count { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 600; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.pipe-steps { position: relative; min-height: 360px; }
.pstep { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.pstep .n { font-size: 56px; font-weight: 600; line-height: 1; color: var(--accent); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pstep h2 { font-size: clamp(28px, 3.4vw, 44px); }
.pstep p { color: var(--muted); font-size: 17px; max-width: 480px; }
.pstep .who { display: flex; gap: 8px; flex-wrap: wrap; }
.pstep .who span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 5px 10px 5px 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); color: var(--text2); display: inline-flex; align-items: center; gap: 7px; }
.pstep .who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line2); }
.pstep .who .research::before { background: var(--accent); } .pstep .who .writer::before { background: var(--warn); } .pstep .who .qa::before { background: #8a5cf6; } .pstep .who .crm::before { background: var(--ok); } .pstep .who .atlas::before { background: var(--ink); } .pstep .who .you::before { background: var(--text); box-shadow: 0 0 0 3px var(--line); }
@media (max-width: 960px) { .pipe { grid-template-columns: 24px 1fr; } .pstep .n { font-size: 44px; } }

/* gallery scene (horizontal on desktop) */
#demo.scene { display: block; padding: 90px 0 0; min-height: 100vh; overflow: hidden; }
#demo .demo-head { padding-bottom: 24px; }
#demo .demo-head p.lead { font-size: 16px; max-width: 720px; }
.shots-track { display: flex; gap: 26px; padding: 0 24px 60px; width: max-content; will-change: transform; }
.shots-track figure { width: min(72vw, 1040px); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: 0 0 auto; box-shadow: var(--shadow-lg); }
.shots-track img { width: 100%; height: min(44vh, 520px); object-fit: cover; object-position: top; display: block; border-bottom: 1px solid var(--line); }
.shots-track figcaption { padding: 16px 20px; font-size: 14px; color: var(--muted); display: flex; gap: 14px; align-items: baseline; }
.shots-track figcaption b { color: var(--text); font-size: 15px; white-space: nowrap; font-weight: 600; }
.shots-track figcaption em { font-style: normal; color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .1em; }
@media (max-width: 820px) {
  #demo.scene { min-height: 0; padding: 80px 0 40px; }
  .shots-track { flex-direction: column; width: auto; padding: 0 0 20px; }
  .shots-track figure { width: 100%; }
  .shots-track img { height: auto; }
}

/* buttons: arrow slide only */
.btn .ar { display: inline-block; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn:hover .ar { transform: translateX(4px); }
.btn:active { transform: scale(.985); }

/* headline emphasis word: plain, one accent */
.gw { color: var(--accent); font-weight: 600; }

/* reveal fallback (no GSAP / reduced motion) */
html:not(.cine) .rv { opacity: 0; transform: translateY(16px); transition: .6s ease; }
html:not(.cine) .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .strip .track, .scroll-hint span::after { animation: none; }
  .film canvas { display: none; }
}
