/* v1.6 — the expressive cut: cinematic scroll journey, theme-reactive stage,
   flow-field particles, full-bleed film chapters. Same LOVE elements. */
:root {
  --ink: #041620;
  --paper: #fff6e8;
  --yellow: #ffc500;
  --blue: #00adee;
  --green: #00a651;
  --ember: #f26522;
  --red: #ec1c24;
  --serif: "Didot", "Bodoni MT", Georgia, serif;
}
@font-face {
  font-family: "Barabara";
  src: url("assets/BARABARA-FONT.otf") format("opentype");
  font-display: swap;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
/* reactive stage */
.themewash { position: fixed; inset: 0; z-index: -3; background: #041620; transition: background-color 1.1s ease; }
body[data-theme="L"] .themewash { background: #062f52; }
body[data-theme="O"] .themewash { background: #0b3d24; }
body[data-theme="V"] .themewash { background: #471708; }
body[data-theme="E"] .themewash { background: #4d2c05; }
.bgtex { position: fixed; inset: -12%; z-index: -2; opacity: 0.8;
  background:
    radial-gradient(36% 32% at 16% 20%, rgba(0, 173, 238, 0.35), transparent 70%),
    radial-gradient(32% 30% at 84% 26%, rgba(0, 166, 81, 0.32), transparent 70%),
    radial-gradient(38% 36% at 74% 78%, rgba(246, 147, 29, 0.28), transparent 70%),
    radial-gradient(34% 32% at 18% 82%, rgba(236, 28, 36, 0.26), transparent 70%);
  animation: drift 34s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0); } to { transform: translate3d(2%, 2%, 0) scale(1.05); } }
#p5-holder, #p5-holder canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#cursor-light { position: fixed; z-index: 1; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(circle, rgba(255, 246, 232, 0.14), transparent 65%); }
main { position: relative; z-index: 2; }
/* progress + nav */
#progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--yellow), var(--ember), var(--red));
  transform-origin: 0 50%; transform: scaleX(0); }
nav { position: fixed; top: 3px; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem; padding: 0.65rem 1.3rem;
  background: rgba(4, 22, 32, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.92rem; }
nav .brand { font-family: "Barabara", sans-serif; font-size: 1.2rem; color: #fff; text-decoration: none; }
nav .brand b { font-weight: normal; color: var(--yellow); }
nav .links { margin-left: auto; display: flex; gap: 0.9rem; }
nav a { color: var(--paper); text-decoration: none; opacity: 0.85; }
nav a:hover { opacity: 1; color: var(--yellow); }
/* hero: headline behind, logo floating above */
.hero { position: relative; min-height: 108svh; display: grid; align-content: center;
  justify-items: center; text-align: center; padding: 6rem 1.2rem 4rem; overflow: clip; }
.hero-behind { position: absolute; inset: 0; display: grid; align-content: center; padding-top: 4rem; }
.hero-behind h1 { font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(3rem, 12vw, 9rem); line-height: 0.95; margin: 0; color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 246, 232, 0.5); }
.hero-behind h1 b { display: block; font-style: normal; -webkit-text-stroke: 0; color: #fff; }
.logo-stage { position: relative; width: min(880px, 90vw); z-index: 1; will-change: transform; }
#love-logo { width: 100%; height: auto; display: block; overflow: visible;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55)); }
#love-logo path { transform-box: fill-box; transform-origin: center; }
#love-logo.enter path { opacity: 0; transform: translate3d(0, 30px, 0) scale(0.94);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1.25) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-front { z-index: 1; margin-top: 1.6rem; }
.hero-front .eyebrow { font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--yellow); margin: 0 0 0.7rem; }
.hero-front p { margin: 0 auto; max-width: 36em; font-size: clamp(1rem, 2.4vw, 1.25rem); color: #f2ede2; }
.scroll-cue { margin-top: 2.2rem; font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.7; }
/* marquee */
.marquee { overflow: hidden; white-space: nowrap; padding: 1.1rem 0;
  border-top: 1px solid rgba(255,255,255,0.14); border-bottom: 1px solid rgba(255,255,255,0.14);
  background: rgba(0, 0, 0, 0.25); }
.marquee .track { display: inline-block; animation: slide 30s linear infinite; }
.marquee span { font-family: "Barabara", sans-serif; font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: transparent; -webkit-text-stroke: 1px rgba(255, 246, 232, 0.65); padding-right: 2.5rem; }
.marquee span i { font-style: normal; -webkit-text-stroke: 0; color: var(--yellow); }
@keyframes slide { to { transform: translateX(-50%); } }
/* chapters */
.chapter { position: relative; min-height: 108svh; display: grid; align-items: center;
  overflow: clip; content-visibility: auto; contain-intrinsic-size: 800px; }
.chapter-bg { position: absolute; inset: -12% 0; background-size: cover; background-position: center;
  will-change: transform; }
.chapter-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,22,32,0.82), rgba(4,22,32,0.45) 40%, rgba(4,22,32,0.9)); }
.chapter-inner { position: relative; width: min(1120px, 92vw); margin: 0 auto; padding: 16vh 0;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
.chapter:nth-of-type(even of .chapter) .text { order: 2; text-align: right; }
.chapter:nth-of-type(even of .chapter) .text p { margin-left: auto; }
.giant { font-family: var(--serif); font-size: clamp(7rem, 20vw, 15rem); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.4); margin: 0; }
.text .no { font-family: var(--serif); font-style: italic; color: var(--yellow); margin: 0.6rem 0 0.3rem; }
.text h2 { font-family: "Barabara", sans-serif; font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.2rem); margin: 0 0 0.9rem; color: #fff; }
.text p { margin: 0 0 1.3rem; max-width: 30em; line-height: 1.7; color: #f2ede2; }
.watch { font: inherit; font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  color: #041620; background: var(--paper); border: none; border-radius: 999px; padding: 0.7rem 1.6rem; }
.watch:hover { background: var(--yellow); }
.scene { position: relative; min-height: 380px; }
.float { position: absolute; will-change: transform; filter: drop-shadow(0 14px 24px rgba(0,0,0,0.5)); }
.float img { width: 100%; height: auto; display: block; }
.f1 { width: 44%; top: 0; left: 4%; }
.f2 { width: 34%; bottom: 0; right: 2%; }
.f3 { width: 24%; top: 40%; right: 12%; }
/* tile ribbon */
.ribbon { padding: 5rem 0 1rem; overflow: hidden; }
.ribbon h2 { text-align: center; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 1.6rem; }
.ribbon .track { display: flex; gap: 1rem; width: max-content; animation: slide 46s linear infinite; }
.ribbon img { width: 120px; height: 120px; border-radius: 22px; background: rgba(255,255,255,0.07);
  padding: 8px; }
/* palette + closing */
.palette { width: min(1000px, 92vw); margin: 0 auto; padding: 7rem 0 2rem; }
.palette h2 { font-family: "Barabara", sans-serif; font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem); color: #fff; margin: 0 0 0.5rem; }
.palette p { color: #f2ede2; max-width: 46em; margin: 0 0 1.4rem; line-height: 1.65; }
.gradient-bar { height: 90px; border-radius: 16px;
  background: linear-gradient(90deg, #0054a6, #00adee, #00a651, #ffc500, #f6931d, #f26522, #ec1c24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); }
.closing { text-align: center; padding: 9rem 1.2rem 3rem; }
.closing h2 { font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 5.5rem); margin: 0; color: #fff; }
.closing p { letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.78rem; color: var(--yellow); }
footer { text-align: center; padding: 1rem 1rem 3rem; color: rgba(255,246,232,0.65); font-size: 0.88rem; }
footer b { font-family: "Barabara", sans-serif; font-weight: 400; color: #fff; }
/* film lightbox */
.lightbox { position: fixed; inset: 0; z-index: 40; display: none; place-items: center;
  background: rgba(2, 10, 16, 0.9); padding: 1.2rem; }
.lightbox.open { display: grid; }
.lightbox video { width: min(960px, 94vw); border-radius: 12px; background: #000;
  box-shadow: 0 40px 90px rgba(0,0,0,0.6); }
.lightbox .close { position: absolute; top: 1rem; right: 1.2rem; font-size: 1rem;
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 999px; padding: 0.4rem 1rem; cursor: pointer; }
/* reveal */
.rv { opacity: 0; transform: translate3d(0, 36px, 0); transition: opacity 0.8s ease, transform 0.8s ease; }
.rv.in { opacity: 1; transform: none; }
@media (max-width: 780px) {
  .chapter-inner { grid-template-columns: 1fr; }
  .chapter:nth-of-type(even of .chapter) .text { order: 0; text-align: left; }
  .chapter:nth-of-type(even of .chapter) .text p { margin-left: 0; }
  .scene { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bgtex, .marquee .track, .ribbon .track { animation: none; }
  #love-logo.enter path { animation: none; opacity: 1; transform: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  #cursor-light { display: none; }
}
