/* ============================================================
   EDUMAX PUBLIC SITE — Design System
   Extends the Edumax brand tokens for marketing / public pages
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');

:root {
  /* Brand colors (matches in-app design system) */
  --b: #3B82F6;
  --bd: #1D4ED8;
  --bl: #E0F2FE;
  --r: #EF4444;
  --rd: #DC2626;
  --rl: #FEE2E2;
  --g: #22C55E;
  --gl: #DCFCE7;
  --y: #F59E0B;
  --yl: #FEF3C7;
  --n: #0F172A;
  --g1: #F1F5F9;
  --g2: #E2E8F0;
  --g3: #CBD5E1;
  --g4: #94A3B8;
  --g5: #64748B;
  --g6: #475569;
  --w: #fff;
  --bg: #F0F9FF;

  /* Typography */
  --f-display: 'Fredoka', system-ui, sans-serif;
  --f-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius */
  --rs: 10px;
  --rm: 14px;
  --rlg: 18px;
  --rxl: 24px;
  --r2: 28px;
  --rf: 9999px;

  /* Shadow */
  --ss: 0 1px 2px rgba(15, 23, 42, .06);
  --sm: 0 6px 16px -4px rgba(15, 23, 42, .10), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --sl: 0 20px 40px -12px rgba(15, 23, 42, .16), 0 8px 16px -6px rgba(15, 23, 42, .08);

  --tr: all .2s cubic-bezier(.4, 0, .2, 1);
  --wrap: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  color: var(--n);
  background: var(--w);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
}

ul {
  list-style: none;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--b);
  background: var(--bl);
  padding: 6px 14px;
  border-radius: var(--rf);
  margin-bottom: 16px;
}

.eyebrow.r {
  color: var(--r);
  background: var(--rl);
}

.eyebrow.y {
  color: #B45309;
  background: var(--yl);
}

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--n);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--g5);
  font-size: 16px;
  line-height: 1.6;
}

section {
  padding: 76px 0;
}

/* ===== Reveal-on-scroll ===== */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.rv.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HEADER
   ============================================================ */
.ph-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g2);
}

.ph-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--wrap);
  margin: 0 auto;
}

.ph-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph-logo span {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--b);
}

.ph-logo img {
  width: 75px;
}


.ph-links {
  display: none;
  align-items: center;
  gap: 30px;
}

.ph-links a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--g6);
  transition: var(--tr);
  position: relative;
}

.ph-links a:hover {
  color: var(--b);
}

.ph-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--rlg);
  border: none;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 700;
  transition: var(--tr);
  white-space: nowrap;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13.5px;
  border-radius: var(--rm);
}

.btn-primary {
  background: var(--b);
  color: var(--w);
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, .45);
}

.btn-primary:hover {
  background: var(--bd);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(59, 130, 246, .5);
}

.btn-outline {
  background: var(--w);
  color: var(--n);
  border: 1.5px solid var(--g2);
}

.btn-outline:hover {
  border-color: var(--b);
  color: var(--b);
}

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

.btn-ghost:hover {
  color: var(--n);
}

.btn-red {
  background: var(--r);
  color: var(--w);
  box-shadow: 0 4px 12px -2px rgba(239, 68, 68, .4);
}

.btn-red:hover {
  background: var(--rd);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--w);
  color: var(--b);
}

.btn-white:hover {
  background: var(--bl);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
  border-radius: var(--rxl);
}

.ph-burger {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: var(--rm);
  border: 1.5px solid var(--g2);
  background: var(--w);
  align-items: center;
  justify-content: center;
}

.mob-menu {
  position: fixed;
  inset: 0;
  background: var(--w);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 40px;
}

.mob-menu.open {
  transform: translateX(0);
}

.mob-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.mob-menu a {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  padding: 14px 4px;
  border-bottom: 1px solid var(--g1);
}

.mob-menu-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 56px 0 40px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--w) 100%);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  margin-bottom: 18px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--b);
  position: relative;
}

.hero-copy p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--g6);
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats b {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--n);
}

.hero-stats span {
  font-size: 12.5px;
  color: var(--g5);
  font-weight: 600;
}

/* Hero journey visual */
.hero-visual {
  position: relative;
}

.hero-path-card {
  background: var(--w);
  border-radius: var(--r2);
  border: 1px solid var(--g2);
  box-shadow: var(--sl);
  padding: 20px 14px 10px;
  position: relative;
  overflow: hidden;
}

.hero-path-card .tag {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--g5);
  background: var(--g1);
  padding: 5px 12px;
  border-radius: var(--rf);
  z-index: 3;
}

.hero-xpfloat {
  position: absolute;
  top: 54px;
  right: 26px;
  background: var(--n);
  color: var(--w);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--rf);
  box-shadow: var(--sm);
  animation: floaty 3.2s ease-in-out infinite;
  z-index: 3;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.path-draw {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.2s ease forwards .3s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.node-pulse {
  animation: pulse 2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .55;
  }

  50% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ============================================================
   LOOP (How it works)
   ============================================================ */
.loop-strip {
  display: grid;
  gap: 14px;
}

.loop-step {
  background: var(--w);
  border: 1px solid var(--g2);
  border-radius: var(--rxl);
  padding: 22px 20px;
  position: relative;
  transition: var(--tr);
}

.loop-step:hover {
  box-shadow: var(--sm);
  transform: translateY(-3px);
  border-color: var(--bl);
}

.loop-num {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--b);
  background: var(--bl);
  width: 30px;
  height: 30px;
  border-radius: var(--rf);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.loop-step h4 {
  font-size: 16.5px;
  margin-bottom: 6px;
}

.loop-step p {
  font-size: 13.5px;
  color: var(--g5);
  line-height: 1.5;
}

.loop-arrow {
  display: none;
  color: var(--g3);
}

/* ============================================================
   WORLDS
   ============================================================ */
.worlds-grid {
  display: grid;
  gap: 18px;
}

.world-card {
  border-radius: var(--r2);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  color: var(--w);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: var(--tr);
}

.world-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sl);
}

.world-math {
  background: linear-gradient(150deg, #3B82F6 0%, #1D4ED8 100%);
}

.world-sci {
  background: linear-gradient(150deg, #22C55E 0%, #15803D 100%);
}

.world-eng {
  background: linear-gradient(150deg, #EF4444 0%, #B91C1C 100%);
}

.world-card h4 {
  font-size: 21px;
  color: var(--w);
  margin-bottom: 6px;
}

.world-card p {
  font-size: 13px;
  opacity: .85;
  margin-bottom: 12px;
}

.world-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.world-tags span {
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .18);
  padding: 4px 10px;
  border-radius: var(--rf);
}

.world-deco {
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 100px;
  opacity: .12;
}

/* ============================================================
   FEATURES
   ============================================================ */
.feat-grid {
  display: grid;
  gap: 16px;
}

.feat-card {
  background: var(--w);
  border: 1px solid var(--g2);
  border-radius: var(--rxl);
  padding: 24px;
  transition: var(--tr);
}

.feat-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-3px);
  border-color: var(--bl);
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--rlg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.fi-b {
  background: var(--bl);
  color: var(--b);
}

.fi-r {
  background: var(--rl);
  color: var(--r);
}

.fi-g {
  background: var(--gl);
  color: var(--g);
}

.fi-y {
  background: var(--yl);
  color: #B45309;
}

.feat-card h4 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.feat-card p {
  font-size: 13.5px;
  color: var(--g5);
  line-height: 1.55;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testi-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.testi-row::-webkit-scrollbar {
  display: none;
}

.testi-card {
  flex: 0 0 82%;
  scroll-snap-align: start;
  background: var(--bg);
  border-radius: var(--r2);
  padding: 26px;
  border: 1px solid var(--g2);
}

.testi-quote {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--n);
  margin-bottom: 18px;
}

.testi-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testi-av {
  width: 38px;
  height: 38px;
  border-radius: var(--rf);
  background: var(--b);
  color: var(--w);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.testi-name {
  font-size: 13.5px;
  font-weight: 700;
}

.testi-role {
  font-size: 12px;
  color: var(--g5);
}

/* ============================================================
   PRICING TEASER
   ============================================================ */
.pricing-grid {
  display: grid;
  gap: 18px;
}

.price-card {
  background: var(--w);
  border: 1.5px solid var(--g2);
  border-radius: var(--r2);
  padding: 30px 26px;
  transition: var(--tr);
}

.price-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-3px);
}

.price-card.hi {
  border-color: var(--b);
  background: linear-gradient(160deg, var(--w) 0%, var(--bl) 130%);
  position: relative;
}

.price-badge {
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--b);
  color: var(--w);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--rf);
}

.price-card h4 {
  font-size: 18px;
  margin-bottom: 4px;
}

.price-card .sub {
  font-size: 13px;
  color: var(--g5);
  margin-bottom: 18px;
}

.price-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
}

.price-num b {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 600;
}

.price-num span {
  font-size: 13px;
  color: var(--g5);
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.price-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--g6);
}

.price-list svg {
  color: var(--g);
  flex-shrink: 0;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--n);
  border-radius: var(--r2);
  padding: 56px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, .35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(239, 68, 68, .28), transparent 40%);
}

.cta-band>* {
  position: relative;
  z-index: 2;
}

.cta-band h2 {
  color: var(--w);
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 12px;
}

.cta-band p {
  color: var(--g3);
  font-size: 15.5px;
  margin-bottom: 26px;
}

.cta-mascot {
  font-size: 44px;
  margin-bottom: 14px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--n);
  color: var(--g3);
  padding: 60px 0 26px;
}

.foot-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 40px;
}

.foot-brand span {
  font-family: var(--f-display);
  color: var(--w);
  font-size: 19px;
  font-weight: 600;
}

.foot-brand p {
  font-size: 13.5px;
  color: var(--g4);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 260px;
}

.foot-col h5 {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--w);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: .02em;
}

.foot-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col a {
  font-size: 13.5px;
  color: var(--g4);
  transition: var(--tr);
}

.foot-col a:hover {
  color: var(--w);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--g4);
}

.foot-bottom a {
  color: var(--g4);
}

.foot-bottom a:hover {
  color: var(--w);
}

.foot-legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 680px) {
  .loop-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .worlds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 640px;
    margin: 0 auto;
  }

  .testi-card {
    flex: 0 0 60%;
  }
}

@media (min-width: 860px) {
  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .ph-links {
    display: flex;
  }

  .ph-burger {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
  }

  .loop-strip {
    grid-template-columns: repeat(5, 1fr);
  }

  .loop-arrow {
    display: flex;
  }

  .worlds-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testi-row {
    overflow: visible;
  }

  .testi-card {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2.5px solid var(--b);
  outline-offset: 2px;
}