/* ==========================================================
   Cherry Grove — Visual Upgrades
   Golden-hour cinematic polish layer
   ========================================================== */

/* ==========================================================
   KEN BURNS HERO — slow cinematic zoom/drift
   ========================================================== */
@keyframes kenBurns {
  0%   { transform: scale(1.0) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.05) translate(0.5%, 0.5%); }
}
.hero-bg img {
  animation: kenBurns 25s ease-in-out infinite alternate !important;
  transition: none !important;
}

/* ==========================================================
   HERO TEXT ENTRANCE — blur + slide in
   ========================================================== */
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-content .eyebrow   { animation: heroTextIn 1.2s ease-out 0.3s both; }
.hero-content .hero-line-1 { animation: heroTextIn 1.4s ease-out 0.6s both; }
.hero-content .hero-line-2 { animation: heroTextIn 1.4s ease-out 0.9s both; }
.hero-content .hero-tagline { animation: heroTextIn 1.2s ease-out 1.3s both; }
.hero-scroll { animation: heroTextIn 1s ease-out 1.8s both; }

/* ==========================================================
   GRADIENT TEXT ON SECTION TITLES
   ========================================================== */
.section-title {
  background: linear-gradient(135deg, var(--cream) 0%, var(--gold) 45%, var(--rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================
   SHIMMER ON VALUE-INDEX STAT NUMBERS
   ========================================================== */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.vi-stat-num {
  background: linear-gradient(90deg,
    var(--cream) 0%, var(--gold) 25%, var(--rose) 50%, var(--gold) 75%, var(--cream) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
.vi-stat.sage .vi-stat-num {
  background: linear-gradient(90deg,
    var(--sage-deep) 0%, var(--sage) 25%, var(--gold) 50%, var(--sage) 75%, var(--sage-deep) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.vi-stat.gold .vi-stat-num {
  background: linear-gradient(90deg,
    var(--gold) 0%, var(--gold-soft) 25%, var(--rose) 50%, var(--gold-soft) 75%, var(--gold) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.vi-stat.rose .vi-stat-num {
  background: linear-gradient(90deg,
    var(--rose) 0%, var(--blush) 25%, var(--gold) 50%, var(--blush) 75%, var(--rose) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ==========================================================
   STAGGER REVEALS — cascade grid items
   ========================================================== */
.reveal-stagger {
  transition-delay: calc(var(--reveal-i, 0) * 0.12s) !important;
}

/* ==========================================================
   ANIMATED GLOW BORDERS — trial + terms + certificate
   ========================================================== */
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 4px 24px rgba(184,137,68,0.12), 0 0 20px rgba(184,137,68,0.08); }
  50%      { box-shadow: 0 8px 40px rgba(184,137,68,0.30), 0 0 45px rgba(184,137,68,0.16); }
}
.trial-card   { animation: borderGlow 4s ease-in-out infinite; }
.terms-card   { animation: borderGlow 5s ease-in-out infinite; }
.certificate  { animation: borderGlow 5s ease-in-out infinite; }

/* ==========================================================
   SCROLL PROGRESS — animated gradient + glow
   ========================================================== */
.scroll-progress-fill {
  background: linear-gradient(90deg, var(--sage) 0%, var(--gold) 35%, var(--rose) 65%, var(--gold) 100%) !important;
  background-size: 200% 100%;
  animation: progressShift 3s linear infinite;
  box-shadow: 0 0 14px rgba(184,137,68,0.65), 0 0 4px rgba(184,137,68,0.8);
}
@keyframes progressShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ==========================================================
   PULSING FLOATING CTA
   ========================================================== */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(60,40,28,0.25), 0 0 0 0 rgba(184,137,68,0.4); }
  50%      { box-shadow: 0 8px 24px rgba(60,40,28,0.25), 0 0 0 14px rgba(184,137,68,0); }
}
.floating-cta.visible { animation: ctaPulse 2.5s ease-in-out infinite; }
.floating-cta.visible:hover { animation: none; box-shadow: 0 12px 36px rgba(60,40,28,0.35); }

/* ==========================================================
   GLOWING SECTION DIVIDERS
   ========================================================== */
.svg-divider svg { filter: drop-shadow(0 0 14px rgba(184,137,68,0.5)); }
@keyframes dividerPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.9; }
}
.svg-divider { animation: dividerPulse 4s ease-in-out infinite; }

/* ==========================================================
   BACKGROUND FILM GRAIN — luxury texture
   ========================================================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ==========================================================
   PARTICLE CANVAS
   ========================================================== */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

/* ==========================================================
   LIGHTBOX
   ========================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20,14,8,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border: 2px solid var(--gold);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 40px rgba(184,137,68,0.15);
  transform: scale(0.88) translateY(10px);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.lightbox-overlay.active img {
  transform: scale(1) translateY(0);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245,234,212,0.10);
  border: 1px solid rgba(184,137,68,0.35);
  padding: 0.65rem 1.3rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border-radius: 2px;
}
.lightbox-close:hover { background: rgba(245,234,212,0.22); transform: scale(1.05); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--gold);
  background: rgba(245,234,212,0.08);
  border: 1px solid rgba(184,137,68,0.25);
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border-radius: 50%;
  font-family: 'Cormorant Garamond', serif;
}
.lightbox-nav:hover { background: rgba(245,234,212,0.18); transform: translateY(-50%) scale(1.12); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  opacity: 0.8;
}
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-prev { left: 0.8rem; }
  .lightbox-next { right: 0.8rem; }
}

/* ==========================================================
   CURSOR GLOW FOLLOWER
   ========================================================== */
.cursor-glow {
  position: fixed;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,137,68,0.06) 0%, rgba(196,122,107,0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: opacity 0.4s ease;
  opacity: 0;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ==========================================================
   CARD HOVER GLOW — site-wide upgrade
   ========================================================== */
.bonus-card:hover,
.studio-card:hover,
.benefit-card:hover,
.work-card:hover,
.team-card:hover,
.swthz-card:hover {
  box-shadow: 0 14px 44px rgba(60,40,28,0.14), 0 0 24px rgba(184,137,68,0.10) !important;
  border-color: var(--gold) !important;
}

/* ==========================================================
   3D CARD TILT — smooth spring return
   ========================================================== */
.bonus-card,
.pillar,
.studio-card,
.benefit-card,
.team-card,
.vibe-tile {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ==========================================================
   PILLAR HOVER GLOW
   ========================================================== */
.pillar:hover {
  box-shadow: 0 12px 36px rgba(184,137,68,0.18), inset 0 1px 0 rgba(255,246,225,0.6) !important;
}

/* ==========================================================
   GALLERY CELL ENHANCEMENTS
   ========================================================== */
.g-cell { cursor: zoom-in; }
.g-cell:hover {
  box-shadow: 0 10px 35px rgba(184,137,68,0.22);
  z-index: 2;
}
.g-cell:hover img {
  transform: scale(1.06);
  filter: brightness(1.12) saturate(1.15);
}

/* ==========================================================
   PHASE CARD GOLDEN OVERLAY
   ========================================================== */
.phase { position: relative; overflow: hidden; }
.phase::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(184,137,68,0.07) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.phase:hover::after { opacity: 1; }

/* ==========================================================
   TRADE COLUMN ANIMATED BORDERS
   ========================================================== */
@keyframes tradeSagePulse {
  0%, 100% { border-color: rgba(149,165,133,0.55); }
  50%      { border-color: rgba(149,165,133,0.90); }
}
.trade-col.give { animation: tradeSagePulse 5s ease-in-out infinite; }
@keyframes tradeGoldPulse {
  0%, 100% { border-color: var(--gold); }
  50%      { border-color: var(--rose); }
}
.trade-col.get { animation: tradeGoldPulse 5s ease-in-out infinite; }

/* ==========================================================
   TAROT CARD MYSTICAL GLOW
   ========================================================== */
@keyframes tarotGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(60,40,28,0.18), 0 0 20px rgba(149,165,133,0.12); }
  50%      { box-shadow: 0 14px 40px rgba(60,40,28,0.22), 0 0 50px rgba(149,165,133,0.32); }
}
.tarot-card:not(.flipped) { animation: tarotGlow 3s ease-in-out infinite; }

/* ==========================================================
   LETTER PARAGRAPH STAGGER — one by one blur-in
   ========================================================== */
.letter-body p {
  opacity: 0 !important;
  transform: translateY(14px);
  filter: blur(3px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}
.letter-body p.in {
  opacity: 0.92 !important;
  transform: translateY(0);
  filter: blur(0);
}

/* ==========================================================
   CERTIFICATE SEAL SPIN
   ========================================================== */
.cert-mark { display: inline-block; animation: sunSpin 22s linear infinite; }

/* ==========================================================
   VIBE TILE LIGHT SWEEP
   ========================================================== */
.vibe-tile { position: relative; overflow: hidden; }
.vibe-tile::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.10) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.vibe-tile:hover::after { transform: translateX(30%); }

/* ==========================================================
   BONUS CARD CONIC SWEEP
   ========================================================== */
.bonus-card { overflow: hidden; }
.bonus-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(184,137,68,0.04) 25%, transparent 50%);
  animation: cardSweep 10s linear infinite;
  pointer-events: none;
}
@keyframes cardSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ==========================================================
   DM TYPING INDICATOR
   ========================================================== */
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}
.dm-typing {
  display: inline-flex;
  gap: 3px;
  padding: 0.55rem 0.85rem;
  align-self: flex-start;
  background: var(--ink-2);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}
.dm-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mist);
  animation: typingDot 1.4s ease-in-out infinite;
}
.dm-typing span:nth-child(2) { animation-delay: 0.15s; }
.dm-typing span:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================================
   FLOATING AMBIENT ORBS
   ========================================================== */
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(15px, -20px) scale(1.04); }
  66%      { transform: translate(-10px, 10px) scale(0.97); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-20px, 15px) scale(1.06); }
  66%      { transform: translate(10px, -12px) scale(0.95); }
}
.section-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.section-orb.orb-gold { background: rgba(184,137,68,0.15); animation: orbFloat1 12s ease-in-out infinite; }
.section-orb.orb-rose { background: rgba(196,122,107,0.12); animation: orbFloat2 14s ease-in-out infinite; }
.section-orb.orb-sage { background: rgba(149,165,133,0.12); animation: orbFloat1 16s ease-in-out infinite; }

/* ==========================================================
   GATE UNLOCK — cinematic blur-scale
   ========================================================== */
@keyframes gateReveal {
  0%   { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.06); filter: blur(14px); }
}
.gate.unlock {
  animation: gateReveal 0.9s cubic-bezier(0.4,0,0.2,1) forwards !important;
  transition: none !important;
}

/* ==========================================================
   PARALLAX WILL-CHANGE
   ========================================================== */
.hero-bg, .mattea-bg, .vi-bg, .trial-bg, .ask-bg { will-change: transform; }

/* ==========================================================
   TLDR ROW ENTRANCE — slide in from alternate sides
   ========================================================== */
.tldr-row {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.tldr-row:nth-child(odd)  { transform: translateX(-30px); }
.tldr-row:nth-child(even) { transform: translateX(30px); }
.tldr-row.in { opacity: 1; transform: translateX(0); }

/* ==========================================================
   PRIVACY ITEMS — stagger fade with accent bar
   ========================================================== */
.privacy-list li {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.privacy-list li:hover {
  transform: translateX(6px);
  box-shadow: -4px 0 0 var(--gold);
}

/* ==========================================================
   DAY TIMELINE GLOW DOTS
   ========================================================== */
.day-slot.work::before { animation: borderGlow 3s ease-in-out infinite; }

/* ==========================================================
   SAMPLE WEEK — hover lift
   ========================================================== */
.week-day {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.week-day:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(60,40,28,0.10);
}

/* ==========================================================
   MAP ARC — enhanced glow
   ========================================================== */
.map-arc {
  filter: drop-shadow(0 0 6px rgba(184,137,68,0.4));
}
.map-dot.sj {
  filter: drop-shadow(0 0 10px rgba(184,137,68,0.7)) drop-shadow(0 0 20px rgba(184,137,68,0.3));
}

/* ==========================================================
   MOCKUP CARD — screen glow
   ========================================================== */
.mockup-frame {
  position: relative;
}
.mockup-frame::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(135deg, rgba(184,137,68,0.12), rgba(196,122,107,0.08));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(12px);
}
.mockup-card:hover .mockup-frame::after { opacity: 1; }

/* ==========================================================
   QUOTA CTA — magnetic spring
   ========================================================== */
.quota-cta {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease, filter 0.25s ease !important;
}

/* ==========================================================
   HERO VIGNETTE BREATHING
   ========================================================== */
@keyframes vignetteBreathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.88; }
}
.hero-veil { animation: vignetteBreathe 8s ease-in-out infinite; }

/* ==========================================================
   REDUCED MOTION — respect preference
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg img { animation: none !important; }
  #particleCanvas { display: none; }
  .cursor-glow { display: none; }
}
