/* ============================================
   Stompy and the Splats - Storybook Playground
   A pop-up book meets cartoon jungle aesthetic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Character Colors - saturated and bold */
  --stompy: #1FCCB8;
  --stompy-dark: #0FA897;
  --stompy-glow: rgba(31,204,184,0.25);
  --bloop: #8B5CF6;
  --bloop-dark: #6D3FD4;
  --bloop-glow: rgba(139,92,246,0.25);
  --drip: #38BDF8;
  --drip-dark: #0EA5E9;
  --drip-glow: rgba(56,189,248,0.25);
  --fizz: #F43F8A;
  --fizz-dark: #DB2777;
  --fizz-glow: rgba(244,63,138,0.25);
  --splat: #FB923C;
  --splat-dark: #EA7E20;
  --splat-glow: rgba(251,146,60,0.25);

  /* Brand Colors */
  --navy: #0F2942;
  --navy-mid: #1B3A5C;
  --cream: #FFFDF7;
  --white: #FFFFFF;
  --yellow: #FBBF24;
  --yellow-bright: #FDE047;
  --green-soft: #86EFAC;
  --pink-soft: #FDA4AF;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15,41,66,0.06);
  --shadow-md: 0 8px 30px rgba(15,41,66,0.1);
  --shadow-lg: 0 20px 60px rgba(15,41,66,0.15);
  --shadow-glow: 0 0 40px rgba(31,204,184,0.2);

  /* Curves */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 48px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--navy);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

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

/* --- Noise texture overlay for depth --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* =====================
   NAVIGATION
   ===================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 253, 247, 0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  padding: 0.6rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, background 0.3s ease;
  border-bottom: 3px solid transparent;
}

.nav-scrolled {
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 4px 30px rgba(15,41,66,0.08);
  border-bottom-color: var(--yellow);
}

.nav-hidden {
  transform: translateY(-110%);
}

.nav-logo img {
  height: 52px;
  width: auto;
  transition: transform 0.3s ease;
}

.nav-logo:hover img {
  transform: scale(1.05) rotate(-2deg);
}

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

.nav-links a {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
  display: inline-block;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--stompy);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a:hover {
  color: var(--stompy);
  transform: translateY(-2px);
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-youtube-btn {
  background: linear-gradient(135deg, #FF0000, #CC0000);
  color: white !important;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700 !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
}

.nav-youtube-btn:hover {
  transform: scale(1.08) translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.35);
  color: white !important;
}

.nav-youtube-btn::after {
  display: none !important;
}

.nav-youtube-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: var(--navy);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* =====================
   HERO SECTION
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 6rem;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(31,204,184,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(244,63,138,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(251,146,60,0.08) 0%, transparent 50%),
    linear-gradient(170deg, #FFFDF7 0%, #F0FDFA 25%, #FDF2F8 50%, #FFF7ED 75%, #FFFDF7 100%);
  overflow: hidden;
}

/* Large organic background blobs */
.hero-bg-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: blobPulse 8s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--stompy);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: var(--fizz);
  top: 10%;
  right: -5%;
  animation-delay: 2s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: var(--splat);
  bottom: -5%;
  left: 20%;
  animation-delay: 4s;
}

.blob-4 {
  width: 250px;
  height: 250px;
  background: var(--bloop);
  bottom: 20%;
  right: 10%;
  animation-delay: 1s;
}

.blob-5 {
  width: 200px;
  height: 200px;
  background: var(--drip);
  top: 40%;
  left: 50%;
  animation-delay: 3s;
}

@keyframes blobPulse {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.35; }
  50% { transform: scale(1.15) translateY(-10px); opacity: 0.45; }
}

/* Confetti field */
.confetti-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.2;
  animation: confettiFall linear infinite;
}

.c-star { color: var(--yellow); top: -5%; left: 8%; font-size: 1.5rem; animation-duration: 12s; animation-delay: 0s; }
.c-heart { color: var(--fizz); top: -5%; left: 25%; font-size: 1rem; animation-duration: 15s; animation-delay: 2s; }
.c-diamond { color: var(--stompy); top: -5%; left: 42%; font-size: 1.3rem; animation-duration: 11s; animation-delay: 4s; }
.c-circle { color: var(--splat); top: -5%; left: 60%; font-size: 0.8rem; animation-duration: 14s; animation-delay: 1s; }
.c-star2 { color: var(--bloop); top: -5%; left: 75%; font-size: 1.4rem; animation-duration: 13s; animation-delay: 3s; }
.c-heart2 { color: var(--drip); top: -5%; left: 90%; font-size: 1.1rem; animation-duration: 16s; animation-delay: 5s; }
.c-diamond2 { color: var(--yellow-bright); top: -5%; left: 15%; font-size: 0.9rem; animation-duration: 10s; animation-delay: 7s; }
.c-circle2 { color: var(--fizz); top: -5%; left: 55%; font-size: 1.6rem; animation-duration: 17s; animation-delay: 6s; }

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.25;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-logo {
  max-width: 580px;
  width: 90%;
  margin-bottom: 1.5rem;
  animation: heroLogoIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 30px rgba(31, 204, 184, 0.25));
}

@keyframes heroLogoIn {
  0% { transform: scale(0.2) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); }
  80% { transform: scale(0.97) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.hero-tagline {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.tagline-highlight {
  color: var(--stompy);
  position: relative;
  display: inline-block;
}

.tagline-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -4px;
  right: -4px;
  height: 10px;
  background: var(--yellow);
  opacity: 0.35;
  border-radius: 4px;
  z-index: -1;
  transform: rotate(-1deg);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  border-radius: 50px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-youtube {
  background: linear-gradient(135deg, #FF2020, #CC0000);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-youtube:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 35px rgba(255, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-youtube svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.btn-meet {
  background: linear-gradient(135deg, var(--stompy), var(--stompy-dark));
  color: white;
  box-shadow: 0 6px 20px rgba(31,204,184,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-meet:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 35px rgba(31,204,184,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Hero character row */
.hero-characters {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
  position: relative;
  z-index: 2;
}

.hero-char-link {
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-char {
  width: 150px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
  transition: filter 0.3s ease;
}

.hero-char-link:hover {
  transform: translateY(-18px) scale(1.12) rotate(-3deg);
  z-index: 3;
}

.hero-char-link:hover .hero-char {
  filter: drop-shadow(0 16px 30px rgba(0,0,0,0.2));
}

/* Staggered idle bounce */
.hero-char-link:nth-child(1) .hero-char { animation: charBounce 3.2s ease-in-out 1.2s infinite; }
.hero-char-link:nth-child(2) .hero-char { animation: charBounce 3.5s ease-in-out 1.6s infinite; }
.hero-char-link:nth-child(3) .hero-char { animation: charBounce 2.8s ease-in-out 1.0s infinite; }
.hero-char-link:nth-child(4) .hero-char { animation: charBounce 3.0s ease-in-out 1.9s infinite; }
.hero-char-link:nth-child(5) .hero-char { animation: charBounce 3.4s ease-in-out 1.4s infinite; }

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

/* Hero wave divider */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* =====================
   SECTION SHARED STYLES
   ===================== */
section {
  padding: 5rem 2rem;
  position: relative;
}

.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: #5a6b7e;
  margin-bottom: 3.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* =====================
   CHARACTERS SECTION
   ===================== */
.characters {
  background: var(--white);
  padding-top: 5rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid background */
.characters::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(15,41,66,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.characters-inner {
  position: relative;
  z-index: 1;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Character cards */
.character-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem 2rem;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(15,41,66,0.04);
}

/* Character-color top bar */
.character-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--card-color, var(--stompy));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Background decorative circle */
.card-bg-shape {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--card-color-light, rgba(31,204,184,0.1));
  top: -40px;
  right: -40px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0.5;
}

.character-card:hover .card-bg-shape {
  transform: scale(1.5);
  opacity: 0.8;
}

.character-card:hover {
  box-shadow: 0 20px 60px var(--card-color-light, rgba(31,204,184,0.2));
  border-color: var(--card-color, var(--stompy));
}

/* Card-specific colors */
.card-stompy { --card-color: var(--stompy); --card-color-light: var(--stompy-glow); }
.card-bloop { --card-color: var(--bloop); --card-color-light: var(--bloop-glow); }
.card-drip { --card-color: var(--drip); --card-color-light: var(--drip-glow); }
.card-fizz { --card-color: var(--fizz); --card-color-light: var(--fizz-glow); }
.card-splat { --card-color: var(--splat); --card-color-light: var(--splat-glow); }

.character-img-wrapper {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.character-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.1));
}

.character-card:hover .character-img-wrapper img {
  transform: scale(1.12) rotate(-3deg);
}

.character-name-img {
  height: 42px;
  margin-bottom: 0.75rem;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.character-role {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.role-stompy { color: var(--stompy-dark); }
.role-bloop { color: var(--bloop-dark); }
.role-drip { color: var(--drip-dark); }
.role-fizz { color: var(--fizz-dark); }
.role-splat { color: var(--splat-dark); }

.character-desc {
  font-size: 0.98rem;
  color: #5a6b7e;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Wave between characters and treehouse */
.section-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.section-wave svg {
  width: 100%;
  height: 70px;
  display: block;
}

.wave-to-treehouse svg path {
  fill: #1a2f1a;
}

/* =====================
   TREEHOUSE SECTION
   ===================== */
.treehouse {
  position: relative;
  min-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 6rem 2rem;
}

.treehouse-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.treehouse-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,41,66,0.75) 0%,
    rgba(15,41,66,0.6) 40%,
    rgba(15,41,66,0.7) 100%
  );
  z-index: 1;
}

.treehouse-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 3.5rem 3rem;
  background: rgba(255,253,247,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.15);
}

.treehouse-title {
  color: var(--white) !important;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.treehouse-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.treehouse-features {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.treehouse-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.treehouse-feature.animate-on-scroll {
  transition-delay: calc(var(--feat-index, 0) * 0.12s);
}

.feature-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.feature-bubble:hover {
  transform: scale(1.15) rotate(-5deg);
  background: rgba(255,255,255,0.25);
}

.feature-icon {
  font-size: 2rem;
}

.feature-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}

/* =====================
   YOUTUBE CTA SECTION
   ===================== */
.youtube-cta {
  background: linear-gradient(135deg, #FF1A1A 0%, #CC0000 50%, #990000 100%);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
}

.cta-wave-top {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  z-index: 2;
  line-height: 0;
}

.cta-wave-top svg {
  width: 100%;
  height: 60px;
  display: block;
}

.cta-wave-top svg path {
  fill: transparent;
}

/* Floating play button decorations */
.play-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.play-bubble {
  position: absolute;
  color: rgba(255,255,255,0.08);
  font-size: 3rem;
  animation: floatBubble 8s ease-in-out infinite;
}

.pb-1 { top: 15%; left: 5%; font-size: 2.5rem; animation-delay: 0s; }
.pb-2 { top: 60%; right: 8%; font-size: 4rem; animation-delay: 2s; }
.pb-3 { bottom: 20%; left: 15%; font-size: 3rem; animation-delay: 4s; }
.pb-4 { top: 30%; right: 20%; font-size: 2rem; animation-delay: 1s; }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.youtube-cta-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta-title {
  color: white !important;
  text-shadow: 0 2px 15px rgba(0,0,0,0.2);
  margin-bottom: 1rem;
}

.youtube-cta-desc {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.8;
}

.btn-subscribe {
  background: white;
  color: #FF0000;
  font-size: 1.3rem;
  padding: 1.2rem 2.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,1);
}

.btn-subscribe:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 50px rgba(0,0,0,0.3);
}

.btn-subscribe svg {
  width: 28px;
  height: 28px;
  fill: #FF0000;
}

.youtube-cta-characters {
  margin-top: 3.5rem;
}

.youtube-cta-characters img {
  max-width: 520px;
  width: 90%;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 60px rgba(0,0,0,0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.youtube-cta-characters img:hover {
  transform: scale(1.03) rotate(-1deg);
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--navy);
  color: white;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--stompy), var(--bloop), var(--fizz), var(--splat), var(--drip));
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--yellow);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
}

/* =====================
   SCROLL ANIMATIONS
   ===================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.character-card.animate-on-scroll {
  transition-delay: calc(var(--card-index, 0) * 0.12s);
}

/* Title letter bounce (when visible) */
.title-bounce {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-on-scroll.visible .title-bounce {
  animation: letterPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes letterPop {
  0% { transform: translateY(20px) scale(0.5); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
  .nav {
    padding: 0.5rem 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 253, 247, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--yellow);
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.5rem 5rem;
  }

  .hero-logo {
    max-width: 320px;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .hero-characters {
    gap: 0;
    margin-top: 2rem;
  }

  .hero-char {
    width: 68px;
  }

  .hero-wave svg {
    height: 40px;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .characters-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .treehouse-features {
    gap: 1.5rem;
  }

  .treehouse-content {
    padding: 2rem 1.5rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.9rem 1.6rem;
  }

  section {
    padding: 3.5rem 1.5rem;
  }

  .section-wave svg {
    height: 40px;
  }

  .bg-blob {
    filter: blur(60px);
    opacity: 0.25;
  }

  .blob-1 { width: 200px; height: 200px; }
  .blob-2 { width: 150px; height: 150px; }
  .blob-3 { width: 180px; height: 180px; }
  .blob-4 { width: 120px; height: 120px; }
  .blob-5 { width: 100px; height: 100px; }

  .confetti { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-char {
    width: 115px;
  }
}

@media (min-width: 900px) {
  .characters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .characters-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }

  .characters-grid .character-card {
    min-width: 0;
    padding: 1.8rem 1.2rem 1.6rem;
  }

  .character-img-wrapper {
    width: 160px;
    height: 160px;
  }

  .character-name-img {
    height: 36px;
  }

  .character-desc {
    font-size: 0.92rem;
  }
}

/* Extra large screens */
@media (min-width: 1400px) {
  .hero-logo {
    max-width: 650px;
  }

  .hero-char {
    width: 170px;
  }

  .section-title {
    font-size: 3.5rem;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .confetti,
  .bg-blob,
  .play-bubble {
    animation: none !important;
  }
}
