/* Mathicorn marketing site — shared styles */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fredoka-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunito-var.woff2') format('woff2');
}

:root {
  --sky1: #ECE6FF; --sky2: #FBE3F0; --sky3: #DCEAFF;
  --ink: #4A3A6B; --body: #5B4B8A; --brand: #7B57C9;
  --card: #FFFFFF; --cream: #FFF8EE; --border: #E3D7FB;
  --cloud: rgba(255,255,255,.55); --shadow: rgba(91,75,138,.16); --ring: transparent;
  --pink: #FF7FB0; --pink-edge: #E85F95; --pink-pale: #FFE0EC;
  --mint: #9FE3C6; --mint-ink: #1E5C42;
  --gold: #F2B705;
  --blue: #AFCBFF;
  --lavender: #C9B8FF;
}
:root[data-theme="midnight"] {
  --sky1: #241B3E; --sky2: #3A2455; --sky3: #1E1836;
  --ink: #F3EDFF; --body: #C9B8FF; --brand: #C9B8FF;
  --card: #332752; --cream: #2C2147; --border: #4A3A6B;
  --cloud: rgba(201,184,255,.10); --shadow: rgba(0,0,0,.42); --ring: rgba(255,255,255,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Nunito, system-ui, sans-serif;
  color: var(--body);
  background: linear-gradient(165deg, var(--sky1) 0%, var(--sky2) 48%, var(--sky3) 100%);
  min-height: 100vh;
}
a { color: var(--brand); }
a:hover { color: var(--pink-edge); }
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
}
:root[data-theme="midnight"] a:focus-visible,
:root[data-theme="midnight"] button:focus-visible {
  outline-color: #FF8FB8;
}
h1, h2, h3, figcaption { font-family: Fredoka, sans-serif; color: var(--ink); }
p { text-wrap: pretty; }
img { max-width: 100%; display: block; }

.page { position: relative; overflow: hidden; }

/* decorative clouds/stars */
.deco { position: absolute; pointer-events: none; }
.deco-cloud { background: var(--cloud); border-radius: 999px; }
.deco-star { color: var(--gold); }
.deco-star.lav { color: var(--lavender); }

/* header */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 5vw, 64px);
}
.site-header .logo-link { display: inline-flex; }
.site-header .logo-link img { height: 44px; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 26px); font-weight: 700; font-size: 14.5px; }
.site-nav a.nav-link { color: var(--body); text-decoration: none; }
.site-nav a.nav-link.active { color: var(--ink); border-bottom: 2px solid #FF8FB8; padding-bottom: 2px; }

.btn-play {
  display: inline-flex;
  align-items: center;
  background: var(--pink);
  color: #4A3A6B;
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  padding: 9px 20px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--pink-edge);
  text-decoration: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--pink);
  color: #4A3A6B;
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 2vw, 19px);
  padding: 16px 30px;
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--pink-edge);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--pink-edge); }

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1D1D1F;
  color: #FFFFFF;
  padding: 11px 20px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 0 0 1.5px var(--ring);
}
.btn-appstore svg { flex: none; width: 22px; height: 22px; }
.btn-appstore .lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn-appstore .small { font-size: 10px; font-weight: 600; }
.btn-appstore .big { font-family: Fredoka, sans-serif; font-size: 18px; font-weight: 500; }
.btn-appstore.small-badge { padding: 9px 16px; gap: 9px; }
.btn-appstore.small-badge svg { width: 18px; height: 18px; }
.btn-appstore.small-badge .small { font-size: 9px; }
.btn-appstore.small-badge .big { font-size: 15px; }

/* hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 56px);
}
.hero img.hero-logo { width: min(430px, 78vw); }
.hero h1 {
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.15;
  margin: 30px 0 0;
  max-width: 640px;
}
.hero .sub { font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--body); margin: 14px 0 0; max-width: 560px; }
.hero .cta-row { display: flex; gap: 16px; align-items: center; margin: 30px 0 0; flex-wrap: wrap; justify-content: center; }
.hero .microline { margin: 18px 0 0; font-weight: 800; font-size: clamp(12px, 1.6vw, 14px); letter-spacing: .05em; color: var(--brand); }

/* screenshots / polaroids */
.shots { position: relative; padding: clamp(16px, 3vw, 26px) clamp(16px, 3vw, 40px) 0; text-align: center; }
.shots h2 { font-weight: 600; font-size: clamp(26px, 3.4vw, 32px); margin: 0 0 26px; }
.shots .gallery { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; }
.polaroid { margin: 0; background: var(--card); padding: 10px 10px 12px; border-radius: 22px; box-shadow: 0 10px 24px var(--shadow); }
.polaroid img { width: 236px; height: 430px; object-fit: cover; object-position: top; border-radius: 14px; }
.polaroid figcaption { font-weight: 500; font-size: 15px; color: var(--body); margin-top: 10px; }
.polaroid.r1 { transform: rotate(-2.5deg); }
.polaroid.r2 { transform: rotate(1.8deg); margin-top: 18px; }
.polaroid.r3 { transform: rotate(-1.6deg); }
.polaroid.r4 { transform: rotate(2.4deg); margin-top: 20px; }
@media (max-width: 640px) {
  .polaroid.r1, .polaroid.r2, .polaroid.r3, .polaroid.r4 { margin-top: 0; }
}

/* generic section container */
.section { position: relative; padding: clamp(36px, 5vw, 54px) clamp(20px, 5vw, 80px) 0; max-width: 1180px; margin: 0 auto; }
.section h2 { font-weight: 600; font-size: clamp(26px, 3.4vw, 32px); margin: 0; text-align: center; }
.section h2.left { text-align: left; }
.card-block { background: var(--card); border-radius: 28px; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px); box-shadow: 0 8px 28px var(--shadow); }
.cream-block { background: var(--cream); border-radius: 28px; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px); }

/* teaching grid */
.teach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px 40px; margin-top: 32px; }
.teach-item { display: flex; gap: 16px; align-items: flex-start; }
.teach-num { flex: none; width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 17px; color: #4A3A6B; }
.teach-item .t { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 19px; color: var(--ink); }
.teach-item p { margin: 5px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--body); }

/* grown-ups */
.grownups { text-align: center; }
.grownups > p { font-size: 16.5px; line-height: 1.6; color: var(--body); margin: 14px auto 0; max-width: 620px; }
.grownups .gate-line { font-size: 15px; line-height: 1.6; color: var(--brand); margin: 10px 0 0; font-weight: 700; }
.gu-cards { display: flex; justify-content: center; align-items: stretch; gap: 24px; flex-wrap: wrap; margin-top: 30px; }
.gu-card { box-sizing: border-box; background: var(--card); border-radius: 24px; border: 2px solid var(--border); padding: 26px 28px; box-shadow: 0 8px 28px var(--shadow); text-align: left; }
.dash-card { width: min(400px, 100%); }
.dash-head { display: flex; justify-content: space-between; align-items: baseline; }
.dash-head .name { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.dash-head .label { font-weight: 700; font-size: 12px; color: var(--brand); letter-spacing: .05em; }
.stat-row { display: flex; gap: 12px; margin-top: 16px; }
.stat-tile { flex: 1; background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.stat-tile .label { font-weight: 700; font-size: 11.5px; color: var(--brand); }
.stat-tile .value { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 22px; color: var(--ink); }
.section-label { margin-top: 16px; font-weight: 700; font-size: 11.5px; color: var(--brand); }
.mastery-strip { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.mastery-chip { width: 29px; height: 29px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; color: #4A3A6B; }
.needs-work-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.needs-chip { background: var(--pink-pale); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 13px; color: #4A3A6B; }
.heat-card .section-label { margin-top: 0; margin-bottom: 12px; }
.heat-grid { display: grid; grid-template-columns: repeat(11, 17px); gap: 4px; }
.heat-cell { width: 17px; height: 17px; border-radius: 5px; }
.heat-legend { display: flex; gap: 14px; margin-top: 16px; font-weight: 700; font-size: 12.5px; color: var(--ink); flex-wrap: wrap; }
.heat-legend span { display: flex; align-items: center; gap: 6px; }
.heat-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

/* trust */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 32px; margin-top: 30px; }
.trust-item { display: flex; gap: 10px; align-items: flex-start; }
.trust-check { flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.trust-item span.t { font-weight: 700; font-size: 15.5px; line-height: 1.45; color: var(--ink); }

/* modes */
.modes { text-align: center; padding-top: clamp(36px, 5vw, 52px); }
.modes h2 { font-weight: 600; font-size: clamp(22px, 3vw, 26px); margin: 0 0 20px; }
.modes-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.mode-pill { border: 2px solid #FFFFFF; box-shadow: 0 3px 10px var(--shadow); border-radius: 999px; padding: 11px 22px; font-family: Fredoka, sans-serif; font-weight: 500; font-size: 17px; color: #4A3A6B; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; padding: clamp(38px, 5vw, 54px) clamp(20px, 5vw, 80px) 8px; }
.faq h2 { font-weight: 600; font-size: clamp(22px, 3vw, 26px); margin: 0 0 8px; text-align: center; }
.faq-item { border-bottom: 2px solid var(--border); padding: 18px 4px; }
.faq-item .q { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.faq-item p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* footer */
.site-footer { position: relative; text-align: center; padding: clamp(32px, 5vw, 44px) clamp(20px, 5vw, 80px) 40px; }
.footer-links { display: flex; justify-content: center; gap: clamp(16px, 3vw, 26px); font-weight: 700; font-size: 14.5px; flex-wrap: wrap; }
.footer-links a { color: var(--brand); text-decoration: none; }
.footer-badge { margin-top: 22px; display: flex; justify-content: center; }
.site-footer .tagline { margin: 18px 0 0; font-size: 14px; color: var(--body); }
.site-footer .copyright { margin: 8px 0 0; font-size: 12.5px; color: var(--brand); }

/* about page */
.story { position: relative; max-width: 1060px; margin: 0 auto; padding: clamp(30px, 5vw, 60px) clamp(20px, 5vw, 64px) 0; }
.story-flex { display: flex; gap: clamp(28px, 5vw, 60px); align-items: center; flex-wrap: wrap; }
.story-copy { flex: 1; min-width: 300px; }
.story-copy h1 { font-weight: 600; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.15; margin: 0; }
.story-copy p { font-size: clamp(16px, 1.9vw, 17.5px); line-height: 1.65; color: var(--body); margin: 20px 0 0; }
.story-copy p.kicker { font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--ink); margin: 18px 0 0; }
.story-photo { flex: none; width: min(340px, 100%); }
.story-photo .frame { background: var(--card); padding: 12px 12px 14px; border-radius: 24px; box-shadow: 0 12px 30px var(--shadow); transform: rotate(2deg); }
.story-photo img { width: 100%; height: 300px; object-fit: cover; object-position: top; border-radius: 14px; }
.story-photo .cap { font-family: Fredoka, sans-serif; font-weight: 500; font-size: 14px; color: var(--body); margin-top: 10px; text-align: center; }

.why-section { position: relative; max-width: 1060px; margin: 0 auto; padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 64px) 0; }
.why-section h2 { font-weight: 600; font-size: clamp(24px, 3.2vw, 30px); margin: 0 0 24px; text-align: center; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.why-card { background: var(--card); border-radius: 24px; padding: 30px 30px 32px; box-shadow: 0 8px 24px var(--shadow); }
.why-card .t { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 20px; color: var(--ink); }
.why-card p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--body); }

.closing { position: relative; text-align: center; padding: clamp(44px, 7vw, 72px) clamp(20px, 5vw, 64px) 0; }
.closing .headline { font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(22px, 3vw, 28px); color: var(--ink); margin: 0; }
.closing .sub { font-size: clamp(16px, 2vw, 18px); color: var(--body); margin: 10px 0 0; }
.closing .cta-row { display: flex; gap: 16px; align-items: center; margin: 26px 0 0; flex-wrap: wrap; justify-content: center; }

/* legal / support pages */
.legal-hero { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(20px, 5vw, 64px) 0; }
.legal-hero h1 { font-weight: 600; font-size: clamp(30px, 4.4vw, 40px); margin: 0; }
.legal-hero .updated { font-weight: 700; font-size: 14px; color: var(--brand); margin: 8px 0 0; }
.legal-hero .updated .chip { background: var(--cream); border-radius: 6px; padding: 1px 8px; }
.legal-hero .lede { font-size: 17px; line-height: 1.6; color: var(--body); margin: 10px 0 0; max-width: 560px; }
.legal-body { max-width: 820px; margin: 0 auto; padding: 22px clamp(20px, 5vw, 64px) 0; }
.legal-card { background: var(--card); border-radius: 24px; padding: clamp(26px, 4vw, 44px); box-shadow: 0 8px 28px var(--shadow); }
.legal-card h2 { font-weight: 600; font-size: 22px; margin: 26px 0 8px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { font-size: 16px; line-height: 1.7; color: var(--body); margin: 10px 0 0; }
.legal-card ul { font-size: 16px; line-height: 1.7; color: var(--body); margin: 12px 0 0; padding-left: 22px; }
.legal-card li { margin: 4px 0; }
.legal-card .summary { background: var(--cream); border-radius: 14px; padding: 16px 20px; margin: 0 0 26px; }
.legal-card .summary strong { color: var(--ink); }
.mail-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--mint); color: var(--mint-ink); font-family: Fredoka, sans-serif; font-weight: 600; font-size: 17px; padding: 13px 24px; border-radius: 999px; margin-top: 14px; text-decoration: none; }
.mail-pill:hover { color: var(--mint-ink); opacity: .85; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; margin: 0 0 26px; }

@media (max-width: 480px) {
  .heat-grid { grid-template-columns: repeat(11, minmax(0, 1fr)); }
}
