@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================================
   DESIGN TOKENS — single source of truth
   ============================================================ */
:root {
  /* Colors */
  --charcoal: #1C1C1A;
  --charcoal-soft: #222220;
  --charcoal-border: rgba(245, 240, 232, 0.07);
  --cream: #F5F0E8;
  --cream-dark: #EDE8DF;
  --cream-muted: #C8C1B4;
  --gold: #B8963E;
  --gold-light: #CFA85A;
  --gold-dim: rgba(184, 150, 62, 0.22);
  --gold-dim-hover: rgba(184, 150, 62, 0.12);

  /* Text */
  --text-on-dark: #F5F0E8;
  --text-on-dark-muted: rgba(245, 240, 232, 0.52);
  --text-on-light: #1C1C1A;
  --text-on-light-muted: rgba(28, 28, 26, 0.50);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing — every section uses these tokens */
  --section-v: clamp(100px, 13vw, 180px);
  --section-h: clamp(28px, 7vw, 108px);
  --col-gap: clamp(48px, 6vw, 96px);

  /* Radii */
  --radius-card: 14px;
  --radius-btn: 6px;
  --radius-modal: 20px;

  /* Easing */
  --ease-silk: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Transition */
  --t-fast: 250ms var(--ease-silk);
  --t-base: 420ms var(--ease-silk);
  --t-slow: 700ms var(--ease-silk);
  --t-ritual: 1100ms var(--ease-out-expo);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-gutter: stable;
  scroll-padding-top: 80px;
}

body {
  background: var(--charcoal);
  color: var(--text-on-dark);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  left: 0;
  top: 0;
  transform: translate3d(var(--mouseX, -200px), var(--mouseY, -200px), 0);
  transition: width 300ms var(--ease-spring), height 300ms var(--ease-spring), background 300ms ease, opacity 350ms ease;
  mix-blend-mode: screen;
  will-change: transform;
  backface-visibility: hidden;
}

#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(184, 150, 62, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  left: 0;
  top: 0;
  transform: translate3d(-50%, -50%, 0) translate3d(var(--ringX, -200px), var(--ringY, -200px), 0);
  transition: width 300ms var(--ease-spring), height 300ms var(--ease-spring), border-color 300ms ease, opacity 350ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

body.cursor-hover #cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--gold-light);
}

body.cursor-hover #cursor-ring {
  width: 52px;
  height: 52px;
  border-color: var(--gold);
}

body.cursor-hidden #cursor-dot,
body.cursor-hidden #cursor-ring {
  opacity: 0;
}

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
#grain-overlay {
  position: fixed;
  inset: -10%;
  width: 120%;
  height: 120%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grainShift 0.8s steps(1) infinite;
  contain: strict;
  isolation: isolate;
  will-change: background-position;
}

@keyframes grainShift {
  0% {
    background-position: 0 0;
  }

  10% {
    background-position: -30px -40px;
  }

  20% {
    background-position: 30px 20px;
  }

  30% {
    background-position: -20px 50px;
  }

  40% {
    background-position: 40px -30px;
  }

  50% {
    background-position: -40px 10px;
  }

  60% {
    background-position: 20px -50px;
  }

  70% {
    background-position: -30px 30px;
  }

  80% {
    background-position: 50px 40px;
  }

  90% {
    background-position: -10px -20px;
  }

  100% {
    background-position: 0 0;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   TYPOGRAPHY SCALE — shared across sections
   ============================================================ */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.display-xl {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
}

.display-lg {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.display-md {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
}

.body-lg {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.body-sm {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* ============================================================
   UNIFIED BUTTON SYSTEM
   ============================================================ */

/* Primary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base),
    transform 300ms var(--ease-silk),
    box-shadow var(--t-base);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--charcoal);
  color: var(--text-on-dark);
  padding: 17px 36px;
  width: 100%;
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 0 8px 24px rgba(184, 150, 62, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-on-light-muted);
  padding: 15px 36px;
  border: 1px solid var(--cream-muted);
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Standalone host CTA (dark background context) */
.btn-dark-outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 1px solid var(--charcoal-border);
  padding: 17px 52px;
}

.btn-dark-outline:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
  box-shadow: 0 8px 28px rgba(184, 150, 62, 0.22);
  transform: translateY(-2px);
}

/* ============================================================
   SECTION 1 — THE RITUAL
   ============================================================ */
#ritual {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 900ms var(--ease-silk), visibility 900ms var(--ease-silk);
}

#ritual.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#ritual-symbol-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  cursor: pointer;
  outline: none;
}

#ritual-symbol-wrap:hover #symbol-ring {
  stroke: var(--gold-light);
  transition: stroke var(--t-base);
}

#ritual-symbol-wrap svg {
  width: 100%;
  height: 100%;
}

.symbol-pulse {
  animation: symbolPulse 3.2s ease-in-out infinite;
}

@keyframes symbolPulse {

  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(184, 150, 62, 0.2));
  }

  50% {
    opacity: 0.75;
    filter: drop-shadow(0 0 14px rgba(184, 150, 62, 0.6));
  }
}

/* Particle canvas behind ritual */
#ritual-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
}

#ritual-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.42em;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1.2s var(--ease-silk) 0.9s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes symbolRecede {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  25% {
    transform: scale(1.06) rotate(4deg);
  }

  100% {
    transform: scale(0.12) rotate(42deg);
    opacity: 0;
  }
}

.symbol-receding {
  animation: symbolRecede 1.1s var(--ease-in-out-quart) forwards !important;
}

/* ============================================================
   SECTION 2 — BRAND REVEAL
   ============================================================ */
#brand-reveal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-silk);
}

#brand-reveal.visible {
  opacity: 1;
  pointer-events: all;
}

#brand-reveal.exit {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(12px);
  transition: opacity 900ms var(--ease-silk) 100ms,
    transform 1000ms var(--ease-spring),
    filter 1000ms var(--ease-silk);
  pointer-events: none;
}

/* ============================================================
   DISCOVER INTERSTITIAL — SCREEN 3
   ============================================================ */
#portal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

#discover-interstitial {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
  /* Start slightly zoomed in */
  filter: blur(8px);
  transition: opacity 700ms var(--ease-silk) 300ms,
    transform 900ms var(--ease-spring) 200ms,
    filter 800ms var(--ease-silk) 200ms;
}

#discover-interstitial[aria-hidden="true"] {
  display: none;
}

#discover-interstitial.di-visible {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
  filter: blur(0);
}

#discover-interstitial.di-exit {
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease-silk);
}

/* Canvas layers */
#di-ambient,
#di-sparkle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#di-sparkle {
  z-index: 10;
}

/* Inner layout */
.di-inner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 480px;
  padding: 0 20px;
}

/* Header */
.di-header {
  text-align: center;
}

.di-eyebrow {
  font-size: 9px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.di-heading {
  font-family: var(--font-serif);
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 8px;
}

.di-heading em {
  font-style: italic;
  color: var(--gold-light);
}

.di-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

/* Stage (card area) */
.di-stage {
  position: relative;
  width: 320px;
  height: 420px;
  flex-shrink: 0;
}

/* Card stack */
.di-card-stack {
  position: absolute;
  inset: 0;
}

/* Individual card */
.di-card {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(184, 150, 62, 0.12);
}

.di-card:active {
  cursor: grabbing;
}

.di-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.di-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(14, 12, 9, 0.92) 0%,
      rgba(14, 12, 9, 0.35) 48%,
      transparent 100%);
}

.di-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 22px 24px;
  z-index: 2;
}

.di-card-type {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}

.di-card-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 6px;
}

.di-card-desc {
  font-size: 12px;
  color: rgba(245, 240, 232, 0.55);
  line-height: 1.5;
  margin-bottom: 6px;
}

.di-card-dest {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(245, 240, 232, 0.35);
  margin-bottom: 10px;
}

.di-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.di-card-tag {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  border: 1px solid rgba(184, 150, 62, 0.2);
  border-radius: 50px;
  padding: 3px 10px;
}

/* Swipe hints */
.swipe-hint {
  position: absolute;
  top: 24px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 500;
  text-transform: uppercase;
}

.di-hint--left {
  left: 16px;
  background: rgba(200, 60, 60, 0.15);
  border: 1.5px solid rgba(200, 80, 80, 0.5);
  color: #e07070;
}

.di-hint--right {
  right: 16px;
  background: rgba(60, 160, 100, 0.15);
  border: 1.5px solid rgba(60, 180, 100, 0.5);
  color: #70c890;
}

/* Progress dots */
.di-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.di-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.12);
  transition: background 300ms ease, transform 300ms ease, width 300ms ease;
}

.di-dot--active {
  background: var(--gold);
  width: 20px;
  border-radius: 50px;
}

.di-dot--done {
  background: rgba(184, 150, 62, 0.3);
}

/* Action buttons */
.di-actions {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-top: 4px;
}

.di-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  color: rgba(245, 240, 232, 0.55);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.di-btn--save {
  width: 62px;
  height: 62px;
  border-color: rgba(184, 150, 62, 0.3);
  color: var(--gold-light);
}

.di-btn:hover {
  transform: scale(1.12);
  border-color: rgba(184, 150, 62, 0.5);
  box-shadow: 0 0 20px rgba(184, 150, 62, 0.15);
}

/* Skip-to-site button */
.di-skip-link {
  position: fixed;
  bottom: 28px;
  right: 32px;
  z-index: 20;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 240, 232, 0.25);
  border-radius: 50px;
  cursor: pointer;
  transition:
    color 250ms ease,
    border-color 250ms ease,
    background 250ms ease,
    transform 250ms var(--ease-spring);
  padding: 12px 24px;
  -webkit-tap-highlight-color: transparent;
}

.di-skip-link:hover {
  color: var(--charcoal);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}



/* Wand line */
#wand-line {
  position: absolute;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  top: 50%;
  left: -80px;
  transform: translateY(-84px);
  opacity: 0;
}

@keyframes wandSweep {
  0% {
    left: -80px;
    width: 0;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  55% {
    left: 25%;
    width: 55%;
    opacity: 1;
  }

  78% {
    left: 48%;
    width: 22%;
    opacity: 0.5;
  }

  100% {
    left: 115%;
    width: 0;
    opacity: 0;
  }
}

.wand-animate {
  animation: wandSweep 1.5s var(--ease-out-expo) forwards !important;
}

/* Brand text */
#brand-text {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes brandReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-text-visible {
  animation: brandReveal 1.1s var(--ease-out-expo) forwards !important;
}

#brand-logout {
  font-family: var(--font-sans);
  font-size: clamp(54px, 10vw, 116px);
  font-weight: 300;
  letter-spacing: 0.26em;
  color: var(--cream);
  line-height: 1;
  display: block;
}

#brand-spells {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(28px, 5.5vw, 62px);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--gold-light);
  display: block;
  margin-top: 4px;
}

#brand-tagline {
  margin-top: 36px;
  font-size: 10px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  opacity: 0;
}

.tagline-visible {
  animation: fadeIn 1s ease 0.5s forwards !important;
}

#enter-btn {
  margin-top: 56px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  background: none;
  border: 1px solid rgba(245, 240, 232, 0.18);
  padding: 15px 44px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: border-color var(--t-base), color var(--t-base);
  opacity: 0;
}

.enter-btn-visible {
  animation: fadeIn 0.9s ease 1.3s forwards !important;
}

#enter-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  opacity: 0;
  transition: opacity 900ms var(--ease-silk);
}

#main-content.visible {
  opacity: 1;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 30px var(--section-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 500ms ease,
    backdrop-filter 500ms ease,
    padding 400ms var(--ease-silk),
    border-color 500ms ease;
  border-bottom: 1px solid transparent;
  backface-visibility: hidden;
  will-change: padding, background, backdrop-filter;
}

nav.scrolled {
  background: rgba(26, 26, 24, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 18px var(--section-h);
  border-bottom-color: var(--charcoal-border);
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.nav-logo-top {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--cream);
}

.nav-logo-bottom {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
  list-style: none;
}

.nav-links li a {
  position: relative;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  transition: color var(--t-base);
  padding-bottom: 3px;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-links li a:hover {
  color: var(--cream);
}

.nav-links li a:hover::after {
  transform: scaleX(1);
}

/* Nav CTA — matches unified button system */
.nav-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: none;
  border: 1px solid rgba(184, 150, 62, 0.55);
  color: var(--gold-light);
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base);
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

/* ============================================================
   SECTION: BELONG
   ============================================================ */
#belong {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-v) var(--section-h);
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}

/* Radial ambient glow behind hero */
#belong::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(184, 150, 62, 0.055) 0%, transparent 68%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

/* Thin gold separator at the top */
#belong::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--section-h);
  right: var(--section-h);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  z-index: 1;
}

#belong>* {
  position: relative;
  z-index: 1;
}

/* Child animation states */
.belong-eyebrow {
  font-size: 10px;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 800ms var(--ease-silk),
    transform 800ms var(--ease-silk);
}

.belong-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(54px, 9vw, 112px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.01em;
  color: var(--cream);
  max-width: 880px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 950ms var(--ease-silk) 120ms,
    transform 950ms var(--ease-silk) 120ms;
}

.belong-sub {
  margin-top: 28px;
  font-size: clamp(14px, 1.55vw, 17px);
  font-weight: 300;
  color: var(--text-on-dark-muted);
  max-width: 420px;
  letter-spacing: 0.04em;
  line-height: 1.78;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 850ms var(--ease-silk) 250ms,
    transform 850ms var(--ease-silk) 250ms;
}

.scroll-hint {
  margin-top: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 800ms ease 480ms;
}

.scroll-hint span {
  font-size: 8.5px;
  letter-spacing: 0.5em;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
}

.scroll-hint-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {

  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.5);
  }

  50% {
    opacity: 0.9;
    transform: scaleY(1);
  }
}

/* Triggered by JS .animated-in on #belong */
.animated-in .belong-eyebrow,
.animated-in .belong-heading,
.animated-in .belong-sub,
.animated-in .scroll-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SECTION: CHOOSE YOUR SPELL (Light background)
   ============================================================ */
#spells {
  padding: var(--section-v) var(--section-h);
  background: var(--cream);
  position: relative;
}

/* Shared section label + heading rhythm */
.section-eyebrow {
  font-size: 10px;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-heading-light {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 400;
  color: var(--text-on-light);
  margin-bottom: 72px;
  line-height: 1.06;
}

.section-heading-dark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 400;
  color: var(--text-on-dark);
  margin-bottom: 72px;
  line-height: 1.06;
}

/* GRID */
.spells-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* CARDS — equal height via fixed aspect ratio */
.spell-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: none;
  background: var(--charcoal);
  aspect-ratio: 3 / 4;
  /* fade-up start state */
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  -webkit-transform: translate3d(0, 28px, 0);
  transition:
    transform 600ms var(--ease-out-expo),
    box-shadow 600ms var(--ease-silk),
    opacity 700ms var(--ease-silk);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.spell-card.animated-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.spell-card:hover {
  transform: translate3d(0, -10px, 0) scale(1.015);
  -webkit-transform: translate3d(0, -10px, 0) scale(1.015);
  box-shadow: 0 36px 72px rgba(28, 28, 26, 0.32), 0 0 0 1px rgba(184, 150, 62, 0.14);
}

/* Card image */
.spell-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 650ms var(--ease-silk), filter 650ms var(--ease-silk);
  filter: saturate(0.88) brightness(0.90);
}

.spell-card:hover .spell-card-img {
  transform: scale(1.05);
  filter: saturate(1.05) brightness(0.80);
}

/* Gradient overlay */
.spell-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(22, 22, 20, 0.92) 0%,
      rgba(22, 22, 20, 0.30) 50%,
      transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 28px 36px;
}

/* Gold bottom accent line — slides in on hover */
.spell-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease-out-expo);
}

.spell-card:hover::after {
  transform: scaleX(1);
}

/* Card text */
.spell-card-type {
  font-size: 8.5px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
  opacity: 0.85;
}

.spell-card-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.12;
  margin-bottom: 8px;
}

.spell-card-hook {
  font-size: 12px;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.58);
  letter-spacing: 0.04em;
  line-height: 1.55;
  transition: color var(--t-base);
}

.spell-card:hover .spell-card-hook {
  color: rgba(245, 240, 232, 0.82);
}

/* Wellness Spell photo */
.spell-img-wellness {
  position: absolute;
  inset: 0;
  background: url('spell_wellness.png') center center / cover no-repeat;
}


/* ============================================================
   SPELL DETAIL MODAL
   ============================================================ */
#spell-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(20, 20, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 500ms var(--ease-silk),
    visibility 500ms;
}

#spell-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-inner {
  background: var(--cream);
  color: var(--text-on-light);
  max-width: 880px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--radius-modal);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  transform: translateY(32px) scale(0.96);
  transition: transform 650ms var(--ease-spring), opacity 500ms var(--ease-silk);
  box-shadow: 0 48px 120px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(184, 150, 62, 0.1);
  opacity: 0;
}

#spell-modal.open .modal-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Modal image panel */
.modal-img-side {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-modal) 0 0 var(--radius-modal);
  min-height: 540px;
}

.modal-img-side img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(148deg, #28211A 0%, #3B2E1C 45%, #503E24 70%, #362819 100%);
}

/* Creator tag */
.modal-creator-tag {
  position: absolute;
  bottom: 28px;
  left: 24px;
  right: 24px;
  background: rgba(22, 22, 20, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(245, 240, 232, 0.08);
}

.creator-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--gold-light);
}

.creator-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.creator-quote {
  font-size: 11px;
  color: rgba(245, 240, 232, 0.55);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.4;
}

/* Modal content panel */
.modal-content-side {
  padding: 52px 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
}

.modal-spell-type {
  font-size: 9px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
}

.modal-spell-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 400;
  color: var(--text-on-light);
  line-height: 1.08;
  margin-top: 6px;
}

.modal-divider {
  width: 36px;
  height: 1px;
  background: var(--gold);
}

/* Meta table */
.modal-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.meta-label {
  font-size: 8.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  width: 76px;
  flex-shrink: 0;
  padding-top: 3px;
  line-height: 1;
}

.meta-value {
  font-size: 13px;
  color: var(--text-on-light);
  font-weight: 400;
  line-height: 1.55;
}

/* Includes list */
.modal-includes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.modal-includes li {
  font-size: 12px;
  color: var(--text-on-light-muted);
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.5;
}

.modal-includes li::before {
  content: '—';
  color: var(--gold);
  flex-shrink: 0;
  font-size: 10px;
}

/* Promise quote */
.modal-promise {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-on-light-muted);
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  line-height: 1.65;
}

/* Modal CTAs */
.modal-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--cream-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
  font-size: 17px;
  color: var(--text-on-light-muted);
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--cream);
}

/* ============================================================
   SECTION: ABOUT (Dark background)
   ============================================================ */
#about {
  padding: var(--section-v) var(--section-h);
  background: var(--charcoal);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--col-gap);
  align-items: center;
  position: relative;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--section-h);
  right: var(--section-h);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about-img-placeholder {
  width: 100%;
  height: 100%;
  background: url('about_real.png') center top / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-goldline {
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold), var(--gold-light), transparent);
  border-radius: 2px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-body p {
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 300;
  color: var(--text-on-dark-muted);
  line-height: 1.82;
  letter-spacing: 0.02em;
}

.about-body p strong {
  color: var(--cream);
  font-weight: 400;
}

/* Stats row */
.about-stats {
  display: flex;
  gap: 48px;
  padding-top: 8px;
  border-top: 1px solid var(--charcoal-border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.stat-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 40px;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
  transition: color 300ms ease;
  display: inline-block;
}

.stat:hover .stat-num {
  color: var(--gold);
}

.stat-label {
  font-size: 8.5px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  transition: color 300ms ease;
}

.stat:hover .stat-label {
  color: var(--cream-muted);
}

/* ============================================================
   SECTION: HOST A SPELL (Light background)
   ============================================================ */
#host {
  padding: var(--section-v) var(--section-h);
  background: var(--cream-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

#host::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--section-h);
  right: var(--section-h);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 28, 26, 0.10), transparent);
}

.host-inner {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.host-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(44px, 6.5vw, 84px);
  font-weight: 400;
  color: var(--text-on-light);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.host-sub {
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 300;
  color: var(--text-on-light-muted);
  line-height: 1.8;
  letter-spacing: 0.02em;
  margin-bottom: 56px;
}

/* Host CTA reuses .btn + .btn-dark-outline but on a light bg */
.host-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: var(--charcoal);
  color: var(--cream);
  border: 1px solid var(--charcoal);
  padding: 17px 52px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base),
    transform 300ms var(--ease-silk),
    box-shadow var(--t-base);
}

.host-cta:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(184, 150, 62, 0.25);
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 80px var(--section-h) 48px;
  background: var(--charcoal);
  border-top: 1px solid rgba(184, 150, 62, 0.14);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 56px;
}

/* Brand */
.footer-brand .footer-logo-top {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--cream);
}

.footer-brand .footer-logo-bottom {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold-light);
  margin-top: 5px;
}

.footer-brand .footer-tagline {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-on-dark-muted);
  line-height: 1.6;
}

/* Links */
.footer-links {
  display: flex;
  gap: 80px;
}

.footer-col h4 {
  font-size: 8.5px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-on-dark-muted);
  transition: color var(--t-base);
  letter-spacing: 0.04em;
}

.footer-col ul li a:hover {
  color: var(--cream);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--charcoal-border);
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 10.5px;
  color: var(--text-on-dark-muted);
  letter-spacing: 0.06em;
}

.footer-motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 900ms var(--ease-out-expo),
    transform 900ms var(--ease-out-expo);
}

.fade-up.animated-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.fade-up-delay-1 {
  transition-delay: 80ms !important;
}

.fade-up-delay-2 {
  transition-delay: 170ms !important;
}

.fade-up-delay-3 {
  transition-delay: 270ms !important;
}

.fade-up-delay-4 {
  transition-delay: 380ms !important;
}

.fade-up-delay-5 {
  transition-delay: 500ms !important;
}

.fade-up-delay-6 {
  transition-delay: 630ms !important;
}

/* ============================================================
   SECTION TRANSITION WIPE
   ============================================================ */
.section-wipe {
  position: relative;
  overflow: hidden;
}

.section-wipe::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--charcoal);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1.1s var(--ease-in-out-quart);
  z-index: 2;
  pointer-events: none;
}

.section-wipe.revealed::before {
  transform: scaleX(0);
  transform-origin: right;
}

/* ============================================================
   GOLD SHIMMER LINE
   ============================================================ */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.gold-shimmer {
  background: linear-gradient(90deg,
      transparent 0%,
      var(--gold-dim) 30%,
      var(--gold-light) 50%,
      var(--gold-dim) 70%,
      transparent 100%);
  background-size: 400px 1px;
  animation: shimmer 3s linear infinite;
}

/* ============================================================
   NAV LINK MAGNETIC UNDERLINE (enhanced)
   ============================================================ */
.nav-links li a {
  display: inline-block;
  transform-origin: bottom center;
  transition: color var(--t-base), transform 300ms var(--ease-spring);
}

.nav-links li a:hover {
  transform: translateY(-1px);
}

/* ============================================================
   MOBILE NAV (hamburger)
   ============================================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--cream);
  transition: transform var(--t-base), opacity var(--t-base);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --section-h: clamp(28px, 5vw, 72px);
  }

  #about {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

@media (max-width: 900px) {
  .spells-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #about {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-img-wrap {
    aspect-ratio: 16 / 8;
  }

  .modal-inner {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .modal-img-side {
    border-radius: var(--radius-modal) var(--radius-modal) 0 0;
    min-height: 260px;
  }

  .modal-content-side {
    padding: 36px 32px 40px;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 20px 24px;
  }

  nav.scrolled {
    padding: 14px 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .spells-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .spell-card {
    aspect-ratio: 16 / 11;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 28px;
  }

  .host-cta {
    padding: 15px 36px;
  }
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--charcoal);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ============================================================
   SECTION: FOUNDER DIARY
   ============================================================ */
#founder-diary {
  position: relative;
  padding: var(--section-v) var(--section-h);
  background: var(--charcoal);
  overflow: hidden;
  z-index: 10;
}

/* Background canvas for sparkles */
#diary-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.diary-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diary-header {
  text-align: center;
  margin-bottom: 64px;
}

.diary-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.1;
  margin-top: 16px;
}

/* ============================================================
   INTERACTIVE 3D SPELLBOOK
   ============================================================ */
.spellbook-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: clamp(550px, 70vh, 700px);
  margin: 0 auto;
  perspective: 1800px;
}

.spellbook-cover-text {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  animation: pulse 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(184, 150, 62, 0.4);
  }
}

.spellbook-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  /* Shift slightly to center when opened vs closed if desired, keeping simple for now */
  display: flex;
}

.sb-page {
  position: absolute;
  right: 0;
  /* Align pages to the right half of the container */
  width: 50%;
  height: 100%;
  background: #f4ecd8;
  box-shadow:
    inset 0 0 30px rgba(184, 150, 62, 0.1),
    inset 0 0 10px rgba(0, 0, 0, 0.05),
    -2px 0 5px rgba(0, 0, 0, 0.1);
  /* Left edge shadow */
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 2px 12px 12px 2px;
  /* Texture */
  background-image:
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.03) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

/* Page layering closed state */
.sb-page-1 {
  z-index: 5;
}

.sb-page-2 {
  z-index: 4;
}

.sb-page-3 {
  z-index: 3;
}

.sb-page-4 {
  z-index: 2;
}

.sb-page-5 {
  z-index: 1;
}

.sb-turnable {
  cursor: pointer;
}

.sb-turnable:hover .sb-face-front {
  /* Subtle lift hint */
  box-shadow:
    inset 0 0 30px rgba(184, 150, 62, 0.15),
    inset 0 0 10px rgba(0, 0, 0, 0.05),
    -10px 0 20px rgba(0, 0, 0, 0.08);
}

.sb-page.turned {
  transform: rotateY(-180deg);
}

/* Faces */
.sb-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 2px 12px 12px 2px;
  overflow: hidden;
  background-image:
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.03) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

.sb-face-front {
  background-color: #f4ecd8;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  /* Spine crease */
}

.sb-face-back {
  background-color: #eee4cc;
  /* Slightly darker back */
  transform: rotateY(180deg);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 20px 0 40px rgba(0, 0, 0, 0.05);
}

/* Typography Inside Book */
.sb-page-content {
  padding: clamp(30px, 5vw, 60px) clamp(20px, 4vw, 50px);
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #2c2a26;
  position: relative;
  z-index: 2;
}

.sb-page-right {
  box-shadow: inset 15px 0 30px -15px rgba(0, 0, 0, 0.15);
  /* Crease shadow left */
}

.sb-page-left {
  box-shadow: inset -15px 0 30px -15px rgba(0, 0, 0, 0.15);
  /* Crease shadow right */
}

/* Reusing existing diary typography slightly adjusted */
.diary-date {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8b7956;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(139, 121, 86, 0.3);
  padding-bottom: 12px;
  display: inline-block;
}

.diary-text {
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
  color: #3d3931;
}

.diary-text.diary-highlight {
  font-size: clamp(20px, 2.2vw, 24px);
  font-style: italic;
  color: #1a1815;
  line-height: 1.4;
}

.mb-small {
  margin-bottom: 12px;
}

.mb-medium {
  margin-bottom: 20px;
}

.mb-large {
  margin-bottom: 32px;
}

.mt-large {
  margin-top: 32px;
}

/* Doodles and graphics */
.sb-doodle-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sb-doodle-list {
  list-style: none;
  padding: 0;
}

.sb-doodle-list li {
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.8vw, 19px);
  color: #4a453b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sb-doodle {
  font-size: 20px;
  filter: sepia(0.5) huerotate(-30deg) saturate(1.5);
  /* Make emojis look slightly vintage */
}

.sb-brand-font {
  font-family: var(--font-sans);
  letter-spacing: 0.15em;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.85em;
}

.sb-brand-font em {
  font-family: var(--font-serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15em;
}

.sb-ink-logo {
  font-size: 42px;
  line-height: 0.9;
  font-weight: 300;
  letter-spacing: -1px;
  color: rgba(30, 28, 26, 0.85);
  margin-top: auto;
  align-self: flex-end;
  text-align: right;
  mix-blend-mode: multiply;
  opacity: 0.8;
  transform: rotate(-3deg);
}

.sb-wax-stamp-decor {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid rgba(184, 150, 62, 0.15);
  background: radial-gradient(circle, transparent 40%, rgba(184, 150, 62, 0.05) 100%);
  transform: rotate(15deg);
  pointer-events: none;
}

/* Signature */
.diary-signature {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 24px;
}

.founder-name {
  font-family: calc("Brush Script MT", "Caveat", var(--font-serif));
  font-size: 38px;
  font-style: italic;
  color: #1a1815;
  line-height: 1;
}

.spell-glow {
  text-shadow: 0 0 15px rgba(184, 150, 62, 0.4);
}

/* Nav Buttons inside book */
.sb-nav-btns {
  display: flex;
  justify-content: flex-end;
}

.sb-nav-btns .sb-btn {
  color: #8b7956;
  border-color: rgba(139, 121, 86, 0.3);
  font-size: 9px;
  padding: 10px 20px;
}

.sb-nav-btns .sb-btn:hover {
  border-color: var(--gold);
  color: var(--charcoal);
  background: var(--gold-dim);
}

/* Wax Seal Links (from previous CSS, just ensuring context) */
.spellcaster-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spellcaster-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 24px;
}

.wax-seal-row {
  display: flex;
  gap: 24px;
}

.wax-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A82020 0%, #600B0B 100%);
  /* Deep crimson wax */
  color: #FDF8E7;
  /* Cream/gold icon */
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(168, 32, 32, 0.5);
  /* Outer rim */
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* Subtle inner ring mimicking stamp impression */
.wax-seal::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(253, 248, 231, 0.15);
  pointer-events: none;
}

.wax-seal:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(184, 150, 62, 0.4),
    /* Gold glow */
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(184, 150, 62, 0.8);
  /* Gold rim on hover */
  color: var(--gold-light);
}

.wax-seal svg {
  width: 20px;
  height: 20px;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

@media (max-width: 768px) {
  .spellbook-wrapper {
    height: 600px;
    perspective: 1200px;
    /* Stronger 3D effect on small screens */
  }

  .sb-page {
    width: 100%;
    /* Full width on mobile */
    transform-origin: left center;
    /* Still flip from left edge like opening a cover */
  }
}