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

:root {
  --color-bg: #0a0a08;
  --color-cream: #f4eed5;
  --color-gold: #c9a84c;
  --color-gold-dim: #8b7332;
  --color-sage: #6b8f71;
  --color-dark-green: #1a2e1a;
  --color-parchment: #e8dcc8;
  --font-display: 'Playfair Display', serif;
  --font-accent: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: auto; }

body {
  background: var(--color-bg);
  color: var(--color-cream);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ========== VIDEO ========== */
.video-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #1a2e1a 0%, #0d1f0d 30%, #0a0a08 60%, #12100a 100%);
}
.video-container video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; position: absolute; pointer-events: none;
}
.video-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,5,3,.82) 0%, rgba(10,10,8,.45) 30%, rgba(10,10,8,.1) 55%, transparent 70%),
    radial-gradient(ellipse at center, transparent 0%, rgba(10,10,8,.5) 60%, rgba(10,10,8,.9) 100%);
  pointer-events: none;
}

/* ========== PROGRESS BAR ========== */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 2px; z-index: 1000;
  background: rgba(255,255,255,.05);
}
.scroll-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--color-sage), var(--color-gold));
  transition: width .1s linear;
}

/* ========== NAV ========== */
.nav {
  position: fixed; top: 0; left: 0;
  width: 100%; padding: 1.5rem 2.5rem;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference;
}
.nav-logo { display: flex; align-items: center; gap: .5rem; }
.nav-links {
  display: flex; gap: 1.8rem;
  list-style: none;
}
.nav-link {
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(244,238,213,.4);
  text-decoration: none;
  padding: .4rem 0;
  position: relative;
  transition: color .3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s;
}
.nav-link:hover { color: rgba(244,238,213,.7); }
.nav-link.active { color: var(--color-gold); }
.nav-link.active::after { transform: scaleX(1); }
.logo-icon {
  display: flex; align-items: center;
  color: var(--color-cream); opacity: .9;
}
.logo-icon svg { width: 24px; height: 24px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 400;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--color-cream);
}

/* ========== LAYOUT: RUNWAY + SCENE ========== */
.scroll-content { position: relative; z-index: 10; }

.runway {
  position: relative;
}

.scene {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  pointer-events: none;
  will-change: opacity;
}

.scene-content {
  max-width: 900px;
  width: 100%;
  pointer-events: auto;
  transform-origin: center bottom;
  will-change: transform, filter;
}

.scene-card {
  background: rgba(10,10,8,.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(201,168,76,.12);
  border-radius: 4px;
  padding: 3.5rem 3rem;
  position: relative;
}
.scene-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 2rem; right: 2rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-dim), transparent);
}

/* ========== HERO ========== */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  text-shadow: 0 2px 40px rgba(0,0,0,.9), 0 0 80px rgba(0,0,0,.6);
  color: #fff;
}

.char-reveal {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(40%) scale(1.05);
  animation: charReveal .8s cubic-bezier(.16,1,.3,1) forwards;
  animation-delay: calc(.045s * var(--i));
}
.char-spacer { display: inline-block; width: .35em; }

@keyframes charReveal {
  0% { opacity: 0; filter: blur(12px); transform: translateY(40%) scale(1.05); }
  60% { opacity: .8; filter: blur(3px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

.hero-subtitle {
  font-size: .85rem; font-weight: 300;
  letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; margin-bottom: 3rem;
  color: rgba(244,238,213,.6);
}

.scroll-indicator { opacity: 0; }
.scroll-mouse {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(244,238,213,.35);
  border-radius: 11px;
  position: relative;
}
.scroll-dot {
  width: 3px; height: 7px;
  background: var(--color-gold);
  border-radius: 2px;
  position: absolute; top: 7px; left: 50%;
  transform: translateX(-50%);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { top: 7px; opacity: 1; }
  50% { top: 20px; opacity: .2; }
}

.fade-up {
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transform: translateY(20px);
}
.fade-up.show {
  opacity: 1 !important;
  transform: translateY(0);
}

/* ========== SECTION LABELS ========== */
.label-float {
  display: block;
  font-family: var(--font-accent);
  font-size: 1rem; font-style: italic;
  color: var(--color-gold);
  letter-spacing: .2em;
  margin-bottom: 1.5rem;
  opacity: 0;
  text-align: center;
}

/* ========== REVEAL HEADINGS ========== */
.reveal-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.reveal-heading.centered { text-align: center; }

.reveal-heading .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) rotateX(40deg);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
  transform-origin: bottom center;
}
.reveal-heading .word.show {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* ========== DIVIDER ========== */
.divider-line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 1.5rem auto;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .8s cubic-bezier(.16,1,.3,1);
}
.divider-line.show { transform: scaleX(1); }

/* ========== BODY TEXT ========== */
.reveal-body {
  font-size: 1.05rem;
  line-height: 1.85; font-weight: 300;
  color: var(--color-parchment);
  opacity: 0;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
  transform: translateY(20px);
  transition: opacity .7s .1s cubic-bezier(.16,1,.3,1), transform .7s .1s cubic-bezier(.16,1,.3,1);
}
.reveal-body.centered { text-align: center; }
.reveal-body.show { opacity: .75; transform: translateY(0); }

/* ========== TRADITIONS GRID ========== */
.traditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
}

.tradition-col {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(244,238,213,.03);
  border: 1px solid rgba(201,168,76,.08);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.tradition-col.show { opacity: 1; transform: translateY(0); }

.tradition-symbol {
  margin-bottom: .8rem;
  color: var(--color-gold);
  display: flex; justify-content: center;
}
.tradition-symbol svg { width: 36px; height: 36px; opacity: .85; }

.tradition-col h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--color-gold);
  margin-bottom: .6rem; letter-spacing: .03em;
}
.tradition-col p {
  font-size: .85rem; line-height: 1.65;
  font-weight: 300; color: var(--color-parchment); opacity: .65;
}

/* ========== SEASONS RING ========== */
.seasons-ring {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.season-item {
  display: flex; flex-direction: column;
  align-items: center; gap: .6rem;
  opacity: 0; transform: scale(.6);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
}
.season-item.show { opacity: 1; transform: scale(1); }

.season-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 50%;
  background: rgba(10,10,8,.4);
  color: var(--color-gold);
  transition: border-color .4s, box-shadow .4s;
}
.season-icon svg { width: 32px; height: 32px; opacity: .9; }
.season-item.show .season-icon {
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 0 30px rgba(201,168,76,.08);
}

.season-name {
  font-family: var(--font-accent);
  font-size: .95rem; font-weight: 400;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--color-parchment); opacity: .7;
}

/* ========== HERBARY BOOK ========== */
.herbary-frame {
  width: 100%; max-width: 600px;
  margin: 0 auto;
  perspective: 1200px;
}

.herbary-book {
  background: linear-gradient(145deg, rgba(26,20,12,.95), rgba(15,12,8,.98));
  border: 1px solid var(--color-gold-dim);
  border-radius: 3px;
  padding: 3.5rem 3rem;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(201,168,76,.1),
    0 25px 80px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(201,168,76,.1);
  transform: rotateX(8deg) scale(.95);
  opacity: 0;
  transition: transform 1s cubic-bezier(.16,1,.3,1), opacity .8s ease;
}
.herbary-book.show { transform: rotateX(0) scale(1); opacity: 1; }

.book-glow {
  position: absolute; inset: -1px;
  border-radius: 3px;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.12) 0%, transparent 60%);
  pointer-events: none;
}

.book-ornament {
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--color-gold-dim);
  border-style: solid;
  transition: border-color .5s;
}
.herbary-book.show .book-ornament { border-color: var(--color-gold); }

.book-ornament.top-left     { top: 14px; left: 14px;   border-width: 1px 0 0 1px; }
.book-ornament.top-right    { top: 14px; right: 14px;  border-width: 1px 1px 0 0; }
.book-ornament.bottom-left  { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; }
.book-ornament.bottom-right { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }

.book-content { text-align: center; }

.book-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 1rem; letter-spacing: .02em;
  opacity: 0; transform: translateY(15px);
  transition: opacity .6s .2s ease, transform .6s .2s cubic-bezier(.16,1,.3,1);
}
.book-title.show { opacity: 1; transform: translateY(0); }

.book-description {
  font-size: .95rem; line-height: 1.7;
  font-weight: 300; opacity: 0;
  margin-bottom: 2.5rem;
  color: var(--color-parchment);
  transform: translateY(15px);
  transition: opacity .6s .35s ease, transform .6s .35s cubic-bezier(.16,1,.3,1);
}
.book-description.show { opacity: .7; transform: translateY(0); }

/* ========== SIGNUP FORM ========== */
.signup-form {
  display: flex; flex-direction: column;
  gap: 1rem; align-items: center;
  opacity: 0; transform: translateY(15px);
  transition: opacity .6s .5s ease, transform .6s .5s cubic-bezier(.16,1,.3,1);
}
.signup-form.show { opacity: 1; transform: translateY(0); }

.input-email {
  width: 100%; max-width: 360px;
  padding: 1rem 1.2rem;
  background: rgba(244,238,213,.03);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 2px;
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: .9rem; font-weight: 300;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.input-email::placeholder { color: rgba(244,238,213,.3); }
.input-email:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 25px rgba(201,168,76,.12);
}

.btn-enter {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--color-gold-dim), var(--color-gold));
  border: none; border-radius: 2px;
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
.btn-enter:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,.25);
}
.btn-arrow { font-size: 1.1rem; transition: transform .3s; }
.btn-enter:hover .btn-arrow { transform: translateX(4px); }

.book-footnote {
  font-size: .75rem;
  opacity: 0; margin-top: 1.5rem;
  font-weight: 300;
  transform: translateY(10px);
  transition: opacity .6s .65s ease, transform .6s .65s cubic-bezier(.16,1,.3,1);
}
.book-footnote.show { opacity: .4; transform: translateY(0); }

/* ========== GPU LAYER PROMOTION (Apple pattern) ========== */
.video-container canvas {
  will-change: contents;
}
.reveal-heading .word,
.fade-up,
.tradition-col,
.season-item,
.divider-line,
.herbary-book,
.book-title,
.book-description,
.signup-form,
.book-footnote,
.label-float,
.reveal-body {
  will-change: opacity, transform;
}

/* ========== CONTENT VISIBILITY (skip rendering off-screen sections) ========== */
.runway {
  content-visibility: auto;
  contain-intrinsic-size: auto 200vh;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .char-reveal { opacity: 1; filter: none; transform: none; animation: none; }
  .reveal-heading .word { opacity: 1; transform: none; }
  .fade-up { opacity: 1 !important; transform: none; }
  .tradition-col { opacity: 1; transform: none; }
  .season-item { opacity: 1; transform: none; }
  .herbary-book { opacity: 1; transform: none; }
  .book-title, .book-description, .signup-form, .book-footnote { opacity: 1; transform: none; }
  .label-float, .reveal-body, .hero-subtitle, .scroll-indicator { opacity: 1 !important; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .traditions-grid { grid-template-columns: 1fr; gap: 1rem; }
  .seasons-ring { gap: 1.5rem; }
  .season-icon { width: 64px; height: 64px; font-size: 2rem; }
  .herbary-book { padding: 2.5rem 1.5rem; }
  .scene-card { padding: 2.5rem 1.5rem; }
  .nav { padding: 1rem 1.5rem; }
}
