/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #fefaf6;
  --surface:   #ffffff;
  --border:    rgba(0,0,0,0.06);
  --text:      #2d2d3a;
  --text-dim:  #6e6e82;
  --accent:    #6c5ce7;
  --accent-2:  #00cec9;
  --orange:    #fdcb6e;
  --pink:      #fd79a8;
  --mint:      #55efc4;
  --sky:       #74b9ff;
  --gradient:  linear-gradient(135deg, #6c5ce7, #fd79a8, #fdcb6e);
  --gradient-2: linear-gradient(135deg, #00cec9, #55efc4);
  --radius:    20px;
  --max-w:     1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 1.25rem 2rem;
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(254,250,246,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-family: 'Baloo 2', cursive;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  transition: transform .25s;
}
.logo:hover {
  transform: scale(1.05);
}
.nav-cta {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  transition: all .25s;
}
.nav-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
  background: #b8d8c8;
}

/* Classroom SVG scene */
.classroom-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.classroom-scene svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content overlay — see-through panel */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: 3rem 3rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06), 0 0 0 1px rgba(255,255,255,0.3);
}
.hero-tag {
  display: inline-block;
  font-family: 'Baloo 2', cursive;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, #2d6b4f, #00cec9);
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(45,107,79,0.3);
}
.hero-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.hero-sub strong {
  font-weight: 800;
  color: var(--accent);
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  background-size: 200% 200%;
  padding: 0.9rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
  box-shadow: 0 4px 15px rgba(108,92,231,0.25);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 35px rgba(108,92,231,0.4);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* (grid bg removed — replaced by classroom SVG scene) */

/* ===== MASCOT LOGOS ===== */
.logo-mascots {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  vertical-align: middle;
}
.logo-dash-char {
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 1px;
  align-self: center;
}
.mascot-a {
  animation: mascotBounce 2s ease-in-out infinite;
}
.mascot-z {
  animation: mascotBounce 2s ease-in-out 0.3s infinite;
}
.logo:hover .mascot-a {
  animation: mascotJump 0.5s cubic-bezier(.34,1.56,.64,1);
}
.logo:hover .mascot-z {
  animation: mascotJump 0.5s cubic-bezier(.34,1.56,.64,1) 0.1s;
}

/* Hero mascot pair */
.hero-mascots {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.hero-mascot-dash {
  font-family: 'Baloo 2', cursive;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  align-self: center;
  animation: mascotBounce 2s ease-in-out 0.15s infinite;
}
.mascot-hero {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.mascot-hero.mascot-a {
  animation: mascotWalk 1.2s ease-in-out infinite;
}
.mascot-hero.mascot-z {
  animation: mascotWalk 1.2s ease-in-out 0.6s infinite;
}

@keyframes mascotBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes mascotJump {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-10px) scale(1.15) rotate(-5deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes mascotWalk {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-6px) rotate(-3deg); }
  75%      { transform: translateY(-6px) rotate(3deg); }
}

/* ===== SECTIONS SHARED ===== */
.section-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  color: var(--text);
}
.section-sub {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== PILLARS ===== */
.pillars {
  padding: 6rem 2rem;
  text-align: center;
}
.pillars-inner { max-width: var(--max-w); margin: 0 auto; }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}
.pillar-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: left;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity .3s;
}
.pillar-card:nth-child(1)::before { background: var(--accent); }
.pillar-card:nth-child(2)::before { background: var(--pink); }
.pillar-card:nth-child(3)::before { background: var(--orange); }
.pillar-card:nth-child(4)::before { background: var(--mint); }
.pillar-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: transparent;
}
.pillar-card:hover::before { opacity: 1; }
.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: wiggle 2s ease-in-out infinite;
  animation-play-state: paused;
}
.pillar-card:hover .pillar-icon {
  animation-play-state: running;
}
.pillar-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.pillar-card p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ===== VISION ===== */
.vision {
  padding: 6rem 2rem;
  text-align: center;
  border-top: 2px dashed rgba(45,107,79,0.2);
  position: relative;
}
.vision-inner { max-width: var(--max-w); margin: 0 auto; }
.vision .section-sub { max-width: 640px; }

/* ===== NOTIFY ===== */
.notify {
  padding: 6rem 2rem;
  text-align: center;
  border-top: 2px dashed rgba(45,107,79,0.2);
  background: linear-gradient(180deg, var(--bg) 0%, #d4efe2 100%);
}
.notify-inner { max-width: 540px; margin: 0 auto; }
.notify-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.notify-input {
  flex: 1;
  min-width: 220px;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.notify-input::placeholder { color: var(--text-dim); font-weight: 500; }
.notify-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}
.notify-success {
  display: none;
  margin-top: 1.5rem;
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  color: var(--accent);
  animation: bounce-in .5s cubic-bezier(.34,1.56,.64,1);
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem;
  background: #c8e6d6;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo-footer { font-size: 1.5rem; }
.footer-copy {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* ===== LETTER ANIMATIONS ===== */
.wave-text .word {
  display: inline-block;
  white-space: nowrap;
}
.wave-text .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotate(8deg) scale(0.5);
  transition: none;
}
.wave-text.in-view .letter {
  animation: letterPop 0.5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.wave-text .letter.space {
  opacity: 1;
  transform: none;
  animation: none;
}

/* Each letter gets a continuous subtle wave after popping in */
.wave-text.in-view .letter {
  animation: letterPop 0.5s cubic-bezier(.34,1.56,.64,1) forwards,
             letterWave 3s ease-in-out 0.8s infinite;
}

/* Rainbow letters cycle through colors */
.rainbow-letter {
  --hue: calc(var(--i) * 25);
}
.wave-text.in-view .rainbow-letter {
  animation: letterPop 0.5s cubic-bezier(.34,1.56,.64,1) forwards,
             letterWave 3s ease-in-out 0.8s infinite,
             rainbowShift 4s ease-in-out infinite;
  color: hsl(calc(var(--hue) + 260), 70%, 60%);
}

/* Hover: individual letters react */
.wave-text .letter:hover {
  animation: letterJump 0.4s cubic-bezier(.34,1.56,.64,1) !important;
  color: var(--accent) !important;
  cursor: default;
}
.wave-text.rainbow .letter:hover {
  color: var(--pink) !important;
}

@keyframes letterPop {
  0%   { opacity: 0; transform: translateY(30px) rotate(8deg) scale(0.5); }
  60%  { opacity: 1; transform: translateY(-8px) rotate(-3deg) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

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

@keyframes letterJump {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-14px) scale(1.2) rotate(-5deg); }
  70%  { transform: translateY(-4px) scale(1.05) rotate(2deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes rainbowShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50%      { filter: hue-rotate(40deg); }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-20px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-8deg); }
  75%      { transform: rotate(8deg); }
}
@keyframes bounce-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-tag          { animation: fadeUp .6s cubic-bezier(.34,1.56,.64,1) both .1s; }
.hero-title        { animation: fadeUp .6s cubic-bezier(.34,1.56,.64,1) both .25s; }
.hero-sub          { animation: fadeUp .6s cubic-bezier(.34,1.56,.64,1) both .4s; }
.hero .btn-primary { animation: fadeUp .6s cubic-bezier(.34,1.56,.64,1) both .55s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .nav { padding: 1rem 1.25rem; }
  .hero { padding: 6rem 1rem 3rem; }
  .hero-content { padding: 2rem 1.5rem; border-radius: 20px; }
  .pillars, .vision, .notify { padding: 4rem 1.5rem; }
  .footer-inner { justify-content: center; text-align: center; }
  .classroom-scene svg { min-height: 100%; }
}
