/* ──────────────────────────────────────────────────────────────
   Lumi — alphaintellabs.com/lumi/

   The colour tokens below are lifted from the app's own
   globals.css (marble-tutor/src/app/globals.css), and the type
   pairing is the app's: Fredoka for display, Nunito for body.
   Same warm paper, same ink, same leaf green and sun yellow.
   Change one in the app and change it here too.
   ────────────────────────────────────────────────────────────── */

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

:root {
  /* App tokens — do not drift from globals.css */
  --paper:       #faf6ee;
  --ink:         #2b2740;
  --ink-soft:    #756f8d;
  --leaf:        #2f9e63;
  --leaf-bright: #3ab173;
  --leaf-deep:   #1e7c49;
  --sun:         #ffb524;
  --sun-bright:  #ffc94f;
  --sun-deep:    #c98800;
  --berry:       #e85d75;
  --slate:       #aaa4bd;
  --card:        #ffffff;

  /* The four words of the tagline, in the app's own colours */
  --learn:      #c14417;
  --understand: #0a8478;
  --master:     #5a3fd0;
  --imagine:    #c23764;

  --hair: rgba(43, 39, 64, .08);

  --display: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans:    'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1080px;
  --read: 720px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--paper);
  /* The app's faint sunrise glow at the top of the page */
  background-image: radial-gradient(64rem 26rem at 50% -10rem, rgba(255, 181, 36, .09), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--leaf-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: rgba(255, 181, 36, .35); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.read { max-width: var(--read); margin: 0 auto; padding: 0 1.5rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1rem; border-radius: 0 0 10px 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ── Typography ─────────────────────────────────────────────── */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.12; color: var(--ink); }

h1 { font-size: clamp(2.5rem, 6.2vw, 4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 700; }

.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sun-deep);
  margin-bottom: 1rem;
}

.tagline {
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.tagline .l { color: var(--learn); }
.tagline .u { color: var(--understand); }
.tagline .m { color: var(--master); }
.tagline .i { color: var(--imagine); }
.tagline .dot { color: var(--slate); }

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

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .85rem 1.5rem;
  border-radius: 1.15rem;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-ghost {
  background: var(--card);
  border-color: var(--hair);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(43, 39, 64, .05);
}

/* App Store badge placeholder — inert until the listing is live. Swap the
   <span> for an <a href="https://apps.apple.com/…"> once Lumi is approved. */
.btn-store {
  background: var(--ink);
  color: var(--paper);
  cursor: default;
  padding: .7rem 1.25rem .7rem 1.05rem;
  border-radius: 14px;
  text-align: left;
  line-height: 1.15;
}
.btn-store:hover { transform: none; }
.btn-store svg { flex-shrink: 0; }
.btn-store .small {
  display: block;
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(250, 246, 238, .7);
}
.btn-store .big { display: block; font-size: 1.125rem; font-weight: 500; }

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(250, 246, 238, .85);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand .sub {
  font-family: var(--sans);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-left: .2rem;
  align-self: center;
}

.site-nav ul { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.site-nav a { font-size: .875rem; font-weight: 700; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 860px) { .site-nav .hide-sm { display: none; } }
@media (max-width: 520px) {
  .brand .sub { display: none; }
  .site-nav ul { gap: 1rem; }
}

/* ── Sections ───────────────────────────────────────────────── */

.section { padding: 5.5rem 0; }
[id] { scroll-margin-top: 84px; }
.section + .section { border-top: 1px solid var(--hair); }

.section-head { max-width: 48ch; margin-bottom: 3rem; }
.section-head p { margin-top: 1rem; }

/* ── Hero ───────────────────────────────────────────────────── */

.hero { padding: 4.5rem 0 4.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 320px);
  gap: 4rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; align-items: center; }
.hero-note { margin-top: 1.25rem; font-size: .875rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { justify-self: center; }
}

/* ── Real screenshots in a plain phone edge ─────────────────── */

.phone {
  width: 300px;
  border-radius: 40px;
  padding: 8px;
  background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(43, 39, 64, .55), 0 0 0 1px rgba(43, 39, 64, .1);
  line-height: 0;
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 32px;
  display: block;
  background: var(--paper);
}

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
}
.shot .phone { width: 100%; max-width: 250px; margin: 0 auto; border-radius: 34px; padding: 6px; }
/* One frame height for every screen. The island-path shot is a little
   shorter (the app header was trimmed off it), so it fills from the top. */
.shot .phone img { border-radius: 28px; aspect-ratio: 780 / 1688; object-fit: cover; object-position: top center; }
.shot figcaption {
  margin-top: 1.1rem;
  font-size: .9375rem;
  color: var(--ink-soft);
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
}
.shot figcaption strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.125rem; margin-bottom: .15rem; }

@media (max-width: 980px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; } }
@media (max-width: 520px) {
  .shots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    gap: 1.25rem;
  }
  .shot { flex: 0 0 76%; scroll-snap-align: center; }
}

/* ── Cards ──────────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }

.card {
  background: var(--card);
  border-radius: 1.4rem;
  border: 1px solid rgba(43, 39, 64, .06);
  box-shadow: 0 1px 2px rgba(43, 39, 64, .04), 0 16px 40px -28px rgba(43, 39, 64, .35);
  padding: 1.75rem;
}
.card h3 { margin-bottom: .2rem; }
.card .card-sub {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  margin-bottom: .9rem;
}
.card p { font-size: 1rem; }

/* ── The eight worlds ───────────────────────────────────────── */

.worlds {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--hair);
}
.worlds li {
  padding: 1.1rem 0 1.1rem 1.4rem;
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.worlds li::before {
  content: '';
  position: absolute;
  left: 0; top: 1.5rem;
  width: .65rem; height: .65rem;
  border-radius: 50%;
  background: var(--c, var(--sun));
}
.worlds .w { display: block; font-family: var(--display); font-size: 1.1875rem; font-weight: 600; color: var(--ink); }
.worlds .s { display: block; font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.worlds .t { display: block; margin-top: .3rem; font-size: .9375rem; color: var(--ink-soft); }

/* ── Numbers strip ──────────────────────────────────────────── */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--hair);
  border-radius: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--hair);
}
.figure { background: var(--card); padding: 1.6rem 1.25rem; text-align: center; }
.figure .n { font-family: var(--display); font-size: 2.5rem; font-weight: 600; color: var(--leaf-deep); line-height: 1; }
.figure .l { margin-top: .5rem; font-size: .875rem; color: var(--ink-soft); }

/* ── Grown-ups strip ────────────────────────────────────────── */

.grownups {
  background: rgba(255, 181, 36, .08);
  border-top: 1px solid rgba(201, 136, 0, .18);
  border-bottom: 1px solid rgba(201, 136, 0, .18);
  padding: 3.5rem 0;
}
.grownups h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.grownups p { margin-bottom: .85rem; max-width: 68ch; }
.grownups p:last-child { margin-bottom: 0; }

/* ── CTA ────────────────────────────────────────────────────── */

.cta { padding: 6rem 0; text-align: center; }
.cta h2 { margin-bottom: 1.25rem; }
.cta .lede { margin: 0 auto 2.25rem; text-align: center; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--hair); padding: 2.5rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.site-footer p { font-size: .875rem; color: var(--ink-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; }
.footer-links a { font-size: .875rem; font-weight: 700; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); text-decoration: none; }

/* ── Legal pages ────────────────────────────────────────────── */

.legal { padding: 3.5rem 0 5rem; }
.legal .legal-head { margin-bottom: 3rem; }
.legal .kicker {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--leaf-deep);
  margin-bottom: .75rem;
}
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: .75rem; }
.legal .dates { font-size: .875rem; color: var(--ink-soft); }

.legal .intro {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid rgba(43, 39, 64, .06);
  border-radius: 1.4rem;
  box-shadow: 0 16px 40px -30px rgba(43, 39, 64, .35);
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.4rem;
  color: var(--ink);
  margin: 3rem 0 .85rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--hair);
}
.legal h3 { font-size: 1.125rem; margin: 1.75rem 0 .5rem; }

.legal p { margin-bottom: 1rem; line-height: 1.75; }
.legal ul, .legal ol { margin: 0 0 1.25rem 0; padding-left: 1.35rem; }
.legal li { color: var(--ink-soft); margin-bottom: .5rem; line-height: 1.7; }
.legal li::marker { color: var(--sun-deep); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

.legal .toc {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 1.4rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
}
.legal .toc p {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .75rem;
}
.legal .toc ol { columns: 2; column-gap: 2rem; margin: 0; padding-left: 1.1rem; }
.legal .toc li { font-size: .9375rem; margin-bottom: .35rem; break-inside: avoid; }
.legal .toc a { color: var(--ink-soft); text-decoration: none; }
.legal .toc a:hover { color: var(--ink); }

.legal .note {
  border-left: 3px solid var(--sun);
  padding: .35rem 0 .35rem 1.15rem;
  margin: 1.5rem 0;
  color: var(--ink);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 1.5rem;
  font-size: .9375rem;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .75rem .7rem 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-soft);
}
.legal th { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1rem; }
.legal td:first-child { color: var(--ink); font-weight: 700; }

.legal .contact {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 1.4rem;
}
.legal .contact p { margin-bottom: .25rem; }

@media (max-width: 640px) {
  .legal .toc ol { columns: 1; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; width: 100%; }
  .legal thead { display: none; }
  .legal tr { padding: .6rem 0; border-bottom: 1px solid var(--hair); }
  .legal td { border: none; padding: .15rem 0; }
}

/* ── Motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .btn:hover { transform: none; }
}

/* ── Small screens ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .hero { padding: 3rem 0; }
  .phone { width: 270px; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
