/* Shared look for scroll-film demos. Each page sets --bg --bg-2 --text --muted --accent --accent-ink and fonts. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; overflow-x: clip; }
a { color: inherit; }
.nw { white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 7.5vw, 6rem); margin-top: .45rem; }
h2 { font-size: clamp(1.8rem, 4.6vw, 3.4rem); }
.kicker { font-size: .85rem; letter-spacing: .14em; color: var(--accent); }
.lead { margin-top: .9rem; color: var(--muted); }

.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); background: linear-gradient(color-mix(in srgb, var(--bg) 80%, transparent), transparent); }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-decoration: none; white-space: nowrap; }
.nav-cta { font-size: .9rem; text-decoration: none; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); padding: .35rem 1rem; border-radius: 99px; }

.btn { display: inline-block; padding: .85rem 1.9rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; transition: transform .2s; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); box-shadow: none; }

.film { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: absolute; inset: 0; pointer-events: none; }
.beat { position: absolute; z-index: 3; opacity: 0; will-change: opacity, translate; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.scroll-hint { position: absolute; z-index: 3; bottom: 1.5rem; left: 50%; transform: translateX(-50%); font-size: .8rem; color: var(--muted); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

.demo-note { border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 4rem 1.25rem 5rem; text-align: center; color: var(--muted); }
.demo-note strong { color: var(--text); }
.demo-note .btn { margin-top: 1.4rem; }
.back { margin-top: 2rem; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100% - 2rem); padding: .75rem 1.25rem; border-radius: 1rem; background: var(--text); color: var(--bg); font-size: .9rem; box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}
@media (max-width: 899px) { .nav-cta { font-size: .8rem; padding: .3rem .8rem; } }
