/* ============================================================
   BASEBLOOM · Concept 04 — Motion & Narrative
   Projector dark · cream titles · signal orange / skyline blue
   ============================================================ */

:root {
  --screen:   #0a0e14;   /* projector-room dark */
  --screen-2: #101826;
  --cream:    #f5efe2;   /* title cards */
  --cream-dim:#b9b2a2;
  --cream-fnt:#6d6a60;
  --signal:   #ff7847;   /* signal orange */
  --sky:      #4aa8ff;   /* skyline blue */
  --hairline: rgba(245,239,226,0.16);
  --display:  "Archivo", system-ui, sans-serif;
  --serif:    "Newsreader", Georgia, serif;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--screen);
  color: var(--cream-dim);
  font-family: var(--display);
  font-variation-settings: "wdth" 100, "wght" 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255,120,71,0.35); color: var(--cream); }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #060a10; }
::-webkit-scrollbar-thumb { background: #223048; border-radius: 9px; border: 2px solid #060a10; }
::-webkit-scrollbar-thumb:hover { background: var(--signal); }

/* film grain */
.film-grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- slate (topbar) ---------- */
.slate {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.6rem;
  padding: clamp(0.9rem, 2vw, 1.4rem) clamp(1.2rem, 3.5vw, 2.6rem);
  pointer-events: none;
}
.slate > * { pointer-events: auto; }
.slate-brand {
  font-variation-settings: "wdth" 118, "wght" 800;
  font-size: 0.85rem; letter-spacing: 0.14em; color: var(--cream);
}
.slate-brand .tick { color: var(--signal); margin: 0 0.3em; }
.slate-note {
  margin-left: auto; font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--cream-fnt);
}
.slate-cta {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--signal); padding: 0.5rem 1.05rem;
  border: 1px solid rgba(255,120,71,0.45); border-radius: 999px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.slate-cta:hover { background: var(--signal); color: var(--screen); }

/* film-strip act indicator */
.strip {
  position: fixed; left: clamp(0.7rem, 1.6vw, 1.4rem); top: 50%; transform: translateY(-50%);
  z-index: 35; display: flex; flex-direction: column; gap: 1.1rem;
}
.strip a { display: flex; align-items: center; gap: 0.55rem; opacity: 0.45;
  transition: opacity 0.4s var(--ease); }
.strip a i { width: 22px; height: 15px; border: 1.5px solid var(--cream);
  border-radius: 2px; display: block; position: relative; }
.strip a i::before, .strip a i::after { content: ""; position: absolute; top: 2px; bottom: 2px;
  width: 2px; background: var(--cream); opacity: 0.5; }
.strip a i::before { left: -5px; } .strip a i::after { right: -5px; }
.strip a span { font-size: 0.56rem; letter-spacing: 0.2em; color: var(--cream-fnt); }
.strip a.on { opacity: 1; }
.strip a.on i { border-color: var(--signal); box-shadow: 0 0 10px -2px var(--signal); }
.strip a.on span { color: var(--signal); }
@media (max-width: 900px) { .strip { display: none; } }

/* scene color temperature — a slow wash that follows the act */
.temp { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  transition: background 1.2s var(--ease); }
body[data-scene="0"] .temp { background: radial-gradient(ellipse 90% 70% at 50% 30%, rgba(74,168,255,0.07), transparent 65%); }
body[data-scene="1"] .temp { background: radial-gradient(ellipse 90% 70% at 30% 60%, rgba(74,168,255,0.09), transparent 65%); }
body[data-scene="2"] .temp { background: radial-gradient(ellipse 90% 70% at 70% 40%, rgba(245,239,226,0.06), transparent 65%); }
body[data-scene="3"] .temp { background: radial-gradient(ellipse 90% 70% at 40% 50%, rgba(255,120,71,0.09), transparent 65%); }
body[data-scene="4"] .temp { background: radial-gradient(ellipse 90% 70% at 60% 30%, rgba(255,120,71,0.13), transparent 60%); }

/* ---------- acts: tall sections with pinned stages ---------- */
.act { position: relative; height: 320vh; }
.act-title-card { height: 260vh; }
.act-pin {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* title card */
.tc-inner {
  position: relative; z-index: 2; max-width: 52rem; text-align: center;
  padding: 0 clamp(1.3rem, 5vw, 3rem);
}
.tc-presents {
  font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 1.6rem;
}
.tc-title {
  color: var(--cream);
  font-variation-settings: "wdth" 122, "wght" 850;
  font-size: clamp(2.9rem, 9vw, 7rem);
  line-height: 0.96; letter-spacing: -0.015em; text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.tc-line { display: block; }
.tc-em { color: var(--signal); }
.tc-lede {
  font-family: var(--serif); font-variation-settings: normal;
  font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.65;
  color: var(--cream-dim); max-width: 38rem; margin: 0 auto;
}
.tc-cue {
  margin-top: 2.4rem; display: inline-flex; flex-direction: column;
  align-items: center; gap: 0.55rem;
  font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--cream-fnt);
}
.tc-cue i {
  width: 1px; height: 40px; display: block;
  background: linear-gradient(var(--signal), transparent);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}
/* generated projector-beam still (Higgsfield · Recraft) — dim atmosphere behind the title */
.tc-beam {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% 55%, transparent 30%, rgba(10,14,20,0.85) 100%),
    linear-gradient(rgba(10,14,20,0.55), rgba(10,14,20,0.55)),
    url("https://d8j0ntlcm91z4.cloudfront.net/user_3F5eFCTjC13qazL99gDxXr3xTjG/hf_20260721_042728_0870eb12-3ccf-4bdc-a89a-6f4fddf1c278_min.webp") center/cover no-repeat;
  opacity: 0.55; filter: saturate(1.1);
}
/* cinematic letterbox bars that open as you scroll */
.tc-bars i {
  position: absolute; left: 0; right: 0; height: 18vh; background: #05070b;
  z-index: 3;
}
.bar-t { top: 0; transform: translateY(calc(var(--p, 0) * -100%)); }
.bar-b { bottom: 0; transform: translateY(calc(var(--p, 0) * 100%)); }

/* act stage */
.act-numeral {
  position: absolute; z-index: 0;
  font-variation-settings: "wdth" 125, "wght" 900;
  font-size: clamp(14rem, 42vw, 34rem); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(74,168,255,0.22);
  user-select: none;
}
.act-art {
  position: relative; z-index: 1;
  width: min(52vw, 560px); height: auto;
  overflow: visible;
}
.act-art .draw {
  fill: none; stroke: var(--cream); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.act-art .draw-accent { stroke: var(--signal); }
.act-art .draw-dotted { stroke-dasharray: 1 10 !important; }  /* overridden by JS drawing */
.act-art .ball { fill: var(--signal); }

.act-copy {
  position: absolute; z-index: 2;
  left: clamp(1.3rem, 6vw, 6rem); bottom: clamp(4.5rem, 12vh, 8rem);
  max-width: 24rem;
}
.act[data-act="2"] .act-copy,
.act[data-act="4"] .act-copy { left: auto; right: clamp(1.3rem, 6vw, 6rem); }
.act-kicker {
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sky); margin-bottom: 0.7rem;
}
.act-name {
  color: var(--cream);
  font-variation-settings: "wdth" 120, "wght" 800;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1;
  text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 0.9rem;
}
.act-text {
  font-family: var(--serif); font-variation-settings: normal;
  font-size: 0.98rem; line-height: 1.7; color: var(--cream-dim);
}

/* ---------- credits ---------- */
.credits {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(5rem, 12vh, 8rem) clamp(1.3rem, 5vw, 3rem);
  background: linear-gradient(var(--screen), #05070b);
}
.credits-inner { max-width: 40rem; text-align: center; }
.cr-kicker {
  font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 1.3rem;
}
.cr-title {
  color: var(--cream);
  font-variation-settings: "wdth" 122, "wght" 850;
  font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 0.98;
  text-transform: uppercase; margin-bottom: 1.4rem;
}
.cr-text {
  font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 32rem; margin: 0 auto 2.2rem; color: var(--cream-dim);
}
.cr-cta {
  display: inline-block; font-size: 0.85rem; letter-spacing: 0.14em;
  text-transform: uppercase; font-variation-settings: "wdth" 110, "wght" 700;
  color: var(--screen); background: var(--signal);
  padding: 1rem 2.1rem; border-radius: 999px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cr-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 44px -10px rgba(255,120,71,0.6); }
.cr-roll {
  margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.2rem 2rem; text-align: left;
}
.cr-roll div { border-top: 1px solid var(--hairline); padding-top: 0.7rem; }
.cr-roll dt {
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-fnt); margin-bottom: 0.2rem;
}
.cr-roll dd { font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--cream-dim); }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  padding: 1.6rem clamp(1.3rem, 5vw, 3rem) 2.2rem;
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-fnt); background: #05070b;
  border-top: 1px solid var(--hairline);
}
.foot-right { margin-left: auto; color: var(--signal); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .slate-note { display: none; }
  .act { height: 260vh; }
  .act-art { width: 78vw; }
  .act-copy { left: 1.3rem; right: 1.3rem; max-width: none; bottom: 3.2rem; }
  .act[data-act="2"] .act-copy, .act[data-act="4"] .act-copy { left: 1.3rem; right: 1.3rem; }
}

/* ---------- reduced motion: every scene readable, nothing pinned ---------- */
@media (prefers-reduced-motion: reduce) {
  .act { height: auto; }
  .act-pin { position: relative; height: auto; min-height: 100vh; flex-direction: column; gap: 2rem; padding: 6rem 1.3rem; }
  .act-copy { position: relative; left: 0 !important; right: 0 !important; bottom: 0; }
  .tc-bars, .tc-cue i { display: none; }
  .act-art .draw { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
}
