/* ==========================================================================
   Schoolest — landing page
   Design language: a live quiz-battle arena. Dark indigo (from the logo's
   own outline color) with teal and pink glows, a floating match card as the
   hero centerpiece, flat rounded icons matching the game's own art style.
   ========================================================================== */

:root {
  --ink: #201B3D;
  --ink-soft: #524C78;
  --paper: #FBF8EE;
  --paper-alt: #F1EAD3;
  --night: #1C1738;
  --night-2: #2A2350;
  --teal: #1FB5C4;
  --teal-dark: #12808C;
  --pink: #FF7E97;
  --pink-dark: #E85D78;
  --gold: #F4C430;
  --gold-dark: #D9A700;
  --line-on-dark: rgba(251, 248, 238, 0.14);
  --line-on-dark-soft: rgba(251, 248, 238, 0.07);
  --line-on-light: rgba(32, 27, 61, 0.14);

  --font-display: "Baloo 2", "Segoe UI Rounded", sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --max-w: 1120px;
  --radius-sm: 10px;
  --radius-md: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.005em;
}

h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.2rem; }

p { margin: 0; font-family: var(--font-body); }

.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }

.eyebrow { font-family: var(--font-body); font-size: 0.85rem; color: var(--pink-dark); font-weight: 700; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--night); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* -------------------------------------------------------------------- */
/* Nav                                                                   */
/* -------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 238, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line-on-light);
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 20px; }

.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; padding-bottom: 2px; }
.nav-links a:hover { color: var(--ink); border-color: var(--teal); }

.lang-switch {
  display: flex; border: 2px solid var(--ink); border-radius: var(--radius-sm);
  overflow: hidden; font-size: 0.8rem; font-weight: 800;
}
.lang-switch a { padding: 6px 10px; text-decoration: none; color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }

.nav-cta {
  background: var(--teal); color: var(--ink); padding: 10px 18px;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 800; font-size: 0.9rem;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-dark); color: #fff; }

/* -------------------------------------------------------------------- */
/* Hero                                                                  */
/* -------------------------------------------------------------------- */

.hero { position: relative; background: var(--night); color: #F1EEFA; overflow: hidden; }

.hero-glow { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 40px; align-items: center; padding: 80px 0 72px;
}

.hero-copy .eyebrow { color: #6FE3EF; }

.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); margin: 12px 0 20px; color: #FBF8EE; }
.hero h1 .accent { color: var(--teal); }

.hero .lede { color: rgba(241, 238, 250, 0.82); font-size: 1.12rem; max-width: 44ch; }

.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.store-badge img { height: 54px; width: auto; }

.secondary-link {
  text-decoration: none; color: #F1EEFA; font-weight: 700; font-size: 0.95rem;
  border-bottom: 2px solid rgba(241,238,250,0.35); padding-bottom: 3px;
}
.secondary-link:hover { border-color: var(--teal); color: #6FE3EF; }

.hero-meta { display: flex; gap: 24px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line-on-dark); flex-wrap: wrap; }
.hero-meta-item { font-size: 0.85rem; color: rgba(241,238,250,0.75); }
.hero-meta-item strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: #FBF8EE; font-weight: 700; }

/* Match card */

.hero-visual { position: relative; display: flex; justify-content: center; }

.match-card {
  position: relative; width: 100%; max-width: 360px;
  background: var(--paper); border-radius: var(--radius-md);
  padding: 20px; border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

.match-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.match-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,126,151,0.15); color: var(--pink-dark);
  font-size: 0.75rem; font-weight: 800; padding: 5px 10px; border-radius: 999px;
}
.match-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-dark); }
.match-timer { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.95rem; }

.match-players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.match-player { text-align: center; }
.match-player img { width: 92px; margin: 0 auto 8px; }
.match-player .name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1rem; }
.match-player .score { color: var(--ink-soft); font-size: 0.82rem; }
.match-vs {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff;
  background: var(--pink); width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.match-progress {
  margin-top: 18px; height: 8px; border-radius: 999px; background: var(--paper-alt);
  overflow: hidden; display: flex;
}
.match-progress .fill-a { background: var(--teal); width: 58%; }
.match-progress .fill-b { background: var(--pink); width: 42%; }

/* -------------------------------------------------------------------- */
/* Sections generic                                                     */
/* -------------------------------------------------------------------- */

section { padding: 84px 0; }
.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head h2 { margin-top: 8px; }
.bg-alt { background: var(--paper-alt); }
.bg-night { background: var(--night); color: #F1EEFA; }
.bg-night .eyebrow { color: #6FE3EF; }
.bg-night h2 { color: #FBF8EE; }

/* Stats strip */

.stats-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-on-light); border: 1px solid var(--line-on-light);
  margin-top: 8px;
}
.stat-box { background: var(--paper); padding: 26px; text-align: center; }
.stat-box strong { display: block; font-family: var(--font-display); font-size: 2.1rem; color: var(--pink-dark); font-weight: 700; }
.stat-box span { font-size: 0.9rem; color: var(--ink-soft); }

/* Features grid */

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-on-light); border: 1px solid var(--line-on-light); }
.feature { background: var(--paper); padding: 32px 30px; display: flex; gap: 18px; align-items: flex-start; }
.bg-alt .feature { background: var(--paper-alt); }
.feature-icon { width: 46px; height: 46px; flex: none; }
.feature h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; }

/* How it works */

.walksteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.walkstep { position: relative; padding-top: 8px; }
.walkstep-marker {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--paper);
  margin-bottom: 20px;
}
.walkstep-trail {
  position: absolute; top: 23px; left: calc(50% + 23px); width: calc(100% - 46px);
  height: 0; border-top: 2px dashed var(--line-on-light);
}
.walkstep h3 { margin-bottom: 8px; }
.walkstep p { color: var(--ink-soft); font-size: 0.98rem; }

/* Subjects */

.subject-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.subject-pill {
  padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 700;
  border: 2px solid var(--ink);
}
.subject-pill:nth-child(3n+1) { background: var(--teal); color: var(--ink); }
.subject-pill:nth-child(3n+2) { background: var(--pink); color: var(--ink); }
.subject-pill:nth-child(3n+3) { background: var(--gold); color: var(--ink); }

/* Rivals section */

.rivals { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rival-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-md);
  padding: 26px; text-align: center;
}
.rival-card img, .rival-card svg { height: 130px; margin: 0 auto 14px; }
.rival-card h3 { margin-bottom: 8px; }
.rival-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* Trailer */

.trailer-frame {
  border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line-on-dark);
  max-width: 720px; margin: 0 auto;
}
.trailer-frame video { width: 100%; display: block; }

/* Screenshots */

.screens { display: flex; gap: 20px; overflow-x: auto; padding: 6px 6px 20px; scroll-snap-type: x mandatory; margin: 0 -6px; }
.screens img { scroll-snap-align: start; flex: none; width: 200px; border-radius: 16px; border: 1px solid var(--line-on-light); }

/* Audience row */

.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.audience-item { text-align: left; padding: 22px 0; border-top: 1px solid var(--line-on-light); }
.audience-item svg { margin-bottom: 14px; }
.audience-item h3 { font-size: 1.02rem; margin-bottom: 6px; font-family: var(--font-body); font-weight: 700; }
.audience-item p { color: var(--ink-soft); font-size: 0.92rem; }

/* FAQ */

.faq { max-width: 760px; }
.faq-item { border-top: 1px solid var(--line-on-light); padding: 22px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line-on-light); }
.faq-item summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex: none; width: 24px; height: 24px; border: 2px solid var(--ink); border-radius: 50%; position: relative; }
.faq-item summary .plus::before, .faq-item summary .plus::after {
  content: ""; position: absolute; background: var(--ink); top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.faq-item summary .plus::before { width: 11px; height: 2px; }
.faq-item summary .plus::after { width: 2px; height: 11px; }
.faq-item[open] summary .plus::after { display: none; }
.faq-item p { margin-top: 14px; color: var(--ink-soft); max-width: 65ch; font-family: var(--font-body); }

/* Final CTA */

.cta-band { background: var(--night); color: #F1EEFA; position: relative; overflow: hidden; }
.cta-inner { position: relative; padding: 66px 0; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { color: #FBF8EE; max-width: 20ch; }
.cta-inner .lede { color: rgba(241,238,250,0.8); margin-top: 12px; }

/* Footer */

footer { background: var(--paper); border-top: 1px solid var(--line-on-light); padding: 48px 0 32px; font-size: 0.9rem; color: var(--ink-soft); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-col h3 { font-size: 0.82rem; color: var(--ink); margin-bottom: 12px; font-family: var(--font-body); font-weight: 800; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--pink-dark); }
.footer-bottom { border-top: 1px solid var(--line-on-light); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; }

/* -------------------------------------------------------------------- */
/* One orchestrated entrance moment (hero only)                         */
/* -------------------------------------------------------------------- */

.hero-copy > * { opacity: 0; transform: translateY(10px); animation: rise 0.7s ease forwards; }
.hero-copy .eyebrow { animation-delay: 0.05s; }
.hero-copy h1 { animation-delay: 0.15s; }
.hero-copy .lede { animation-delay: 0.28s; }
.hero-copy .hero-actions { animation-delay: 0.4s; }
.hero-copy .hero-meta { animation-delay: 0.52s; }
.match-card { opacity: 0; transform: translateY(10px) scale(0.98); animation: rise 0.7s ease forwards; animation-delay: 0.3s; }

@keyframes rise { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .match-card { opacity: 1; transform: none; animation: none; }
}

/* -------------------------------------------------------------------- */
/* Responsive                                                            */
/* -------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 52px 0 44px; }
  .hero-visual { order: -1; margin-bottom: 8px; }
  .feature-grid { grid-template-columns: 1fr; }
  .walksteps { grid-template-columns: 1fr; gap: 28px; }
  .walkstep-trail { display: none; }
  .rivals { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr; }
  .audience { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .cta-inner { text-align: left; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  section { padding: 56px 0; }
  .audience { grid-template-columns: 1fr 1fr; }
  .hero-meta { gap: 18px; }
  .match-player img { width: 74px; }
}
