:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #f97316;
  --teal: #14b8a6;
  --pink: #ec4899;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-sec: #475569;
  --text-muted: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.landing-body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 28%, #fff1f2 58%, #fff7ed 100%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: block;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: 'Nunito', system-ui, sans-serif;
}

.landing-bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.landing-bg-mesh .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: blobFloat 18s ease-in-out infinite;
}

.landing-bg-mesh .b1 {
  width: 420px;
  height: 420px;
  background: #c7d2fe;
  top: -120px;
  right: -80px;
  animation-delay: 0s;
}

.landing-bg-mesh .b2 {
  width: 360px;
  height: 360px;
  background: #fbcfe8;
  bottom: 10%;
  left: -100px;
  animation-delay: -6s;
}

.landing-bg-mesh .b3 {
  width: 300px;
  height: 300px;
  background: #fed7aa;
  top: 40%;
  right: 15%;
  animation-delay: -12s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.98); }
}

.landing-wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Header */
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 28px;
  gap: 16px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.landing-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.landing-logo-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 21px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-ghost {
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-sec);
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
  background: #fff;
}

.btn-primary-landing {
  padding: 11px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
  transition: all 0.25s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary-landing:hover {
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 12px 0 56px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-visual {
    order: -1;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
  margin-bottom: 18px;
  animation: fadeUp 0.7s ease backwards;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  animation: fadeUp 0.7s ease 0.08s backwards;
}

.hero h1 .grad {
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-sec);
  line-height: 1.55;
  max-width: 460px;
  animation: fadeUp 0.7s ease 0.15s backwards;
}

@media (max-width: 900px) {
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.22s backwards;
}

@media (max-width: 900px) {
  .hero-cta-row {
    justify-content: center;
  }
}

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

/* Hero visual: stacked worksheet cards */
.hero-visual {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper-stack {
  position: relative;
  width: min(100%, 380px);
  height: 300px;
}

.paper {
  position: absolute;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.35s ease;
}

.paper-a {
  width: 88%;
  height: 240px;
  left: 6%;
  top: 30px;
  transform: rotate(-4deg);
  z-index: 1;
  animation: paperIn 0.9s ease 0.2s backwards;
}

.paper-b {
  width: 88%;
  height: 240px;
  left: 8%;
  top: 20px;
  transform: rotate(5deg);
  z-index: 2;
  animation: paperIn 0.9s ease 0.35s backwards;
}

.paper-c {
  width: 88%;
  height: 240px;
  left: 3%;
  top: 40px;
  transform: rotate(-1deg);
  z-index: 3;
  animation: paperIn 0.9s ease 0.5s backwards;
}

.hero-visual:hover .paper-a { transform: rotate(-6deg) translateY(-4px); }
.hero-visual:hover .paper-b { transform: rotate(4deg) translateY(-8px); }
.hero-visual:hover .paper-c { transform: rotate(0deg) translateY(-12px); }

@keyframes paperIn {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(0deg) scale(0.95);
  }
}

.paper-hdr {
  height: 36px;
  background: linear-gradient(90deg, var(--primary-light), #a5b4fc);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.paper-body {
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-sec);
}

.ws-line {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  margin-bottom: 10px;
}

.ws-line.short { width: 55%; }
.ws-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.ws-cell {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
}

.ws-trace {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.ws-trace span {
  font-size: 28px;
  font-weight: 800;
  color: #cbd5e1;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 4px;
}

/* Section titles */
.section {
  margin-top: 48px;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--text-sec);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
}

/* Flow strip */
.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .flow-strip {
    grid-template-columns: 1fr;
  }
}

.flow-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.flow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.12);
}

.flow-card:hover::before {
  transform: scaleX(1);
}

.flow-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(145deg, #eef2ff, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.flow-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.flow-card p {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.45;
}

.flow-arrow {
  display: none;
}

@media (min-width: 769px) {
  .flow-strip {
    position: relative;
  }
}

/* Audience columns */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .audience-grid {
    grid-template-columns: 1fr;
  }
}

.audience-panel {
  border-radius: 24px;
  padding: 28px 24px 32px;
  position: relative;
  overflow: hidden;
}

.audience-teachers {
  background: linear-gradient(165deg, #fff 0%, #eef2ff 100%);
  border: 1px solid #c7d2fe;
}

.audience-parents {
  background: linear-gradient(165deg, #fff 0%, #fff7ed 100%);
  border: 1px solid #fed7aa;
}

.audience-panel h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audience-panel .sub {
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 20px;
}

.feature-grid-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .feature-grid-mini {
    grid-template-columns: 1fr;
  }
}

.feature-tile {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px 14px;
  text-align: center;
  transition: transform 0.2s;
}

.feature-tile:hover {
  transform: scale(1.02);
}

.feature-tile .fi {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.feature-tile .lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* Worksheet gallery */
.ws-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .ws-gallery {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}

.ws-thumb {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.3s;
}

.ws-thumb:hover {
  transform: translateY(-6px) rotate(1deg);
}

.ws-thumb-top {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-thumb-top.math {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.ws-thumb-top.art {
  background: linear-gradient(90deg, #f97316, #ec4899);
}

.ws-thumb-top.read {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
}

.ws-thumb-body {
  padding: 16px;
  min-height: 140px;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}

.match-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  border: 2px solid var(--border);
}

.math-row {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.05em;
}

.read-lines .ws-line {
  margin-bottom: 8px;
}

/* CTA footer band */
.cta-band {
  margin-top: 56px;
  padding: 40px 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #4338ca 100%);
  text-align: center;
  color: #fff;
  box-shadow: 0 16px 48px rgba(79, 70, 229, 0.35);
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.cta-band h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.cta-band p {
  opacity: 0.92;
  font-size: 15px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-band .btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #fff;
  color: #fff;
}

.cta-band .btn-primary-landing {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cta-band .btn-primary-landing:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.landing-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .landing-bg-mesh .blob,
  .paper-a,
  .paper-b,
  .paper-c,
  .hero-badge,
  .hero h1,
  .hero-lead,
  .hero-cta-row {
    animation: none !important;
  }
  .hero-visual:hover .paper-a,
  .hero-visual:hover .paper-b,
  .hero-visual:hover .paper-c {
    transform: none;
  }
}
