/* NCS Learning Game — coming-soon landing.
   Tokens lifted from the game's design system (colors.scss / typography.scss). */
:root {
  --blue: #5383F3;      --blue-strong: #2063FF;   --blue-soft: #E3F3FF;
  --tertiary: #35C8FF;
  --green: #68C094;     --green-strong: #008262;  --green-soft: #D9FEE5;
  --orange: #F8B200;    --orange-soft: #FFBF70;   --orange-tint: #FFF5E0;
  --pink: #ffb5d9;      --yellow: #ffc616;
  --cream: #FFF9EE;     --ink: #1A1A1A;
  --grey-500: #969696;  --grey-700: #6E6E6E;      --grey-100: #F2F2F2;
  --display: "Pangolin", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1080px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw + 1rem, 3.5rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.6rem, 3vw + 1rem, 2.4rem); margin: 0 0 .5em; }
h3 { font-size: 1.25rem; margin: .2em 0 .3em; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; }

a { color: var(--blue-strong); }
:focus-visible { outline: 3px solid var(--blue-strong); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  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: 12px; top: -60px; z-index: 20;
  background: #fff; color: var(--ink); padding: 12px 16px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem;
}
.brand img { display: block; }
.header-cta, .waitlist button, .cta a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff; font-family: var(--body); font-weight: 800;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 0 rgba(32,99,255,.28); transition: transform .08s, background .15s;
}
.header-cta:hover, .waitlist button:hover { background: var(--blue-strong); }
.header-cta:active, .waitlist button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(32,99,255,.28); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden;
  /* Static pastel gradient. Serves three jobs: base when JS/WebGL is off,
     the reduced-motion background, and what the mobile fade settles onto —
     so it reads like a still frame of the animated gradient above it. */
  background:
    radial-gradient(90% 80% at 12% 8%,  #EBD6FF 0%, transparent 60%),
    radial-gradient(80% 80% at 85% 0%,  #FFE1C2 0%, transparent 55%),
    radial-gradient(90% 90% at 70% 60%, #FFF2C2 0%, transparent 60%),
    radial-gradient(70% 80% at 30% 92%, #FFD3E7 0%, transparent 55%),
    var(--cream);
}
/* animated flowing gradient canvas (Riel's request) — sits behind hero content */
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; border: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.4s ease;    /* starts hidden, fades in after 1st render */
}
.hero__bg.is-in { opacity: 1; }                 /* set once the first frame has drawn */
.hero__bg.is-faded { opacity: 0; }              /* mobile auto-retire fade (wins over is-in) */
@media (prefers-reduced-motion: reduce) { .hero__bg { display: none; } }
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem; position: relative; z-index: 2; }
/* frosted card behind the hero copy — translucent (gradient still shows) but white
   enough that the text clears WCAG AA. Blur mutes the gradient for extra legibility;
   the rgba white alone carries contrast where backdrop-filter is unsupported. */
.hero__card {
  max-width: min(100%, 640px);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem 1.9rem;
  box-shadow: 0 10px 30px rgba(60, 40, 90, 0.10);
}
.hero__art { position: absolute; right: -40px; bottom: -30px; width: min(46%, 460px); opacity: .9; z-index: 1; pointer-events: none; }
.hero__art-img { width: 100%; }
.eyebrow { font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #00674C; font-size: .8rem; margin: 0 0 .4rem; }  /* deeper than --green-strong for AA on the card (brand green was 4.34:1) */
.lede { font-size: clamp(1.05rem, 1.2vw + .9rem, 1.35rem); max-width: 42ch; color: #5A5A5A; }  /* darker than --grey-700 for AA margin on the card */

/* ---------- waitlist form ---------- */
.waitlist { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.6rem 0 .6rem; max-width: 520px; }
.waitlist input {
  flex: 1 1 220px; min-height: 48px; padding: 0 1rem; font-size: 1rem;
  font-family: var(--body); border: 2px solid #d8d8d8; border-radius: 12px; background: #fff; color: var(--ink);
}
.waitlist input:focus-visible { border-color: var(--blue-strong); outline-offset: 1px; }
.waitlist input[aria-invalid="true"] { border-color: #BB2626; }
.waitlist__note { font-size: .9rem; color: var(--grey-700); max-width: 46ch; }
.waitlist__note--light { color: rgba(255,255,255,.9); }
.waitlist__status { min-height: 1.4rem; font-weight: 700; margin: .4rem 0 0; }
.waitlist__status.is-ok { color: var(--green-strong); }
.waitlist__status.is-err { color: #BB2626; }

/* --- waitlist temporarily hidden (body.no-waitlist); revert by removing the class --- */
.coming-soon-note { display: none; }
.no-waitlist .header-cta,
.no-waitlist .waitlist,
.no-waitlist .waitlist__note,
.no-waitlist #waitlist-status,
.no-waitlist #waitlist { display: none !important; }
.no-waitlist .coming-soon-note {
  display: inline-block; margin: 1.4rem 0 .2rem; padding: .7rem 1.2rem;
  background: var(--green-soft); color: var(--green-strong); font-weight: 800;
  border-radius: 999px; font-size: 1.05rem;
}

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.25rem; }

/* features */
.feature-grid { list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.feature { background: #fff; border-radius: var(--radius); padding: 1.5rem 1.4rem;
  box-shadow: 0 8px 24px rgba(30,40,80,.06); border: 1px solid #eee; }
.feature__icon { width: 30px; height: 30px; padding: 12px; border-radius: 14px;
  background: var(--blue); box-sizing: content-box; margin-bottom: .4rem; }
.feature:nth-child(2) .feature__icon { background: var(--green); }
.feature:nth-child(3) .feature__icon { background: var(--orange); }
.feature:nth-child(4) .feature__icon { background: #7a7ff0; }
.feature p { margin: 0; color: var(--grey-700); }

/* vision */
.vision { background: var(--orange-tint); border-radius: 28px; }
.vision__inner { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.vision__art { width: min(200px, 40%); flex-shrink: 0; }
.vision p:last-child { margin-bottom: 0; font-weight: 700; color: var(--green-strong); }

/* brought to you by — mirrors the game's footer bar (tertiary blue) */
.brought-by { background: var(--tertiary); text-align: center; padding: 2.6rem 1.25rem; }
.brought-by__label { color: #fff; font-family: var(--display); font-size: 1.5rem; margin: 0 0 1.3rem; }
.brought-by__logos { display: flex; justify-content: center; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.brought-by__logos img {
  height: 66px; width: auto; max-width: 210px; object-fit: contain;
  background: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
@media (max-width: 640px) { .brought-by__logos img { height: 50px; padding: 10px 14px; } }

/* cta band */
.cta { max-width: none; background: linear-gradient(135deg, var(--green-strong), var(--blue)); color: #fff; text-align: center; border-radius: 0; }
.cta h2, .cta p { color: #fff; }
.cta .waitlist { margin-inline: auto; justify-content: center; }
.cta button { background: #fff; color: var(--blue-strong); box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.cta button:hover { background: var(--orange-tint); }

/* footer */
.site-footer { text-align: center; padding: 2.5rem 1.25rem; color: var(--grey-700); }
.footer-links { display: flex; gap: 1.2rem; justify-content: center; margin: .8rem 0; flex-wrap: wrap; }
.footer-copy { font-size: .85rem; color: var(--grey-500); }

@media (max-width: 640px) {
  .hero__art { opacity: .35; width: 70%; right: -10%; }
  .header-cta { display: none; }
}
@media (prefers-contrast: more) {
  .feature, .waitlist input { border-color: var(--ink); }
}
