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

/* ==========================================================================
   EaseAway Themes & Orchestration CSS
   ========================================================================== */

/* ---------- 1. Theme Variables Mapping ---------- */

/* Whimsical Dreamscape (Default) */
body.theme-whimsical {
  --ea-forest: #273e2d;
  --ea-forest-soft: #5e7d64;
  --ea-terracotta: #df7c58;
  --ea-terracotta-hover: #cb6b49;
  --ea-cream: #faf7f0;
  --ea-cream-deep: #f2ebe1;
  --ea-sand: #e6dac3;
  --ea-paper: #fcfaf5;
  --ea-ink: #1b261d;
  --ea-dust-amber: #c59b48;
  
  --ea-glass-bg: rgba(255, 255, 255, 0.45);
  --ea-glass-border: rgba(255, 255, 255, 0.35);
  --ea-glass-blur: 16px;
  
  --ea-shadow-soft: 0 8px 32px 0 rgba(45, 54, 40, 0.06);
  --ea-shadow-lift: 0 16px 48px -8px rgba(45, 54, 40, 0.12);
  
  --ea-font-title: 'Cormorant Garamond', Georgia, serif;
  --ea-font-body: 'DM Sans', sans-serif;
  --ea-radius-md: 20px;
  --ea-radius-lg: 30px;
}

/* Editorial Field Guide (Original print layout) */
body.theme-editorial {
  --ea-forest: #1b2e1f;
  --ea-forest-soft: #2d4a33;
  --ea-terracotta: #e8734a;
  --ea-terracotta-hover: #d65f37;
  --ea-cream: #f9f7f2;
  --ea-cream-deep: #efeae0;
  --ea-sand: #e8dcc5;
  --ea-paper: #fbf8f0;
  --ea-ink: #0f1c10;
  --ea-dust-amber: #c89e4d;
  
  --ea-glass-bg: rgba(255, 255, 255, 0.72);
  --ea-glass-border: rgba(255, 255, 255, 0.45);
  --ea-glass-blur: 12px;
  
  --ea-shadow-soft: 0 10px 30px -10px rgba(27, 46, 31, 0.12);
  --ea-shadow-lift: 0 18px 40px -14px rgba(27, 46, 31, 0.22);
  
  --ea-font-title: 'Fraunces', Georgia, serif;
  --ea-font-body: 'Inter', sans-serif;
  --ea-radius-md: 18px;
  --ea-radius-lg: 24px;
}

/* Golden Hour Scenic */
body.theme-golden {
  --ea-forest: #2b170c;
  --ea-forest-soft: #6d4c3d;
  --ea-terracotta: #e76f51;
  --ea-terracotta-hover: #d1583b;
  --ea-cream: #fbf3eb;
  --ea-cream-deep: #f5e3d3;
  --ea-sand: #ebd7c8;
  --ea-paper: #fcf6f0;
  --ea-ink: #2b170c;
  --ea-dust-amber: #cca07c;
  
  --ea-glass-bg: rgba(253, 243, 235, 0.5);
  --ea-glass-border: rgba(255, 255, 255, 0.45);
  --ea-glass-blur: 10px;
  
  --ea-shadow-soft: 0 10px 30px -10px rgba(84, 52, 38, 0.10);
  --ea-shadow-lift: 0 18px 40px -14px rgba(84, 52, 38, 0.18);
  
  --ea-font-title: 'Fraunces', Georgia, serif;
  --ea-font-body: 'DM Sans', sans-serif;
  --ea-radius-md: 16px;
  --ea-radius-lg: 22px;
}

/* Global Font Assignment Overrides */
body.theme-whimsical h1, body.theme-whimsical h2, body.theme-whimsical h3, body.theme-whimsical h4,
body.theme-whimsical .logo, body.theme-whimsical .ea-cover__title, body.theme-whimsical .ea-editorial-h,
body.theme-whimsical .dest-picker h2, body.theme-whimsical .itin-day-title, body.theme-whimsical .itin-name,
body.theme-whimsical .ea-trip-sentence {
  font-family: var(--ea-font-title) !important;
  font-weight: 500 !important;
  font-style: normal !important;
}

body.theme-whimsical .ea-cover__title {
  font-weight: 400 !important;
  font-size: clamp(2.5rem, 6.5vw, 4.8rem) !important;
}

/* Symmetrical Centered Hero layout for Whimsical and Golden Hour */
body.theme-whimsical .ea-cover, body.theme-golden .ea-cover {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(48px, 8vh, 90px) 24px clamp(28px, 4vh, 48px);
}

body.theme-whimsical .ea-cover__kicker, body.theme-golden .ea-cover__kicker {
  font-family: var(--ea-font-body);
  font-size: 1.05rem;
  max-width: 58ch;
  margin: 0 auto 30px;
  line-height: 1.7;
}

/* ---------- 2. Floating Blur Orbs background ---------- */
.ea-blur-orb-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
  display: none;
}
body.theme-whimsical .ea-blur-orb-container, body.theme-golden .ea-blur-orb-container {
  display: block;
}
.ea-blur-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
}
body.theme-whimsical .ea-blur-orb--1 {
  background: radial-gradient(circle, rgba(167, 201, 180, 0.6) 0%, rgba(250, 247, 240, 0) 70%);
  width: 500px;
  height: 500px;
  top: -150px;
  left: 10%;
  animation: ea-orb-float 22s ease-in-out infinite alternate;
}
body.theme-whimsical .ea-blur-orb--2 {
  background: radial-gradient(circle, rgba(239, 203, 191, 0.5) 0%, rgba(250, 247, 240, 0) 70%);
  width: 600px;
  height: 600px;
  bottom: -200px;
  right: 10%;
  animation: ea-orb-float 28s ease-in-out infinite alternate-reverse;
}
body.theme-golden .ea-blur-orb--1 {
  background: radial-gradient(circle, rgba(244, 162, 97, 0.5) 0%, rgba(251, 243, 235, 0) 70%);
  width: 550px;
  height: 550px;
  top: -100px;
  right: 15%;
  animation: ea-orb-float 20s ease-in-out infinite alternate;
}
body.theme-golden .ea-blur-orb--2 {
  background: radial-gradient(circle, rgba(231, 111, 81, 0.4) 0%, rgba(251, 243, 235, 0) 70%);
  width: 450px;
  height: 450px;
  bottom: -150px;
  left: 15%;
  animation: ea-orb-float 26s ease-in-out infinite alternate-reverse;
}

@keyframes ea-orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 50px) scale(0.9); }
}

/* ---------- 3. Dynamic Weather Overlays ---------- */
.ea-weather-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* Rain Effect */
.ea-rain-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
}
body.weather-rainy .ea-rain-container {
  display: block;
}
.ea-rain-drop {
  position: absolute;
  width: 1.5px;
  height: 20px;
  background: linear-gradient(transparent, rgba(94, 125, 100, 0.35));
  animation: ea-rain-fall 1.2s linear infinite;
}
@keyframes ea-rain-fall {
  0% { transform: translateY(-40px) rotate(15deg); opacity: 0; }
  20% { opacity: 0.7; }
  80% { opacity: 0.7; }
  100% { transform: translateY(105vh) rotate(15deg); opacity: 0; }
}

/* Rainbow Overlay */
.ea-rainbow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  border-radius: 450px 450px 0 0;
  box-shadow: 
    0 0 40px 5px rgba(255, 0, 0, 0.04) inset,
    0 0 40px 10px rgba(255, 127, 0, 0.04) inset,
    0 0 40px 15px rgba(255, 255, 0, 0.03) inset,
    0 0 40px 20px rgba(0, 255, 0, 0.03) inset,
    0 0 40px 25px rgba(0, 0, 255, 0.02) inset,
    0 0 40px 30px rgba(75, 0, 130, 0.02) inset,
    0 0 40px 35px rgba(148, 0, 211, 0.02) inset;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}
body.weather-rainy .ea-rainbow {
  opacity: 0.65;
}

/* Sunshine Sparkles (Clear Sky) */
.ea-sunshine-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
}
body.weather-clear .ea-sunshine-container {
  display: block;
}
.ea-sun-orb {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 239, 204, 0.4) 0%, rgba(255,255,255,0) 70%);
  filter: blur(20px);
  animation: ea-sun-pulse 8s ease-in-out infinite alternate;
}
@keyframes ea-sun-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0.8; }
}

.ea-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  opacity: 0;
  animation: ea-sparkle-glow 4s ease-in-out infinite;
}
@keyframes ea-sparkle-glow {
  0%, 100% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1); opacity: 0.6; }
}

/* Sunset / Evening Mood */
.ea-sunset-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(239, 137, 54, 0.08) 0%, rgba(123, 44, 191, 0.05) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 1.5s ease;
}
body.weather-sunset .ea-sunset-backdrop {
  opacity: 1;
}

/* ---------- 4. Whimsical Visual Ornaments ---------- */

/* Butterflies */
.ea-butterfly {
  position: absolute;
  width: 16px;
  height: 12px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s;
}
body.theme-whimsical .ea-butterfly {
  opacity: 0.8;
}
.ea-butterfly__wings {
  display: flex;
  width: 100%;
  height: 100%;
}
.ea-butterfly__wing {
  width: 8px;
  height: 12px;
  background: var(--ea-terracotta, #df7c58);
  border-radius: 50% 50% 40% 40%;
  animation: ea-wing-flap 0.18s linear infinite;
  transform-origin: right center;
}
.ea-butterfly__wing--right {
  border-radius: 50% 50% 40% 40%;
  animation-name: ea-wing-flap-right;
  transform-origin: left center;
}
@keyframes ea-wing-flap {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(65deg); }
}
@keyframes ea-wing-flap-right {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(-65deg); }
}

/* Margin Decorative Flowers, Mushrooms, and Berries */
.ea-margin-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  display: none;
  z-index: 1;
}
body.theme-whimsical .ea-margin-decorations {
  display: block;
}
.ea-decor-item {
  position: absolute;
  opacity: 0.75;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}
.ea-decor-item:hover {
  transform: scale(1.15) rotate(5deg);
  opacity: 1;
}
/* Placement presets for landing pages and margins */
.ea-decor-item--left-1 { top: 200px; left: 15px; }
.ea-decor-item--right-1 { top: 400px; right: 20px; }
.ea-decor-item--left-2 { top: 750px; left: 20px; }
.ea-decor-item--right-2 { top: 1100px; right: 15px; }

/* Interactive opening flowers */
.ea-flower-interactive {
  cursor: pointer;
  pointer-events: auto;
}
.ea-flower-petal {
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ea-flower-interactive:hover .ea-flower-petal-1 { transform: rotate(15deg) scale(1.05); }
.ea-flower-interactive:hover .ea-flower-petal-2 { transform: rotate(-15deg) scale(1.05); }

/* ---------- 5. Moving Visual SVG Animations ---------- */
.ea-animated-visual-container {
  width: 100%;
  max-width: 600px;
  margin: 32px auto;
  padding: 24px;
  background: var(--ea-glass-bg);
  border: 1px solid var(--ea-glass-border);
  backdrop-filter: blur(var(--ea-glass-blur));
  -webkit-backdrop-filter: blur(var(--ea-glass-blur));
  border-radius: var(--ea-radius-md);
  box-shadow: var(--ea-shadow-soft);
  text-align: center;
  display: none;
}
body.theme-whimsical .ea-animated-visual-container {
  display: block;
}

/* Symmetrical layouts & glass cards in Whimsical theme */
body.theme-whimsical .ea-dest-card, body.theme-whimsical .ea-vibe-entry {
  background: var(--ea-glass-bg) !important;
  border: 1px solid var(--ea-glass-border) !important;
  backdrop-filter: blur(var(--ea-glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--ea-glass-blur)) !important;
  box-shadow: var(--ea-shadow-soft) !important;
  border-radius: var(--ea-radius-md) !important;
  transition: transform 0.3s var(--ea-ease), box-shadow 0.3s var(--ea-ease), border-color 0.3s var(--ea-ease);
}
body.theme-whimsical .ea-dest-card:hover, body.theme-whimsical .ea-vibe-entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--ea-shadow-lift) !important;
  border-color: var(--ea-terracotta) !important;
}

body.theme-whimsical .ea-bottom-nav, body.theme-whimsical .ea-page-header {
  background: rgba(250, 247, 240, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* Rounded buttons */
body.theme-whimsical .ea-cta-pill, 
body.theme-whimsical .cta-button, 
body.theme-whimsical .dest-card {
  border-radius: var(--ea-radius-pill) !important;
  padding: 12px 32px !important;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* SVG specific animations */
.ea-svg-car-body {
  animation: ea-car-bounce 0.8s ease-in-out infinite alternate;
}
.ea-svg-wheel {
  animation: ea-wheel-rotate 1.5s linear infinite;
  transform-origin: center;
}
@keyframes ea-car-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2.5px); }
}
@keyframes ea-wheel-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ea-svg-hiker-leg-l {
  animation: ea-leg-swing 0.8s ease-in-out infinite alternate;
  transform-origin: 30px 45px;
}
.ea-svg-hiker-leg-r {
  animation: ea-leg-swing 0.8s ease-in-out infinite alternate-reverse;
  transform-origin: 30px 45px;
}
@keyframes ea-leg-swing {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(15deg); }
}

.ea-svg-ripple {
  animation: ea-ripple-expand 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  transform-origin: center;
}
.ea-svg-ripple--2 {
  animation-delay: 0.6s;
}
@keyframes ea-ripple-expand {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ea-svg-splash-drop {
  animation: ea-splash-bounce 1.5s ease-out infinite;
}
@keyframes ea-splash-bounce {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  30% { opacity: 0.9; }
  60% { transform: translateY(-20px) scale(0.8); opacity: 0.9; }
  100% { transform: translateY(5px) scale(0.5); opacity: 0; }
}

/* ---------- 6. Symmetrical Theme Selector HUD ---------- */
.ea-theme-hud {
  position: fixed;
  bottom: 80px; /* Sit right above bottom navigation */
  left: 50%;
  transform: translateX(-50%);
  background: var(--ea-glass-bg);
  border: 1px solid var(--ea-glass-border);
  backdrop-filter: blur(var(--ea-glass-blur));
  -webkit-backdrop-filter: blur(var(--ea-glass-blur));
  padding: 6px 10px;
  border-radius: var(--ea-radius-pill, 99px);
  box-shadow: 0 8px 32px rgba(27, 46, 31, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1001;
  pointer-events: auto;
  transition: transform 0.3s ease, opacity 0.3s;
}

.ea-theme-hud__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ea-forest-soft);
  padding: 0 10px;
}

.ea-theme-hud__option {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--ea-forest-soft);
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.25s var(--ea-ease);
  white-space: nowrap;
}

.ea-theme-hud__option:hover {
  background: rgba(255,255,255,0.25);
  color: var(--ea-forest);
}

.ea-theme-hud__option.is-active {
  background: var(--ea-forest);
  color: var(--ea-cream, #fff);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .ea-theme-hud {
    bottom: 74px;
    width: 90%;
    justify-content: space-between;
    padding: 4px 6px;
  }
  .ea-theme-hud__label {
    display: none;
  }
  .ea-theme-hud__option {
    padding: 6px 10px;
    font-size: 10px;
  }
}

/* ---------- Reduced motion — suppress decorative animation (a11y) ---------- */
@media (prefers-reduced-motion: reduce) {
  .ea-blur-orb,
  .ea-blur-orb-container,
  .ea-rain-drop,
  .ea-sparkle,
  .ea-sun-orb,
  .ea-butterfly,
  .ea-butterfly__wing,
  .ea-butterfly__wing--right,
  .ea-svg-car-body,
  .ea-svg-wheel,
  .ea-svg-hiker-leg-l,
  .ea-svg-hiker-leg-r,
  .ea-svg-ripple,
  .ea-svg-splash-drop,
  .ea-decor-item,
  .ea-flower-petal,
  .ea-rainbow,
  .ea-sunset-backdrop,
  .ea-sunshine-container {
    animation: none !important;
    transition: none !important;
  }

  .ea-butterfly,
  .ea-rain-drop,
  .ea-sparkle {
    display: none !important;
  }

  .ea-blur-orb-container {
    opacity: 0.35;
  }

  body.weather-rainy .ea-rain-container,
  body.weather-clear .ea-sunshine-container {
    opacity: 0 !important;
    pointer-events: none;
  }

  .ea-theme-hud {
    transition: none !important;
  }
}
