/*
 * HAVENSE — "Playful Family" Design System
 * Warm · Organic · Safe · Like a cozy living room
 */

/* ========================================
   1. DESIGN TOKENS
   ======================================== */
:root {
  /* Core Palette — VIBRANT */
  --primary: #2563EB;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --grounding: #2C241E;
  --accent-teal: #3DBFB2;
  --accent-coral: #FF7A68;
  --accent-yellow: #FFCC33;
  --emotional: #F65A5A;

  /* Warm Backgrounds — RICHER */
  --bg-cream: #FFF9F2;
  --bg-card: rgba(255, 255, 253, 0.92);
  --bg-section-warm: #FFF0E0;
  --bg-section-mint: #E5F8F4;
  --bg-footer: #4A3828;
  --bg-footer-light: #E0D2C3;

  /* Typography */
  --font-heading: 'Quicksand', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 3rem;
  --sp-xl: 5rem;
  --sp-xxl: 7rem;

  /* Super-Rounded Corners */
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-pill: 9999px;

  /* Richer Shadows */
  --shadow-soft: 0 4px 20px rgba(61, 50, 41, 0.1);
  --shadow-card: 0 6px 28px rgba(61, 50, 41, 0.12);
  --shadow-float: 0 8px 32px rgba(61, 50, 41, 0.16);
  --shadow-btn: 0 6px 22px rgba(37, 99, 235, 0.35);
}


/* ========================================
   2. RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--grounding);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden !important;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

/* Organic floating blobs — warm clouds in the background */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.7;
  pointer-events: none;
}

body::before {
  width: 650px;
  height: 650px;
  top: -100px;
  right: -150px;
  background: radial-gradient(circle, rgba(255, 204, 51, 0.4) 0%, rgba(255, 173, 96, 0.15) 40%, transparent 70%);
  animation: floatBlob 20s ease-in-out infinite alternate;
}

body::after {
  width: 550px;
  height: 550px;
  bottom: 10%;
  left: -100px;
  background: radial-gradient(circle, rgba(61, 191, 178, 0.35) 0%, rgba(94, 205, 193, 0.1) 40%, transparent 70%);
  animation: floatBlob 25s ease-in-out infinite alternate-reverse;
}

@keyframes floatBlob {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -20px) scale(1.05);
  }

  100% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

/* Hero image breathing animation */
.hero-float {
  animation: heroBreath 5s ease-in-out infinite;
}

@keyframes heroBreath {

  0%,
  100% {
    transform: rotate(2deg) translateY(0);
  }

  50% {
    transform: rotate(2deg) translateY(-10px);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--grounding);
  margin-bottom: var(--sp-sm);
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: var(--sp-sm);
  color: #5C4F44;
  line-height: 1.75;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}


/* ========================================
   3. LAYOUT UTILITIES
   ======================================== */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.section {
  padding: var(--sp-xxl) 0;
}

.grid {
  display: grid;
  gap: var(--sp-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.flex {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.text-center {
  text-align: center;
}


/* ========================================
   4. FLOATING PILL NAVBAR
   ======================================== */
.navbar-wrapper {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  /* Fix: Above backdrop */
  width: 92%;
  max-width: 900px;
}

.navbar {
  background: linear-gradient(135deg, rgba(253, 252, 248, 0.95) 0%, rgba(255, 245, 235, 0.95) 50%, rgba(245, 255, 250, 0.92) 100%);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-radius: var(--r-pill);
  padding: 0.6rem 1.5rem;
  box-shadow: 0 4px 24px rgba(61, 50, 41, 0.08), 0 1px 3px rgba(255, 173, 96, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(255, 217, 102, 0.25);
  border-bottom: 2px solid rgba(255, 173, 96, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 50%, #E04E9C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  text-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(37, 99, 235, 0.15));
  transition: filter 0.3s ease;
}

.navbar .logo:hover {
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.25));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grounding);
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-pill);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-links a:hover {
  background: linear-gradient(135deg, rgba(255, 217, 102, 0.2), rgba(94, 205, 193, 0.15));
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-links a.active {
  background: linear-gradient(135deg, rgba(255, 173, 96, 0.18), rgba(255, 217, 102, 0.22));
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(255, 173, 96, 0.15);
}

.nav-cta {
  background: linear-gradient(135deg, #2563EB, #4F46E5) !important;
  color: white !important;
  padding: 0.5rem 1.1rem !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.mobile-menu-btn {
  display: none;
  background: linear-gradient(135deg, rgba(255, 217, 102, 0.2), rgba(255, 173, 96, 0.15));
  border: 1.5px solid rgba(255, 173, 96, 0.25);
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--grounding);
  padding: 0.35rem 0.6rem;
  border-radius: var(--r-sm);
  transition: all 0.25s ease;
}

.mobile-menu-btn:active {
  transform: scale(0.92);
}


/* ========================================
   5. CARDS (Scrapbook Style)
   ======================================== */
.card {
  background: linear-gradient(160deg, rgba(255, 255, 253, 0.95) 0%, rgba(255, 248, 240, 0.9) 100%);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
  border: 1.5px solid rgba(255, 204, 51, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: 0 16px 48px rgba(61, 50, 41, 0.18);
  border-color: rgba(255, 173, 96, 0.25);
}

/* Crayon-colored card accents — bolder */
.card-coral {
  border-top: 5px solid var(--accent-coral);
  background: linear-gradient(160deg, rgba(255, 255, 253, 0.95) 0%, rgba(255, 240, 237, 0.7) 100%);
}

.card-yellow {
  border-top: 5px solid var(--accent-yellow);
  background: linear-gradient(160deg, rgba(255, 255, 253, 0.95) 0%, rgba(255, 248, 225, 0.7) 100%);
}

.card-mint {
  border-top: 5px solid var(--accent-teal);
  background: linear-gradient(160deg, rgba(255, 255, 253, 0.95) 0%, rgba(229, 248, 244, 0.7) 100%);
}


/* ========================================
   6. BUTTONS (Soft Pills)
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: white;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.45);
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border: 2.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-soft);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
}

.btn-warm {
  background: linear-gradient(135deg, #FF7A68, #FF9B6A);
  color: white;
  box-shadow: 0 6px 22px rgba(255, 122, 104, 0.4);
}

.btn-warm:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(255, 122, 104, 0.5);
  filter: brightness(1.08);
}


/* ========================================
   7. BADGES & DECORATIONS
   ======================================== */
.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.badge-safe {
  background: rgba(61, 191, 178, 0.2);
  color: #1E8A7E;
  border: 1px solid rgba(61, 191, 178, 0.15);
}

.badge-coral {
  background: rgba(255, 122, 104, 0.2);
  color: #C94D3C;
  border: 1px solid rgba(255, 122, 104, 0.15);
}

/* Hand-drawn squiggly underline */
.squiggle {
  position: relative;
  display: inline-block;
}

.squiggle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M0 5 Q12.5 0 25 5 T50 5 T75 5 T100 5' fill='none' stroke='%23FF8F80' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 50px 10px;
}

/* Sparkle/Doodle decorations */
.doodle-star {
  display: inline-block;
  font-size: 1.2rem;
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8) rotate(15deg);
  }
}

/* Highlight word (warm version) */
.highlight-word {
  position: relative;
  display: inline-block;
  color: var(--accent-coral);
  font-weight: 700;
  z-index: 1;
}

.highlight-word::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -4px;
  width: calc(100% + 8px);
  height: 35%;
  background: rgba(255, 217, 102, 0.4);
  border-radius: 4px;
  z-index: -1;
  transform: rotate(-1deg);
}


/* ========================================
   8. ICON BUBBLES
   ======================================== */
.icon-bubble {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-coral {
  background: rgba(255, 122, 104, 0.22);
}

.icon-blue {
  background: rgba(37, 99, 235, 0.14);
}

.icon-mint {
  background: rgba(61, 191, 178, 0.22);
}

.icon-yellow {
  background: rgba(255, 204, 51, 0.28);
}


/* ========================================
   9. TEXT UTILITIES
   ======================================== */
.text-primary {
  color: var(--primary);
}

.text-coral {
  color: var(--accent-coral);
}

.text-mint {
  color: var(--accent-teal);
}

.text-yellow {
  color: #C9A227;
}

.text-grounding {
  color: var(--grounding);
}

.text-muted {
  color: #8C7E73;
}


/* ========================================
   10. FOOTER — Warm & Wavy
   ======================================== */
.footer-wave {
  position: relative;
  /* Reduced top margin slightly */
  margin-top: var(--sp-lg);
}

/* SVG wave at the top of the footer — looks like rolling hills */
.footer-wave::before {
  content: '';
  display: block;
  width: 100%;
  height: 80px;
  background: var(--bg-cream);
  position: absolute;
  top: -1px;
  left: 0;
  /* "Hills" shape via CSS clip-path */
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 1;
}

.footer-main {
  background: linear-gradient(160deg, #4A3828 0%, #3A2B1C 50%, #2E2218 100%);
  color: #F0E4D7;
  /* Reduced Padding to fix "Too much blank space" */
  padding: calc(var(--sp-xl) + 40px) 0 var(--sp-md);
  position: relative;
}

/* Custom Grid for Footer (Brand | Video | Newsletter) */
.footer-grid {
  display: grid;
  grid-template-columns: 0.6fr 1.8fr 1fr;
  /* Brand | Wide Video | Form */
  gap: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  align-items: center;
  /* Vertically center items */
}

/* Responsive Video Container */
.footer-video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  /* Ensure it never hits outside screen */
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #000;
}

.footer-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile/tablet */
    gap: var(--sp-xl);
    text-align: center;
    padding: 0 1rem;
    /* Add side padding for mobile so content doesn't touch edges */
  }

  .footer-video-container {
    margin: 0 auto;
    width: 100%;
  }
}

/* Subtle warm accent glow on the footer */
.footer-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FFCC33, #FF7A68, #3DBFB2, transparent);
  border-radius: 3px;
}

.footer-main h3 {
  color: #FFFFFF;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-md);
}

.footer-main h4 {
  color: #FFF8F0;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-sm);
}

.footer-main p {
  color: #D4C4B2;
  font-size: 1.05rem;
  line-height: 1.8;
}

.footer-main span {
  color: #D4C4B2;
  font-size: 1rem;
}

.footer-main a {
  color: #F0DFC8;
  font-size: 1.05rem;
  transition: all 0.25s ease;
  position: relative;
}

.footer-main a:hover {
  color: #FFCC33;
  text-shadow: 0 0 12px rgba(255, 204, 51, 0.3);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--sp-md);
  margin-top: var(--sp-lg);
  text-align: center;
  font-size: 1rem;
  color: #C4B5A6;
  letter-spacing: 0.02em;
}


/* ========================================
   11. SECTION BLOBS (Decorative)
   ======================================== */
.blob {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  filter: blur(50px);
  opacity: 0.75;
}

.blob-peach {
  background: rgba(255, 180, 140, 0.7);
}

.blob-mint {
  background: rgba(61, 191, 178, 0.5);
}

.blob-yellow {
  background: rgba(255, 204, 51, 0.55);
}


/* ========================================
   12. RESPONSIVE — Mobile First
   ======================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .section {
    padding: var(--sp-xl) 0;
  }

  /* Fix hero overlap on mobile */
  .hero-gradient-bg {
    padding-top: 120px !important;
  }

  .badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
  }

  .navbar-wrapper {
    width: 96%;
    top: 10px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 249, 242, 0.98) 0%, rgba(255, 240, 224, 0.96) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1002;
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(61, 50, 41, 0.15);
    border-left: 1px solid rgba(255, 173, 96, 0.25);
    padding: 2rem;
  }

  /* Backdrop Overlay (Managed by JS) */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(44, 36, 30, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1999;
    /* Below navbar (2000) but above everything else */
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Decorative texture */
  .nav-links::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 173, 96, 0.15) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--r-md);
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
    text-align: center;
    color: #1a1a1a;
    /* Darker, sharper text */
    font-weight: 700;
    /* Bolder for readability */
  }

  /* Special style for the 'Join Free' button in menu */
  .nav-links .nav-cta {
    margin-top: 1rem;
    width: auto;
    min-width: 200px;
    background: linear-gradient(135deg, #2563EB, #4F46E5) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
  }

  .nav-links a:not(.nav-cta):hover {
    color: var(--primary);
    background: rgba(255, 217, 102, 0.3);
    transform: scale(1.05);
  }

  .nav-links a.active {
    color: var(--primary);
    background: rgba(255, 173, 96, 0.15);
    font-weight: 800;
  }

  /* Staggered entrance animation for links */
  .nav-links.active a:nth-child(2) {
    animation: menuFadeIn 0.4s 0.05s both;
  }

  .nav-links.active a:nth-child(3) {
    animation: menuFadeIn 0.4s 0.1s both;
  }

  .nav-links.active a:nth-child(4) {
    animation: menuFadeIn 0.4s 0.15s both;
  }

  .nav-links.active a:nth-child(5) {
    animation: menuFadeIn 0.4s 0.2s both;
  }

  .nav-links.active a:nth-child(6) {
    animation: menuFadeIn 0.4s 0.25s both;
  }

  .nav-links.active a:nth-child(7) {
    animation: menuFadeIn 0.4s 0.3s both;
  }

  .nav-links.active a:nth-child(8) {
    animation: menuFadeIn 0.4s 0.35s both;
  }

  @keyframes menuFadeIn {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-menu-btn {
    display: block;
    transition: transform 0.2s ease;
  }

  .mobile-menu-btn:hover {
    transform: scale(1.1);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    padding: var(--sp-md);
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}


/* ========================================
   13. TOOL PAGE SPECIFIC STYLES
   ======================================== */
.tool-card {
  background: white;
  padding: var(--sp-xl);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--sp-xl);
  border: 1.5px solid rgba(0, 0, 0, 0.04);
}

.form-group {
  margin-bottom: var(--sp-md);
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--grounding);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #E8DDD3;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--grounding);
  background: white;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

#topic-display {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--sp-md) 0;
  padding: var(--sp-md);
  background: var(--bg-section-warm);
  border-radius: var(--r-md);
  border: 2px dashed #E8DDD3;
}


/* ========================================
   14. SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a reveal container */
.reveal .card:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal .card:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal .card:nth-child(3) {
  transition-delay: 0.25s;
}


/* ========================================
   15. MOBILE MENU CLOSE BUTTON
   ======================================== */
.mobile-close-btn {
  display: none;
  position: absolute;
  top: 22px;
  right: 22px;
  background: linear-gradient(135deg, rgba(255, 173, 96, 0.15), rgba(255, 217, 102, 0.2));
  border: 2px solid rgba(255, 173, 96, 0.25);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--grounding);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background: linear-gradient(135deg, rgba(255, 130, 67, 0.25), rgba(255, 173, 96, 0.3));
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .mobile-close-btn {
    display: flex;
  }
}


/* ========================================
   16. SCROLL PROGRESS BAR
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-teal), var(--accent-yellow));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}


/* ========================================
   17. PAGE-LOAD ENTRANCE
   ======================================== */
body {
  animation: pageEntrance 0.8s ease-out;
}

@keyframes pageEntrance {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================================
   18. ANIMATED GRADIENT HERO BG
   ======================================== */
.hero-gradient-bg {
  background: linear-gradient(135deg,
      rgba(255, 180, 140, 0.3) 0%,
      rgba(255, 240, 220, 0.5) 25%,
      rgba(220, 248, 244, 0.4) 50%,
      rgba(255, 204, 51, 0.2) 75%,
      rgba(255, 180, 140, 0.3) 100%);
  background-size: 400% 400%;
  animation: heroGradientShift 12s ease-in-out infinite;
}

@keyframes heroGradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  25% {
    background-position: 100% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  75% {
    background-position: 0% 100%;
  }
}


/* ========================================
   19. GLASSMORPHISM CARD HOVER / GLOW
   ======================================== */
.card {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 143, 128, 0.0) 0%,
      rgba(94, 205, 193, 0.0) 50%,
      rgba(255, 217, 102, 0.0) 100%);
  z-index: -1;
  transition: background 0.5s ease;
  pointer-events: none;
}

.card:hover::before {
  background: linear-gradient(135deg,
      rgba(255, 143, 128, 0.12) 0%,
      rgba(94, 205, 193, 0.08) 50%,
      rgba(255, 217, 102, 0.1) 100%);
}

.card:hover {
  box-shadow:
    0 14px 40px rgba(61, 50, 41, 0.12),
    0 0 40px rgba(255, 143, 128, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}


/* ========================================
   20. CTA BUTTON GLOW PULSE
   ======================================== */
.btn-primary {
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--accent-teal));
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  animation: ctaGlow 3s ease-in-out infinite;
}

@keyframes ctaGlow {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.95);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.02);
  }
}

.btn-warm::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: var(--accent-coral);
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  animation: ctaGlowWarm 3s ease-in-out infinite;
}

.btn-warm {
  position: relative;
}

@keyframes ctaGlowWarm {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.95);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.02);
  }
}


/* ========================================
   21. CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-coral), var(--accent-teal));
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e67a6d, #4db8ac);
}

html {
  scrollbar-color: var(--accent-coral) var(--bg-cream);
  scrollbar-width: thin;
}


/* ========================================
   22. SHIMMER SECTION DIVIDERS
   ======================================== */
.shimmer-divider {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 122, 104, 0.5) 20%,
      rgba(61, 191, 178, 0.6) 50%,
      rgba(255, 204, 51, 0.5) 80%,
      transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  margin: 0;
  border: none;
  border-radius: 2px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}


/* ========================================
   23. HERO ENTRANCE STAGGER ANIMATION
   ======================================== */
.hero-stagger>* {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerIn 0.7s ease-out forwards;
}

.hero-stagger>*:nth-child(1) {
  animation-delay: 0.15s;
}

.hero-stagger>*:nth-child(2) {
  animation-delay: 0.35s;
}

.hero-stagger>*:nth-child(3) {
  animation-delay: 0.55s;
}

.hero-stagger>*:nth-child(4) {
  animation-delay: 0.75s;
}

.hero-stagger>*:nth-child(5) {
  animation-delay: 0.95s;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================================
   24. TYPING CURSOR
   ======================================== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-coral);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


/* ========================================
   25. GRADIENT TEXT (Animated)
   ======================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-yellow), var(--accent-teal), var(--accent-coral));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
  font-weight: 700;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}


/* ========================================
   26. TESTIMONIAL CAROUSEL
   ======================================== */
.testimonial-carousel {
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonial-slide {
  min-width: 100%;
  padding: 0 var(--sp-sm);
  box-sizing: border-box;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--sp-lg);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E8DDD3;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--accent-coral);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 143, 128, 0.4);
}


/* ========================================
   27. PARTICLE CANVAS
   ======================================== */
#sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}


/* ========================================
   28. ANIMATED COUNTER
   ======================================== */
.counter-animated {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}


/* ========================================
   29. AUDIO PAGE: SOUND WAVE BARS
   ======================================== */
.sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
}

.sound-wave .bar {
  width: 4px;
  border-radius: 2px;
  animation: waveBar 1.2s ease-in-out infinite;
}

.sound-wave .bar:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
  background: var(--accent-teal);
}

.sound-wave .bar:nth-child(2) {
  height: 80%;
  animation-delay: 0.15s;
  background: var(--primary);
}

.sound-wave .bar:nth-child(3) {
  height: 55%;
  animation-delay: 0.3s;
  background: var(--accent-coral);
}

.sound-wave .bar:nth-child(4) {
  height: 90%;
  animation-delay: 0.45s;
  background: var(--accent-yellow);
}

.sound-wave .bar:nth-child(5) {
  height: 35%;
  animation-delay: 0.6s;
  background: var(--accent-teal);
}

@keyframes waveBar {

  0%,
  100% {
    transform: scaleY(0.4);
  }

  50% {
    transform: scaleY(1);
  }
}


/* ========================================
   30. LIBRARY: COMING SOON RIBBON
   ======================================== */
.ribbon-wrap {
  position: relative;
  overflow: hidden;
}

.ribbon {
  position: absolute;
  top: 18px;
  right: -35px;
  background: var(--primary);
  color: white;
  padding: 4px 40px;
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(45deg);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}


/* ========================================
   31. ENHANCED REVEAL STAGGER
   ======================================== */
.reveal .card:nth-child(4) {
  transition-delay: 0.35s;
}

.reveal .card:nth-child(5) {
  transition-delay: 0.45s;
}

.reveal .card:nth-child(6) {
  transition-delay: 0.55s;
}


/* ========================================
   32. PLAY BUTTON PULSE (Audio Page)
   ======================================== */
.play-btn-pulse {
  position: relative;
}

.play-btn-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: playPulse 2s ease-out infinite;
}

@keyframes playPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}


/* ========================================
   33. VALUE CARD ICON BOUNCE
   ======================================== */
.value-bounce:hover .value-icon {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-12px);
  }

  60% {
    transform: translateY(-4px);
  }
}

.value-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}


/* ========================================
   34. HERO IMAGE 3D TILT CONTAINER
   ======================================== */
.tilt-container {
  perspective: 800px;
  transform-style: preserve-3d;
}

.tilt-container .hero-float {
  transition: transform 0.15s ease-out;
}


/* ========================================
   35. PREFERS-REDUCED-MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-stagger>* {
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #sparkle-canvas {
    display: none;
  }
}


/* ========================================
   36. ENHANCED MOBILE FOR NEW FEATURES
   ======================================== */
@media (max-width: 768px) {
  .testimonial-slide .grid-3 {
    grid-template-columns: 1fr;
  }

  .carousel-dots {
    display: flex;
  }

  #sparkle-canvas {
    opacity: 0.3;
  }

  .tilt-container {
    perspective: none;
  }
}


/* ========================================
   16. AUDIO HAVEN — Tabs & Episode Cards
   ======================================== */
.audio-tabs {
  margin-top: var(--sp-md);
}

.audio-tab {
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-pill);
  border: 2px solid #E8DDD3;
  background: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--grounding);
}

.audio-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.audio-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-btn);
}

.episode-card {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.episode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(61, 50, 41, 0.12);
  border-color: var(--primary);
}

.episode-card.playing {
  border: 2.5px solid var(--accent-coral);
  box-shadow: 0 0 0 4px rgba(255, 130, 67, 0.15), 0 8px 24px rgba(255, 130, 67, 0.12);
  background: linear-gradient(135deg, rgba(255, 130, 67, 0.04), rgba(255, 173, 96, 0.06));
}

.episode-card.playing .episode-play {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 130, 67, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(255, 130, 67, 0);
  }
}


/* ========================================
   PREMIUM STICKY AUDIO PLAYER
   ======================================== */
#sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, rgba(74, 56, 40, 0.97), rgba(58, 43, 28, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 900;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100%);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
}

.player-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
}

.player-progress-track:hover {
  height: 6px;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF8243, #FFB347, #5ECDC1);
  border-radius: 0 2px 2px 0;
  transition: width 0.3s linear;
  position: relative;
}

.player-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 130, 67, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
}

.player-progress-track:hover .player-progress-fill::after {
  opacity: 1;
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.player-album-art {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-teal));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 130, 67, 0.3);
}

.player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.player-title-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-host-text {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.player-time-text {
  font-size: 0.72rem;
  color: rgba(255, 179, 71, 0.8);
  font-family: var(--font-heading);
  font-weight: 600;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn-skip {
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.player-btn-skip:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.player-btn-main {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #FF8243, #FFB347);
  color: white;
  border-radius: 50%;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(255, 130, 67, 0.4);
}

.player-btn-main:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(255, 130, 67, 0.5);
}

.player-btn-main:active {
  transform: scale(0.95);
}


/* ========================================
   17. STORIES PAGE
   ======================================== */
.story-selector {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-selector:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 0 16px 44px rgba(61, 50, 41, 0.16);
}

.story-text {
  font-size: 1.15rem;
  line-height: 1.9;
}

.story-paragraph {
  margin-bottom: var(--sp-md);
  color: var(--grounding);
}

.story-illustration {
  font-size: 2.5rem;
  text-align: center;
  padding: var(--sp-sm) 0;
  letter-spacing: 8px;
  opacity: 0.85;
}

.story-close {
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
}


/* ========================================
   18. WIZARD (Media Plan Builder)
   ======================================== */
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 70px;
}

.wizard-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E8DDD3;
  color: #8C7E73;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-num {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.wizard-step.done .wizard-step-num {
  background: var(--accent-teal);
  color: white;
}

.wizard-step-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  color: #8C7E73;
}

.wizard-step.active .wizard-step-label {
  color: var(--primary);
}

.wizard-step-line {
  width: 40px;
  height: 2px;
  background: #E8DDD3;
  align-self: center;
  margin-bottom: 20px;
}

.zone-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border: 2px solid #E8DDD3;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zone-option:hover {
  border-color: var(--primary);
}

.zone-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* Generated Plan */
.plan-day {
  padding: 8px 0;
  border-bottom: 1px solid rgba(94, 205, 193, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-day:last-child {
  border-bottom: none;
}

.plan-day-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
}

.plan-day-limit {
  font-size: 0.85rem;
  color: var(--accent-teal);
  font-weight: 600;
}


/* ========================================
   19. DIGITAL WELLNESS QUIZ
   ======================================== */
.quiz-question {
  animation: fadeSlideUp 0.4s ease;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: #E8DDD3;
  border-radius: 3px;
  margin-bottom: var(--sp-sm);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-teal));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--sp-sm);
}

.quiz-opt {
  padding: 12px 16px;
  border: 2px solid #E8DDD3;
  border-radius: var(--r-sm);
  background: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.quiz-opt:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(4px);
}

.quiz-opt.selected {
  border-color: var(--accent-teal);
  background: rgba(94, 205, 193, 0.1);
}

.quiz-tip-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}

.quiz-tip-item:last-child {
  border-bottom: none;
}

/* Score ring colors */
.score-great {
  border-color: var(--accent-teal) !important;
  color: var(--accent-teal);
}

.score-good {
  border-color: var(--accent-yellow) !important;
  color: #B8860B;
}

.score-improve {
  border-color: var(--accent-coral) !important;
  color: var(--accent-coral);
}


/* ========================================
   20. RESPONSIVE — New Components
   ======================================== */
@media (max-width: 768px) {
  .audio-tabs {
    justify-content: flex-start !important;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .audio-tab {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }

  .wizard-steps {
    gap: 4px !important;
  }

  .wizard-step-line {
    width: 20px;
  }

  .wizard-step {
    min-width: 55px;
  }

  .wizard-step-label {
    font-size: 0.65rem;
  }

  .story-text {
    font-size: 1.05rem;
  }

  .story-illustration {
    font-size: 2rem;
  }

  .zone-option {
    font-size: 0.82rem;
    padding: 8px 10px;
  }

  /* ------ TOOL CARD MOBILE FIXES ------ */
  .tool-card {
    padding: var(--sp-md);
    margin-bottom: var(--sp-lg);
  }

  .tool-card h2 {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  /* Screen Time Calculator — prevent word-per-line wrapping */
  .tool-card .form-group label {
    font-size: 1rem;
    line-height: 1.5;
  }

  .tool-card h3 {
    font-size: 2rem !important;
    word-break: break-word;
  }

  /* Constrain calculator inner box on mobile */
  .tool-card>div[style*="max-width: 550px"] {
    padding: var(--sp-md) !important;
  }

  /* ------ STICKY AUDIO PLAYER MOBILE ------ */
  .player-inner {
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
  }

  .player-info {
    width: 100%;
  }

  .player-controls {
    justify-content: center;
    width: 100%;
  }

  .player-btn-main {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .player-btn-skip {
    width: 40px;
    height: 40px;
  }

  /* ------ EPISODE CARDS MOBILE ------ */
  .episode-card {
    padding: var(--sp-md);
  }

  .episode-card h4 {
    font-size: 0.92rem;
  }

  .episode-card .play-btn-pulse {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
  }

  /* ------ GENERAL MOBILE TOUCH TARGETS ------ */
  .btn {
    min-height: 44px;
    padding: 0.65rem 1.4rem;
  }

  input[type="range"] {
    height: 32px;
  }

  /* ------ FOOTER MOBILE ------ */
  .footer-main h3 {
    font-size: 1.25rem;
  }

  .footer-main a,
  .footer-main p {
    font-size: 0.95rem;
  }

  .footer-bottom {
    font-size: 0.88rem;
  }

  .footer-main::before {
    width: 250px;
  }
}


/* ========================================
   EXTRA MOBILE FIXES — SEO Audit 2026
   ======================================== */

/* Prevent horizontal overflow from blobs */
.section {
  overflow: hidden;
  position: relative;
}

/* Hero image responsive — remove fixed height */
@media (max-width: 768px) {
  .hero-gradient-bg .grid-2 {
    gap: var(--sp-md);
  }

  .hero-gradient-bg img {
    height: auto !important;
    max-height: 280px !important;
  }

  /* Community trust section wraps on mobile */
  .flex.justify-center {
    flex-wrap: wrap;
    gap: var(--sp-sm) !important;
    font-size: 0.95rem !important;
  }

  /* Footer newsletter form */
  .footer-main form {
    flex-direction: column;
    gap: 8px;
  }

  .footer-main form input[type="email"] {
    width: 100%;
    min-width: 0;
  }

  .footer-main form .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Extra-small screens */
@media (max-width: 360px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  .navbar .logo {
    font-size: 1.2rem;
  }
}

/* ========================================
   MODAL STYLES (Library & Tools)
   ======================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--sp-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}


/* ========================================
   MOBILE NAVIGATION STYLES (Fix for Desktop View)
   ======================================== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--grounding);
  padding: 0.5rem;
}

.mobile-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--grounding);
  position: absolute;
  top: 1rem;
  right: 1rem;
}

@media (max-width: 768px) {
  .navbar-wrapper {
    width: 95%;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
  }

  /* Show Hamburger */
  .mobile-menu-btn {
    display: block;
  }

  /* Hide Desktop Nav Links by Default */
  /* Hide Desktop Nav Links by Default */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    /* Position at right edge */
    transform: translateX(100%);
    /* Move off-screen */
    visibility: hidden;
    /* Hide from layout/clicks */
    width: 80%;
    /* Drawer width */
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    z-index: 2000;
    padding: 5rem 2rem 2rem 2rem;
    gap: 1.5rem;
    overflow-y: auto;
  }

  /* Show Drawer when Active */
  .nav-links.active {
    transform: translateX(0);
    visibility: visible;
  }

  /* Show Close Button inside Drawer */
  .mobile-close-btn {
    display: block;
  }

  /* Adjust Link Font Size for Mobile */
  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-cta {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }

  /* Fix Hero Size */

}


/* ========================================
   PRINT STYLES (For Library Guides)
   ======================================== */
@media print {

  /* Hide everything globally first */
  body * {
    visibility: hidden;
  }

  /* Hide background blobs and canvas */
  body::before,
  body::after,
  #sparkle-canvas,
  .navbar-wrapper,
  .footer,
  .section {
    display: none !important;
  }

  /* Only show the modal and its content */
  #lib-modal,
  #lib-modal * {
    visibility: visible;
  }

  #lib-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: white !important;
    display: block !important;
    z-index: 9999;
    overflow: visible !important;
    height: auto !important;
  }

  /* Force Full Content Visibility */
  .modal-content {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 40px !important;
    /* Margins for paper */
    transform: none !important;
    position: static !important;
  }

  #lib-modal-body {
    height: auto !important;
    overflow: visible !important;
  }

  /* Hide Buttons in Print */
  #lib-modal-close,
  .modal-content button,
  .modal-footer {
    display: none !important;
  }

  /* Typography for Print */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    overflow: visible !important;
    /* Allow printing scroll */
  }

  h3 {
    font-size: 18pt !important;
    margin-bottom: 1em !important;
  }

  p,
  li {
    font-size: 12pt !important;
    line-height: 1.5 !important;
    color: #000 !important;
    page-break-inside: avoid;
  }

  ul,
  ol {
    page-break-inside: auto;
  }

  /* Add Branding to Footer of PDF */
  .modal-content::after {
    content: "© 2026 HAVENSE — Clean Screen Time for Families | havense.com";
    display: block;
    margin-top: 50px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    font-size: 10pt;
    color: #666;
    text-align: center;
    page-break-before: avoid;
  }
}

/* ========================================
   MOBILE NAV BACKDROP
   ======================================== */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1900;
  /* Below .nav-links (2000) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.active {
  opacity: 1;
  pointer-events: all;
}


/* ========================================
   13. MAILCHIMP NEWSLETTER STYLES
   ======================================== */
/* Reset Mailchimp Container */
#mc_embed_signup,
#mc_embed_signup_blog {
  background: transparent;
  clear: left;
  font: inherit;
  width: 100%;
}

.newsletter-form .mc-field-group,
.newsletter-form-centered .mc-field-group {
  margin-bottom: 0.8rem;
  /* More spacing between stacked fields */
  width: 100%;
}

/* --- Footer Form (Dark/Transparent) --- */
.newsletter-form .mc-field-group input[type="email"],
.newsletter-form .mc-field-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  /* Slightly taller for ease of tapping */
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  /* Slightly transparent */
  color: #FFF8F0;
  /* Warm white text */
  font-family: var(--font-body);
  font-size: 0.95rem;
  /* Larger font */
  transition: all 0.2s ease;
  min-height: 48px;
  /* Taller touch target */
}

.newsletter-form .mc-field-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .mc-field-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Ensure Button Alignment in Footer */
.newsletter-form .optionalParent {
  margin-top: 0.5rem;
  width: 100%;
}

.newsletter-form .button {
  width: 100%;
  /* Full width button */
  margin: 0 !important;
  height: 48px;
  /* Match input height */
  line-height: 1;
  padding: 0 1rem;
  font-size: 1rem;
}


/* --- Blog/Centered Form (Light/Clean) --- */
.newsletter-form-centered {
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form-centered .mc-field-group input[type="email"],
.newsletter-form-centered .mc-field-group input[type="text"] {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--r-pill);
  border: 2px solid rgba(0, 0, 0, 0.08);
  /* Subtle border */
  background: white;
  color: var(--grounding);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.newsletter-form-centered .mc-field-group input::placeholder {
  color: #9CA3AF;
}

.newsletter-form-centered .mc-field-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

/* Override Mailchimp Response Messages */
#mce-responses .response {
  margin: 0.5rem 0;
  padding: 0.5rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

#mce-error-response {
  color: #DC2626;
  /* Red for errors */
  background: rgba(220, 38, 38, 0.1);
  display: none;
}

#mce-success-response {
  color: #059669;
  /* Green for success */
  background: rgba(5, 150, 105, 0.1);
  display: none;
}

/* ========================================
   PRINT STYLES — for library pages
   ======================================== */

/* Page margins */
@page {
  margin: 15mm 10mm;
}

@media print {

  /* Force backgrounds and colors to print — CRITICAL */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide non-essential UI */
  .navbar-wrapper,
  .mobile-menu-btn,
  .scroll-progress,
  .blob,
  footer,
  .btn,
  button {
    display: none !important;
  }

  /* Reset body */
  body {
    font-size: 11pt;
    font-family: 'Nunito', Georgia, serif;
    margin: 0;
    padding: 0;
  }

  /* Hero section — show cleanly without large padding */
  .hero-gradient-bg {
    padding-top: 10mm !important;
    padding-bottom: 5mm !important;
    text-align: center;
  }

  /* Ensure content container uses full width */
  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 5mm !important;
    margin: 0 !important;
  }

  /* Section spacing */
  .section {
    padding: 5mm 0 !important;
  }

  /* Suppress link URL from printing as annotation */
  a[href]::after {
    content: none !important;
  }

  /* Prevent headings from being orphaned at page bottom */
  h1,
  h2,
  h3,
  h4 {
    page-break-after: avoid;
  }

  /* Prevent card content from being split across pages */
  .card,
  li,
  p,
  div[style*="background"] {
    page-break-inside: avoid;
  }

  /* CRITICAL: Force all scroll-reveal elements visible during print.
     .reveal elements start at opacity:0 and only animate in when scrolled
     into view via IntersectionObserver. During print, no scrolling occurs
     so they remain invisible — causing blank pages. */
  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
    animation: none !important;
  }
}