/* ==========================================================================
   WORDS BY ARCHANA — Editorial Stylesheet & Design System
   Palette: Deep Teal (#0F3A45), Centre Teal (#1E5D6C), Yellow (#E8C547), Ivory (#F8F7F1)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Reenie+Beanie&display=swap');

:root {
  --color-primary-teal: #1E5D6C;
  --color-deep-teal: #0F3A45;
  --color-signature-yellow: #E8C547;
  --color-soft-ivory: #F8F7F1;
  --color-white: #FFFFFF;
  --color-charcoal: #252525;
  --color-muted-text: #5A696E;
  --color-subtle-teal: #EAF4F6;
  --color-border-teal: rgba(30, 93, 108, 0.18);
  
  --font-serif-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-serif-subheading: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-handwriting: 'Reenie Beanie', cursive;
  
  --shadow-editorial: 0 20px 40px -15px rgba(15, 58, 69, 0.12);
  --shadow-hover: 0 30px 60px -12px rgba(15, 58, 69, 0.22);
  --shadow-glow-yellow: 0 0 30px rgba(232, 197, 71, 0.35);
  --shadow-glow-teal: 0 0 30px rgba(30, 93, 108, 0.35);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background-color: var(--color-white);
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif-display);
  letter-spacing: -0.015em;
}

.font-editorial-heading {
  font-family: var(--font-serif-display);
  font-weight: 600;
  line-height: 1.15;
}

.font-handwritten {
  font-family: var(--font-handwriting);
}

/* Custom Selection */
::selection {
  background-color: var(--color-signature-yellow);
  color: var(--color-deep-teal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-soft-ivory);
}
::-webkit-scrollbar-thumb {
  background: #1E5D6C;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0F3A45;
}

/* Editorial Brand Backgrounds */
.bg-deep-teal {
  background-color: var(--color-deep-teal);
}
.bg-primary-teal {
  background-color: var(--color-primary-teal);
}
.bg-signature-yellow {
  background-color: var(--color-signature-yellow);
}
.bg-soft-ivory {
  background-color: var(--color-soft-ivory);
}
.text-deep-teal {
  color: var(--color-deep-teal);
}
.text-primary-teal {
  color: var(--color-primary-teal);
}
.text-signature-yellow {
  color: var(--color-signature-yellow);
}
.border-primary-teal {
  border-color: var(--color-primary-teal);
}
.border-deep-teal {
  border-color: var(--color-deep-teal);
}
.border-signature-yellow {
  border-color: var(--color-signature-yellow);
}

/* Subtle Teal Gradients */
.gradient-teal-hero {
  background: linear-gradient(145deg, #0F3A45 0%, #154754 50%, #1E5D6C 100%);
}

.gradient-teal-card {
  background: linear-gradient(135deg, rgba(15, 58, 69, 0.95) 0%, rgba(30, 93, 108, 0.9) 100%);
}

.gradient-ivory-page {
  background: linear-gradient(180deg, #FAF9F5 0%, #F4F2E9 100%);
}

/* Signature Yellow Highlights & Underlines */
.signature-highlight {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.signature-highlight::after {
  content: "";
  position: absolute;
  left: -2%;
  bottom: 4px;
  width: 104%;
  height: 9px;
  background: var(--color-signature-yellow);
  opacity: 0.75;
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-0.6deg);
  transition: all 0.3s ease;
}

.signature-highlight:hover::after {
  height: 12px;
  opacity: 0.9;
}

.signature-highlight-white::after {
  content: "";
  position: absolute;
  left: -3%;
  bottom: 2px;
  width: 106%;
  height: 8px;
  background: #E8C547;
  opacity: 0.85;
  z-index: 0;
  border-radius: 3px;
  transform: rotate(-0.5deg);
}

/* Handwritten stroke underline SVG simulation */
.hand-drawn-line {
  position: relative;
}
.hand-drawn-line::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 4px;
  background-image: radial-gradient(circle, var(--color-signature-yellow) 40%, transparent 40%);
  background-size: 8px 4px;
}

/* Connected Motif Line: Words -> Ideas -> People -> Conversations -> Change */
.motif-trail {
  position: relative;
}

.motif-trail::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 197, 71, 0.8), #1E5D6C, transparent);
  z-index: 0;
}

/* Interactive Book 3D Spine hover */
.book-card-3d {
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.book-card-3d:hover {
  transform: translateY(-8px) scale(1.02);
}

.book-shadow {
  box-shadow: 0 16px 32px -8px rgba(15, 58, 69, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Glassmorphism & Soft Layers */
.glass-teal {
  background: rgba(15, 58, 69, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 197, 71, 0.15);
}

.glass-white {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(30, 93, 108, 0.12);
}

/* Pulse Animations */
@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
    box-shadow: 0 0 25px rgba(232, 197, 71, 0.6);
  }
}

.animate-soft-pulse {
  animation: softPulse 3.5s infinite ease-in-out;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float-slow {
  animation: floatSlow 5s infinite ease-in-out;
}

/* Orbiting Animation for Ecosystem Visual */
@keyframes rotateClockwise {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateCounter {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.rotate-orbit {
  animation: rotateClockwise 60s linear infinite;
}

.rotate-counter {
  animation: rotateCounter 60s linear infinite;
}

/* Five Generations Signature Interactive UI */
.gen-pill-btn {
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gen-pill-btn.active {
  background-color: var(--color-deep-teal);
  color: #FFFFFF;
  border-color: var(--color-signature-yellow);
  box-shadow: 0 10px 25px -5px rgba(15, 58, 69, 0.35);
  transform: translateY(-2px);
}

/* Modal Animations */
.modal-backdrop {
  background-color: rgba(15, 58, 69, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content-animated {
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-item {
  animation: modalSlideUp 0.3s ease forwards;
}

/* Audio Player Custom Controls */
.audio-progress-bar {
  appearance: none;
  background: #D5E5E8;
  height: 6px;
  border-radius: 3px;
  outline: none;
}
.audio-progress-bar::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary-teal);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}
.audio-progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: var(--color-signature-yellow);
}

/* Testimonial Quote Dropcaps */
.editorial-quote::before {
  content: "“";
  font-family: var(--font-serif-display);
  font-size: 4.5rem;
  line-height: 0;
  position: absolute;
  top: 30px;
  left: 20px;
  color: rgba(232, 197, 71, 0.25);
  pointer-events: none;
}

/* Mobile Action Bar */
@media (max-width: 768px) {
  .mobile-bottom-bar {
    box-shadow: 0 -4px 20px rgba(15, 58, 69, 0.15);
  }
}
