/**
 * style.css — Búp Sen Xanh Book Presentation
 * 
 * Design: Cinematic scroll, morning/evening hover reveal
 * Fonts: Playfair Display (headings) + Inter (body) + Cormorant Garamond (quotes)
 * Palette: Historical warm tones — sen gold, moss green, brick red, deep navy
 */

/* ============================================= */
/* DESIGN TOKENS                                 */
/* ============================================= */
:root {
  /* Colors — Historical warm palette */
  --color-bg-deep: #0F0F1A;
  --color-bg-section: #141422;
  --color-bg-card: rgba(25, 25, 45, 0.8);
  --color-bg-card-hover: rgba(35, 35, 60, 0.9);

  --color-gold: #D4A853;
  --color-gold-light: #E8C97A;
  --color-gold-dim: rgba(212, 168, 83, 0.15);

  --color-moss: #3A7D5C;
  --color-moss-dim: rgba(58, 125, 92, 0.15);

  --color-brick: #9B4D4D;
  --color-brick-dim: rgba(155, 77, 77, 0.15);

  --color-cream: #F5E6C8;
  --color-cream-dim: rgba(245, 230, 200, 0.08);

  --color-text-primary: #F0E8D8;
  --color-text-secondary: rgba(240, 232, 216, 0.7);
  --color-text-dim: rgba(240, 232, 216, 0.4);

  --color-border: rgba(212, 168, 83, 0.2);
  --color-border-light: rgba(240, 232, 216, 0.08);

  /* Typography */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-quote: 'Cormorant Garamond', 'Georgia', serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --color-lavender: #D6B4FC;
  --color-lavender-glow: rgba(214, 180, 252, 0.45);
  --color-lavender-deep: #1A0533;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: all 0.4s var(--ease-smooth);

  /* Reveal circle radius (reference: 260px) */
  --reveal-radius: 260px;
}


/* ============================================= */
/* RESET & BASE                                  */
/* ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

img {
  max-width: 100%;
  display: block;
}


/* ============================================= */
/* SCROLL ANIMATION BASE                         */
/* ============================================= */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================= */
/* HERO SECTION — Morning / Evening Reveal       */
/* ============================================= */
.hero-reveal {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 650px;
  overflow: hidden;
  background-color: var(--color-bg-deep);
  user-select: none;
  -webkit-user-select: none;
}

/* Shared image styles — ensure exact dimensions and prevent drag/click interference */
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Evening image — default visible background layer */
.hero-evening {
  z-index: 1;
}

/* Morning image — revealed on top via radial mask on hover (radius: 280px) */
.hero-morning {
  z-index: 2;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    circle var(--reveal-radius, 280px) at var(--mx, -600px) var(--my, -600px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 58%,
    rgba(0, 0, 0, 0.45) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    circle var(--reveal-radius, 280px) at var(--mx, -600px) var(--my, -600px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 58%,
    rgba(0, 0, 0, 0.45) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  will-change: mask-image, -webkit-mask-image;
}

/* 
 * Atmospheric feathered shadow behind left-side text:
 * A large, feathered, subtle shadow fading toward center.
 * NOT a visible rectangular overlay — preserves background colors on center/right!
 */
.hero-atmospheric-shadow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 85% at 85% 50%,
    rgba(10, 8, 22, 0.78) 0%,
    rgba(10, 8, 22, 0.52) 35%,
    rgba(10, 8, 22, 0.15) 60%,
    transparent 78%
  );
}

/* Organic bottom dissolve: seamlessly merges Hero into sketchbook paper tone #ece7dc without any blur */
.hero-reveal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(236, 231, 220, 0.08) 25%,
    rgba(236, 231, 220, 0.3) 50%,
    rgba(236, 231, 220, 0.68) 75%,
    #ece7dc 100%
  );
  pointer-events: none;
  z-index: 4;
}

/* ============================================= */
/* HERO TOP NAVIGATION                           */
/* ============================================= */
.hero-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.2rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 25;
  box-sizing: border-box;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 0.85;
}

.logo-symbol {
  font-size: 1.3rem;
  color: var(--color-lavender);
  filter: drop-shadow(0 0 10px var(--color-lavender-glow));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.nav-link {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(240, 232, 216, 0.72);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-cream);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-lavender), var(--color-gold));
  transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

/* ============================================= */
/* HERO MAIN CONTENT — Left Aligned              */
/* ============================================= */
.hero-left-content {
  position: absolute;
  top: 50%;
  right: 6vw;
  left: auto;
  transform: translateY(-50%);
  max-width: 560px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.25);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  backdrop-filter: blur(12px);
  margin-bottom: 1.6rem;
  pointer-events: auto;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold);
}

.hero-title-cinematic {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 4.2vw, 4.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cream);
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

.accent-lavender {
  color: var(--color-lavender);
  background: linear-gradient(135deg, #F0DEFD 0%, #D6B4FC 60%, #B987F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-shadow: 0 0 35px rgba(214, 180, 252, 0.4);
}

.hero-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(240, 232, 216, 0.82);
  margin-bottom: 2.4rem;
  max-width: 520px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.hero-cta-wrapper {
  pointer-events: auto;
}

.cta-circular-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.cta-arrow-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 230, 200, 0.08);
  border: 1px solid rgba(214, 180, 252, 0.4);
  color: var(--color-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.35s var(--ease-smooth);
}

.cta-circular-btn:hover .cta-arrow-circle {
  background: var(--color-lavender);
  color: #1A0533;
  transform: scale(1.08) rotate(45deg);
  box-shadow: 0 0 25px rgba(214, 180, 252, 0.6);
  border-color: var(--color-lavender);
}

.cta-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-cream);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.cta-circular-btn:hover .cta-text {
  color: var(--color-lavender);
}

/* ============================================= */
/* HERO RIGHT VERTICAL INDICATOR                 */
/* ============================================= */
.hero-vertical-indicator {
  display: none;
}

.indicator-dot {
  font-size: 0.55rem;
  color: var(--color-lavender);
  opacity: 0.85;
}

/* ============================================= */
/* HERO BOTTOM-LEFT SCROLL EXPLORE               */
/* ============================================= */
.hero-scroll-explore {
  position: absolute;
  bottom: 2.5rem;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  z-index: 25;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.hero-scroll-explore:hover {
  opacity: 0.8;
}

.scroll-line {
  width: 45px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-lavender), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #ffffff;
  animation: light-slide 2.2s infinite;
}

@keyframes light-slide {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.scroll-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.6);
}




/* ============================================= */
/* SKETCHBOOK — 3D Tactile Historical Book       */
/* ============================================= */
/* ============================================= */
/* THREEUI EXACT SOURCE INTEGRATION               */
/* Component: <MengToSketchbookLandingPage />     */
/* Source revision: SHA-256 e0330548b1ac          */
/* ============================================= */

.sketchbook-section {
  position: relative;
  width: 100%;
  background-color: #ece7dc;
  padding: 3rem 0 0;
  overflow: hidden;
  box-sizing: border-box;
}

.sketchbook-outer-header {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 1.8rem;
  padding: 0 1.5rem;
}

.sb-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8c683b;
  margin-bottom: 0.8rem;
}

.sb-tag-line {
  width: 26px;
  height: 1px;
  background: #8c683b;
  opacity: 0.6;
}

.sb-header-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: #2b2721;
  line-height: 1.15;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}

.sb-header-subtitle {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #5c5446;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 680px;
}

.sketchbook-actions-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.3rem;
}

.sb-fullscreen-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  background: rgba(43, 39, 33, 0.06);
  border: 1px solid rgba(43, 39, 33, 0.2);
  color: #2b2721;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  text-decoration: none;
}

.sb-fullscreen-link:hover {
  background: #2b2721;
  border-color: #2b2721;
  color: #FAF5EB;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(43, 39, 33, 0.18);
}

/* ---------------- The Shader Frame Container (Full-Bleed, Unboxed) ---------------- */
.shader-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 98vh;
  min-height: 760px;
  max-height: 1020px;
  margin: 0;
  overflow: hidden;
  background: #ece7dc;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.threeui-background.landing-page-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #ece7dc;
  pointer-events: auto;
}

.threeui-background.landing-page-frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ece7dc;
}

/* ---------------- Footer ---------------- */
/* ============================================= */
/* CINEMATIC END CREDITS SECTION                 */
/* ============================================= */
.cinematic-credits-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 40%, #0e0a1a 0%, #06040a 75%, #030205 100%);
  color: var(--color-cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8rem 1.5rem 5rem;
}

/* Organic top dissolve from ThreeUI sketchbook paper tone #ece7dc */
.cinematic-credits-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background: linear-gradient(
    180deg,
    #ece7dc 0%,
    rgba(236, 231, 220, 0.45) 30%,
    rgba(14, 10, 26, 0.75) 75%,
    #06040a 100%
  );
  pointer-events: none;
  z-index: 5;
}

/* Background atmospheric layers */
.credits-bg-layer {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/evening.png');
  background-position: center bottom;
  background-size: cover;
  opacity: 0.12;
  filter: brightness(0.25) contrast(1.15) saturate(0.5);
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 1;
}

.credits-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 85% 75% at 50% 50%,
    rgba(6, 4, 10, 0.35) 0%,
    rgba(6, 4, 10, 0.85) 60%,
    #06040a 100%
  );
  pointer-events: none;
  z-index: 2;
}

.credits-mist-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 60%,
    rgba(214, 180, 252, 0.05) 0%,
    transparent 65%
  );
  animation: mist-breathe 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 3;
}

@keyframes mist-breathe {
  0% { opacity: 0.25; transform: scale(1); }
  100% { opacity: 0.55; transform: scale(1.08); }
}

/* Petals canvas */
.credits-petals-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* Stage container */
.credits-inner-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Base Act styling */
.credits-act {
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.credits-act.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateY(0);
}

.credits-act.is-hidden {
  display: none !important;
}

/* ============================================= */
/* ACT I: PROLOGUE                               */
/* ============================================= */
.act-prologue {
  padding: 2rem 0;
}

.credits-micro-intro {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.4rem;
  opacity: 0.9;
}

.credits-main-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cream);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.8);
}

.credits-title-accent {
  color: var(--color-lavender);
  background: linear-gradient(135deg, #F0DEFD 0%, #D6B4FC 60%, #B987F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.credits-title-lotus {
  font-size: 1.6rem;
  margin: 0.5rem 0 1.2rem;
  filter: drop-shadow(0 0 14px rgba(214, 180, 252, 0.5));
}

.credits-prologue-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(240, 232, 216, 0.8);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.credits-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.6rem 1.4rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.credits-start-btn:hover {
  opacity: 0.85;
  transform: translateY(2px);
}

.prompt-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}

.credits-start-btn .prompt-line:last-child {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

.prompt-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-light);
}

/* ============================================= */
/* ACT II: SEQUENTIAL MEMBER REEL               */
/* ============================================= */
.act-reel {
  padding: 3rem 0;
  min-height: 420px;
}

.credits-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.credits-card.card-enter {
  animation: credit-card-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.credits-card.card-exit {
  animation: credit-card-out 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes credit-card-in {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes credit-card-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
}

.credits-role-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.credits-role-line {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}

.credits-role-wrapper .credits-role-line:last-child {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

.credits-role {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.credits-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cream);
  letter-spacing: 0.02em;
  margin: 0 0 0.8rem;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.8);
}

.credits-note {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(240, 232, 216, 0.65);
  margin: 0;
  min-height: 1.4rem;
}

/* SPECIAL HIGHLIGHT: DESIGNER ĐỖ TIẾN LỘC */
.credits-card.is-designer .credits-role {
  color: #ffd984;
  letter-spacing: 0.42em;
}

.credits-card.is-designer .credits-name {
  font-size: clamp(3rem, 6.5vw, 5.2rem);
}

.credits-card.is-designer .name-text {
  background: linear-gradient(
    110deg,
    #FAF6EE 0%,
    #FAF6EE 35%,
    #FFF0C2 50%,
    #FAF6EE 65%,
    #FAF6EE 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: designer-light-sweep 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 25px rgba(243, 216, 154, 0.45));
}

@keyframes designer-light-sweep {
  0% { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}

/* SLEEK CONTROLS BAR (HUD) */
.credits-hud-bar {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 3.5rem;
  background: rgba(18, 14, 28, 0.65);
  border: 1px solid rgba(214, 180, 252, 0.2);
  border-radius: 100px;
  padding: 0.55rem 1.2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.credits-counter {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.counter-slash {
  opacity: 0.4;
  font-weight: 300;
}

.credits-progress-track {
  width: 90px;
  height: 2px;
  background: rgba(240, 232, 216, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.credits-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-lavender));
  transition: width 0.3s ease;
}

.credits-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-btn {
  background: transparent;
  border: none;
  color: rgba(240, 232, 216, 0.75);
  padding: 0.35rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.hud-btn:hover {
  color: var(--color-cream);
  background: rgba(240, 232, 216, 0.1);
}

.hud-btn-main {
  width: 32px;
  height: 32px;
  background: rgba(214, 180, 252, 0.15);
  border: 1px solid rgba(214, 180, 252, 0.35);
  color: var(--color-lavender);
}

.hud-btn-main:hover {
  background: var(--color-lavender);
  color: #1A0533;
}

.hud-divider {
  width: 1px;
  height: 16px;
  background: rgba(240, 232, 216, 0.2);
  margin: 0 0.3rem;
}

.hud-btn-text {
  border-radius: 100px;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(240, 232, 216, 0.75);
}

.hud-btn-text:hover {
  color: var(--color-gold-light);
  background: rgba(212, 168, 83, 0.1);
}

/* ============================================= */
/* ACT III: EPILOGUE (GRAND FINALE)             */
/* ============================================= */
.act-epilogue {
  padding: 3rem 0;
  animation: epilogue-fade-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes epilogue-fade-in {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.epilogue-lotus-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 18px var(--color-lavender-glow));
}

.epilogue-title {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-cream);
  margin: 0 0 1.2rem;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.9);
}

.epilogue-gold-divider {
  width: 60px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0 auto 1.6rem;
}

.epilogue-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  line-height: 1.7;
  color: rgba(240, 232, 216, 0.9);
  max-width: 620px;
  margin: 0 auto 1.2rem;
}

.epilogue-thanks {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(240, 232, 216, 0.65);
  letter-spacing: 0.05em;
  margin: 0 auto 2.2rem;
}

.epilogue-the-end {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.the-end-line {
  width: 50px;
  height: 1px;
  background: rgba(214, 180, 252, 0.4);
}

.the-end-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--color-lavender);
  text-transform: uppercase;
}

.epilogue-credits-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(240, 232, 216, 0.45);
  letter-spacing: 0.1em;
  margin-bottom: 2.2rem;
}

.epilogue-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(245, 230, 200, 0.08);
  border: 1px solid rgba(214, 180, 252, 0.35);
  color: var(--color-lavender);
  padding: 0.65rem 1.4rem;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.epilogue-replay-btn:hover {
  background: var(--color-lavender);
  color: #1A0533;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(214, 180, 252, 0.4);
}

/* ============================================= */
/* FULL ROSTER DRAWER (FOR QUICK GRADING)        */
/* ============================================= */
.credits-roster-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.credits-roster-drawer:not(.is-closed) {
  opacity: 1;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.drawer-panel {
  position: relative;
  width: 90%;
  max-width: 840px;
  max-height: 85vh;
  background: rgba(14, 11, 22, 0.95);
  border: 1px solid rgba(214, 180, 252, 0.25);
  border-radius: 16px;
  padding: 2.2rem 2.4rem;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.credits-roster-drawer:not(.is-closed) .drawer-panel {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(240, 232, 216, 0.1);
  padding-bottom: 1.2rem;
  margin-bottom: 1.8rem;
}

.drawer-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-cream);
  margin: 0;
}

.drawer-close-btn {
  background: transparent;
  border: 1px solid rgba(240, 232, 216, 0.2);
  color: var(--color-cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(240, 232, 216, 0.15);
  border-color: var(--color-lavender);
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}

.roster-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(240, 232, 216, 0.08);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.roster-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 180, 252, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.roster-card.is-designer {
  border-color: rgba(212, 168, 83, 0.4);
  background: rgba(212, 168, 83, 0.06);
}

.roster-role {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
  margin-bottom: 0.4rem;
}

.roster-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-cream);
  margin: 0;
}


/* ============================================= */
/* RESPONSIVE                                    */
/* ============================================= */

/* Tablet */
@media (max-width: 1024px) {
  .hero-nav {
    padding: 1.6rem 5vw;
  }

  .nav-links {
    gap: 1.4rem;
  }

  .hero-left-content {
    right: 4vw;
    left: auto;
    max-width: 460px;
  }

  .hero-title-cinematic {
    font-size: clamp(2.2rem, 3.8vw, 3rem);
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .shader-frame {
    height: 85vh;
    min-height: 640px;
    border-radius: 10px;
  }
}

/* Mobile & Tablet Portrait */
@media (max-width: 860px) {
  :root {
    --reveal-radius: 160px;
  }

  .hero-atmospheric-shadow {
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 40%,
      rgba(10, 8, 22, 0.7) 65%,
      rgba(10, 8, 22, 0.9) 100%
    );
  }

  .sketchbook-section {
    padding: 4rem 1rem 3rem;
  }

  .sb-header-title {
    font-size: 2.2rem;
  }

  .shader-frame {
    height: 80vh;
    min-height: 520px;
    border-radius: 8px;
  }

  .hero-nav {
    padding: 1.4rem 5vw;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .hero-left-content {
    top: auto;
    bottom: 4.2rem;
    left: 5vw;
    right: 5vw;
    transform: none;
    max-width: 90%;
    padding-right: 0;
  }

  .hero-title-cinematic {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    margin-bottom: 0.8rem;
  }

  .hero-description {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.4rem;
  }

  .hero-scroll-explore {
    bottom: 1.5rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --reveal-radius: 120px;
  }

  .hero-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1.2rem 5vw;
  }

  .nav-links {
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .hero-tag-pill {
    font-size: 0.65rem;
    padding: 0.35rem 0.8rem;
    margin-bottom: 0.8rem;
  }

  .hero-title-cinematic {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
  }

  .hero-description {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }

  .cta-arrow-circle {
    width: 44px;
    height: 44px;
  }

  .cta-text {
    font-size: 0.82rem;
  }

  .hero-scroll-explore {
    bottom: 1.2rem;
  }

  .sb-header-title {
    font-size: 1.8rem;
  }

  .shader-frame {
    height: 75vh;
    min-height: 440px;
    border-radius: 6px;
  }
}


/* ============================================= */
/* REDUCED MOTION                                */
/* ============================================= */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hint-icon,
  .scroll-arrow {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
