:root {
  --cream: #FBF3E1;
  --cream-soft: #F7ECD3;
  --ink: #2E1A54;
  --teal: #3FC1AE;
  --teal-dark: #2A9E8E;
  --magenta: #B5279A;
  --olive: #A9C22A;
  --orange: #F2622E;
  --gold: #F2B705;
  --white: #FFFFFF;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 30px rgba(46, 26, 84, 0.10);
  --shadow-card: 0 8px 20px rgba(46, 26, 84, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { line-height: 1.6; margin: 0 0 1em; }

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

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--magenta);
  background: rgba(181, 39, 154, 0.10);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.eyebrow.center { display: block; width: fit-content; margin-left: auto; margin-right: auto; }

.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-lead {
  max-width: 620px;
  font-size: 1.1rem;
  color: #55486f;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(242, 98, 46, 0.35);
}

.btn-primary:hover { box-shadow: 0 12px 26px rgba(242, 98, 46, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-lg { padding: 18px 40px; font-size: 1.15rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid rgba(46, 26, 84, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}

.brand-mark { height: 56px; width: auto; }

.site-nav {
  display: flex;
  gap: 28px;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  flex: 1;
  justify-content: center;
}

.site-nav a { opacity: 0.8; }
.site-nav a:hover { opacity: 1; color: var(--magenta); }

.nav-cta { padding: 10px 22px; font-size: 0.95rem; white-space: nowrap; }

/* Hero */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.hero-blob--teal {
  width: 460px;
  height: 460px;
  top: -140px;
  left: -100px;
  background: var(--teal);
  opacity: 0.30;
  animation: heroBlobDrift1 22s ease-in-out infinite;
}

.hero-blob--magenta {
  width: 340px;
  height: 340px;
  bottom: -160px;
  right: 6%;
  background: var(--magenta);
  opacity: 0.20;
  animation: heroBlobDrift2 26s ease-in-out infinite;
}

.hero-blob--gold {
  width: 280px;
  height: 280px;
  top: 22%;
  right: -110px;
  background: var(--gold);
  opacity: 0.22;
  animation: heroBlobDrift3 19s ease-in-out infinite;
}

.hero-dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(46, 26, 84, 0.10) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 38%, #000 40%, transparent 85%);
          mask-image: radial-gradient(ellipse 65% 55% at 50% 38%, #000 40%, transparent 85%);
}

@keyframes heroBlobDrift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(28px, 22px); }
}

@keyframes heroBlobDrift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-22px, -18px); }
}

@keyframes heroBlobDrift3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob { animation: none; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  margin-bottom: 0.4em;
}

.hero-sub {
  font-size: 1.15rem;
  color: #55486f;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}

.hero-badge {
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.65;
  font-style: italic;
  max-width: 460px;
}

.hero-art {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  min-height: 520px;
}

/* Animated hero robot (design_handoff_robot_hero) */
.hero-robot-host {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  overflow: visible;
  padding: 24px 24px 0;
  box-sizing: border-box;
  aspect-ratio: 242.46 / 236; /* fallback until JS crops to the real bbox, avoids layout shift */
}

.hero-robot-host svg path {
  fill-rule: evenodd;
}

.hero-robot-shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(59, 26, 94, .22), rgba(59, 26, 94, 0) 72%);
  z-index: 0;
}

/* Robot eye-tracking wrapper */
.robot-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* Invisible circular zone — sized & positioned by JS */
.eye-overlay {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  overflow: hidden;
}

/* The moving pupil */
.eye-overlay .pupil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transition: none;
}

.eye-overlay .pupil::after {
  content: '';
  display: block;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: #1a0a36;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

@keyframes fadeSlideRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-art {
  animation: fadeSlideRight 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

/* Philosophy / pillars */
.philosophy { padding: 80px 0; background: var(--white); }

.philosophy h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.pillar {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.pillar-icon--teal { background: var(--teal); }
.pillar-icon--magenta { background: var(--magenta); }
.pillar-icon--olive { background: var(--olive); }

.pillar h3 { font-size: 1.25rem; }
.pillar p { color: #55486f; margin-bottom: 0; }

/* How it works */
.how-it-works { padding: 80px 0; }

.how-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.how-it-works h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.feature-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.feature-list li {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  border-left: 5px solid var(--teal);
}

.feature-list li:nth-child(2) { border-left-color: var(--magenta); }
.feature-list li:nth-child(3) { border-left-color: var(--orange); }

.feature-list strong {
  display: block;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.feature-list span { color: #55486f; font-size: 0.98rem; }

.how-art { display: flex; justify-content: center; }

.how-mascot { max-width: 300px; filter: drop-shadow(var(--shadow-soft)); }

/* Research */
.research {
  padding: 80px 0;
  background: var(--ink);
  color: var(--cream);
}

.research .eyebrow {
  color: var(--gold);
  background: rgba(242, 183, 5, 0.15);
}

.research h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  max-width: 700px;
}

.research .section-lead {
  color: rgba(251, 243, 225, 0.82);
  max-width: 720px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.research-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 26px 24px;
}

.research-card h3 {
  color: var(--teal);
  font-size: 1.1rem;
}

.research-card p {
  color: rgba(251, 243, 225, 0.78);
  margin-bottom: 0;
  font-size: 0.96rem;
}

/* Audience */
.audience { padding: 80px 0; background: var(--white); }

.audience h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.grade-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.grade-chip {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  background: var(--cream);
  border: 2px solid var(--teal);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 1.05rem;
}

/* CTA */
.cta {
  padding: 90px 0;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 100%);
  text-align: center;
  color: var(--white);
}

.cta-inner { display: flex; flex-direction: column; align-items: center; }

.cta-mascot {
  width: 120px;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

.cta h2 { color: var(--white); font-size: clamp(1.8rem, 3vw, 2.4rem); }

.cta p {
  max-width: 500px;
  color: rgba(255,255,255,0.92);
  font-size: 1.1rem;
}

.cta .btn-primary {
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

/* Footer */
.site-footer {
  background: var(--ink);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-mark { height: 40px; }

.footer-inner p {
  color: rgba(251, 243, 225, 0.6);
  font-size: 0.85rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner, .how-inner { grid-template-columns: 1fr; }
  .hero-art, .how-art { order: -1; }
  .hero-art { min-height: 0; }
  .hero-robot-host { max-width: 260px; }
  .site-nav { display: none; }
  .pillars, .research-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
}

@media (max-width: 520px) {
  .header-inner { justify-content: space-between; }
  .nav-cta { padding: 9px 16px; font-size: 0.85rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
}
