:root {
  --aged-linen: #f5edd6;
  --warm-vellum: #e8d8be;
  --dark-umber: #3d2b1f;
  --deep-sepia: #4a3728;
  --antique-gold: #c9a86c;
  --crystalline-blue: #7ba7bc;
  --oxidized-copper: #6b8f71;
  --burnt-sienna: #8b5e3c;
  --prismatic-white: #faf6ed;
  --transition-slow: 1200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 800ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--aged-linen);
  color: var(--deep-sepia);
  font-family: 'Lora', serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================
   VORONOI CANVAS - Background Layer (z:0)
   ========================================== */
#voronoi-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0.2;
  pointer-events: none;
}

/* ==========================================
   CRYSTAL FOREGROUND - Decorative Layer (z:2)
   ========================================== */
#crystal-foreground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}

.crystal-element {
  position: absolute;
  opacity: 0.1;
  transition: opacity var(--transition-slow);
}

.crystal-1 {
  width: 180px;
  top: 5%;
  right: 8%;
  animation: crystal-drift-1 60s ease-in-out infinite;
}

.crystal-2 {
  width: 100px;
  top: 30%;
  left: 5%;
  animation: crystal-drift-2 75s ease-in-out infinite;
}

.crystal-3 {
  width: 220px;
  bottom: 15%;
  right: 12%;
  animation: crystal-drift-3 90s ease-in-out infinite;
}

.crystal-4 {
  width: 80px;
  top: 60%;
  left: 15%;
  animation: crystal-drift-4 50s ease-in-out infinite;
}

.crystal-5 {
  width: 160px;
  bottom: 5%;
  left: 30%;
  animation: crystal-drift-5 65s ease-in-out infinite;
}

@keyframes crystal-drift-1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, 10px) rotate(2deg); }
  50% { transform: translate(-10px, 20px) rotate(-1deg); }
  75% { transform: translate(8px, -5px) rotate(1.5deg); }
}

@keyframes crystal-drift-2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-12px, 15px) rotate(-2deg); }
  66% { transform: translate(18px, -8px) rotate(1deg); }
}

@keyframes crystal-drift-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, -15px) rotate(1.5deg); }
}

@keyframes crystal-drift-4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -12px) rotate(3deg); }
  75% { transform: translate(-8px, 10px) rotate(-2deg); }
}

@keyframes crystal-drift-5 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(15px, 8px) rotate(-1deg); }
  80% { transform: translate(-12px, -6px) rotate(2deg); }
}

/* ==========================================
   GOLDEN THREAD NAVIGATION
   ========================================== */
#golden-thread {
  position: fixed;
  left: 24px;
  top: 0;
  height: 100vh;
  width: 40px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

#thread-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 100%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 3s ease;
}

#thread-line.visible {
  opacity: 1;
}

.nav-diamond {
  position: relative;
  cursor: pointer;
  margin: 20px 0;
  z-index: 201;
}

.diamond-shape {
  display: block;
  width: 10px;
  height: 10px;
  background: var(--antique-gold);
  transform: rotate(45deg);
  transition: box-shadow var(--transition-medium), transform var(--transition-fast);
}

.nav-diamond:hover .diamond-shape,
.nav-diamond.active .diamond-shape {
  box-shadow: 0 0 8px 2px rgba(201, 168, 108, 0.5);
  transform: rotate(45deg) scale(1.2);
}

.nav-diamond.active .diamond-shape {
  animation: diamond-pulse 3s ease-in-out infinite;
}

@keyframes diamond-pulse {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(201, 168, 108, 0.3); }
  50% { box-shadow: 0 0 14px 4px rgba(201, 168, 108, 0.6); }
}

.nav-label {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: 'Poiret One', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--dark-umber);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.nav-diamond:hover .nav-label {
  opacity: 1;
}

/* ==========================================
   BOTANICAL WIRES
   ========================================== */
#botanical-wires {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  pointer-events: none;
  opacity: 0.12;
}

.botanical-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 8s ease-out;
}

.botanical-path.drawn {
  stroke-dashoffset: 0;
}

/* ==========================================
   SECTIONS - ACTS
   ========================================== */
.act {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10vh 5vw;
}

/* Act I: The Glass Door */
.act-glass-door {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-content {
  text-align: center;
  position: relative;
  z-index: 11;
}

.domain-title {
  font-family: 'Poiret One', sans-serif;
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-umber);
  line-height: 1.1;
}

.domain-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.domain-title .letter.visible {
  opacity: 1;
  transform: translateY(0);
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  letter-spacing: 0.02em;
  color: var(--burnt-sienna);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1200ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 1.5rem;
}

.tagline.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Act II: The Overgrown Atrium */
.act-atrium {
  min-height: 200vh;
  padding-top: 5vh;
}

.sunrise-fan {
  width: clamp(200px, 30vw, 400px);
  opacity: 0.4;
  margin-bottom: 5vh;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3vw 2vw;
  width: 90%;
  max-width: 1200px;
  padding: 5vh 0;
}

.content-card {
  background: rgba(245, 237, 214, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(201, 168, 108, 0.2);
  padding: 2.5rem 2rem;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--transition-slow),
              transform var(--transition-slow);
}

.content-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.card-wide[data-col="2/6"] { grid-column: 2 / 6; }
.card-wide[data-col="2/7"] { grid-column: 2 / 7; }
.card-narrow.card-left { grid-column: 1 / 4; }
.card-narrow.card-right { grid-column: 5 / 8; }

.card-deco-top {
  text-align: center;
  margin-bottom: 1.5rem;
}

.card-fan {
  width: 120px;
  opacity: 0.5;
}

.content-card h2 {
  font-family: 'Poiret One', sans-serif;
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-umber);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.content-card p {
  font-family: 'Lora', serif;
  font-weight: 400;
  color: var(--deep-sepia);
  max-width: 38em;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.accent-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: #6b5744;
  line-height: 1.6;
}

.chevron-divider {
  width: clamp(300px, 50vw, 600px);
  opacity: 0.3;
  margin: 5vh 0;
}

/* Act III: The Crystal Chamber */
.act-crystal-chamber {
  min-height: 200vh;
  padding-top: 5vh;
}

.chamber-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5vh;
  width: 90%;
  max-width: 1000px;
}

.card-large {
  width: 100%;
}

.card-large[data-col="2/6"] {
  width: 85%;
  align-self: flex-start;
}

.card-large[data-col="1/6"] {
  width: 90%;
  align-self: flex-start;
}

.card-large[data-col="2/7"] {
  width: 80%;
  align-self: flex-end;
}

.counter-block {
  display: flex;
  gap: 4vw;
  justify-content: center;
  align-items: center;
  padding: 4vh 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow),
              transform var(--transition-slow);
}

.counter-block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.counter-item {
  text-align: center;
}

.counter-number {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--crystalline-blue);
  letter-spacing: 0.05em;
  display: block;
  line-height: 1.2;
}

.counter-label {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8b7355;
  display: block;
  margin-top: 0.5rem;
}

.pullquote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--burnt-sienna);
  line-height: 1.5;
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(201, 168, 108, 0.3);
  border-bottom: 1px solid rgba(201, 168, 108, 0.3);
}

/* Act IV: Golden Hour */
.act-golden-hour {
  min-height: 150vh;
  padding-top: 5vh;
  position: relative;
}

.golden-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 700px;
}

.card-final {
  text-align: center;
  background: rgba(245, 237, 214, 0.85);
}

.card-final h2 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 1rem;
}

.email-field {
  margin-top: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

#email-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--antique-gold);
  padding: 0.8rem 1rem;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--deep-sepia);
  width: 300px;
  max-width: 100%;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast);
}

#email-input::placeholder {
  color: #8b7355;
  opacity: 0.6;
}

#email-input:focus {
  border-bottom-color: var(--crystalline-blue);
}

.email-hint {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8b7355;
  opacity: 0.5;
}

.final-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30vh;
  pointer-events: none;
}

/* ==========================================
   GOLDEN HOUR ATMOSPHERE SHIFT
   ========================================== */
body.golden-hour-active {
  background-color: #f0e4c4;
}

body.golden-hour-active #voronoi-canvas {
  opacity: 0.35;
  transition: opacity 3s ease;
}

body.golden-hour-active .crystal-element {
  opacity: 0.04;
  transition: opacity 3s ease;
}

/* ==========================================
   SECTION DISSOLVE OVERLAP
   ========================================== */
.act {
  transition: opacity 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .content-grid {
    display: flex;
    flex-direction: column;
    gap: 3vh;
  }

  .content-card {
    width: 100% !important;
  }

  .card-wide, .card-narrow {
    grid-column: 1 / -1 !important;
  }

  .counter-block {
    flex-direction: column;
    gap: 3vh;
  }

  #golden-thread {
    left: 10px;
  }

  .nav-label {
    font-size: 0.7rem;
  }

  .domain-title {
    font-size: clamp(3rem, 10vw, 6rem);
  }

  .chamber-content {
    width: 95%;
  }

  .card-large {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .act {
    padding: 5vh 3vw;
  }

  #golden-thread {
    display: none;
  }

  .domain-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}