/* ── PiggyBankMath Landing Page (marketing, index.html) ──────────────────────
   Loads alongside shared.css. Everything here is prefixed .lp- because the app's
   own stylesheets are global and unprefixed: kid.css already owns bare `.hero`,
   and session-complete.css set the precedent (.earned-hero) of prefixing rather
   than reusing it. Shared components (.btn, .btn--primary, .btn--accent) are
   reused as-is and deliberately not restyled here.

   The app is mobile-first with fixed max-width containers and exactly ONE width
   breakpoint (480px, for the PIN sheet). A marketing page needs a real desktop
   layout, so this file introduces 720px and 1040px. Those two are local to the
   landing page and are not a pattern the app pages follow.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Layout primitives ────────────────────────────────────────────────────── */
.lp {
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.lp-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.lp-wrap--narrow { max-width: 680px; }

.lp-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-parent-primary);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 800;
  z-index: 10;
}
.lp-skip:focus { left: 0; }

/* Section headings. 900 weight matches every display element in the app
   (brand lockup, money amounts, problem text). */
.lp-h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}
.lp-h2--onblue { color: var(--color-parent-dark); }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.lp-nav {
  padding: var(--space-lg) 0;
}
.lp-nav__inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
/* Same two-tone lockup as auth.css's .auth-brand__logo: parent-blue name,
   hot-pink "Math". The parent-header opacity-dim variant is specific to
   sitting on the solid blue band and is wrong on a light background. */
.lp-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-parent-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.lp-brand span { color: var(--color-primary); }

.lp-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.lp-nav__link {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.lp-nav__link:hover { color: var(--color-parent-primary); }
.lp-nav__links .lp-nav__link:last-child { color: var(--color-parent-primary); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.lp-hero {
  padding: var(--space-xl) 0 var(--space-2xl);
}
.lp-hero__inner {
  width: 100%;
  max-width: 1140px; /* wider than .lp-wrap so the headline gets a full line */
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.lp-hero__title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  /* Each sentence is meant to land as one line. Without this the first one
     broke after "the", orphaning "math." on a line by itself. */
  text-wrap: balance;
}
.lp-hero__sub {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 34em;
  margin-bottom: var(--space-xl);
}
.lp-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}
.lp-textlink {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.lp-textlink:hover { color: var(--color-parent-primary); }
.lp-hero__micro {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* The hero art is the kid's actual balance screen, not an abstract
   illustration: it is the thing the parent is being asked to picture. */
.lp-hero__art { display: flex; justify-content: center; }
.lp-bank {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  text-align: center;
  width: 100%;
  max-width: 320px;
}
.lp-bank__pig {
  width: 132px;
  height: 132px;
  display: block;
  margin: 0 auto var(--space-sm);
  animation: lp-float 3.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes lp-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.lp-bank__label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.lp-bank__amount {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.03em;
}
.lp-bank__cur {
  font-size: 2rem;
  color: var(--color-primary);
  vertical-align: super;
  margin-right: 2px;
}
.lp-bank__streak {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-muted);
}
.lp-bank__streak strong { color: var(--color-text); }

/* ── How it works: three beats ────────────────────────────────────────────── */
.lp-how {
  background: var(--color-surface);
  border-top: 1.5px solid var(--color-border);
  border-bottom: 1.5px solid var(--color-border);
  padding: var(--space-2xl) 0;
}
.lp-beats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}
/* Deliberately NOT a row of identical feature cards. Each beat is a two-column
   split that alternates side on desktop, so the eye zig-zags down the sequence
   instead of scanning three interchangeable tiles. */
.lp-beat {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.lp-beat__label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}
.lp-beat__head {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.lp-beat__body {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 38em;
}
.lp-beat__art { display: flex; justify-content: center; }

/* ── Mock product fragments ───────────────────────────────────────────────── */
.lp-mock {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  width: 100%;
  max-width: 300px;
  box-shadow: var(--shadow-sm);
}
.lp-mock__title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* practice */
.lp-mock__bar {
  height: 8px;
  background: #EEEEFF;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.lp-mock__bar span {
  display: block;
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}
.lp-mock__meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.lp-mock__problem {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: var(--space-md);
}
.lp-mock__answer {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.lp-mock__fast {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-accent-dark);
}

/* ledger */
.lp-mock__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.lp-mock__row b { color: var(--color-success-dark); font-weight: 800; }
.lp-mock__row--cap b { color: var(--color-text-muted); }
.lp-mock__row--total {
  border-bottom: none;
  border-top: 2px solid var(--color-border);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 800;
}
.lp-mock__row--total b { color: var(--color-parent-primary); font-size: 1.1rem; }

/* payout */
.lp-mock__big {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-parent-primary);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}
.lp-mock__big span { font-size: 1.4rem; vertical-align: super; }
.lp-mock__payrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.lp-mock__input {
  flex: 1;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px var(--space-md);
  font-weight: 800;
  font-size: 0.95rem;
}
.lp-mock__btn {
  background: var(--color-parent-primary);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 10px var(--space-md);
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ── Trust ────────────────────────────────────────────────────────────────── */
.lp-trust {
  background: var(--color-parent-bg);
  padding: var(--space-2xl) 0;
}
/* An editorial numbered list, not a 2x2 card grid: the numerals carry the
   structure so no box is needed, and each item can run to its natural length
   instead of being padded out to match its neighbours. */
.lp-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.lp-point {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}
.lp-point__num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-parent-primary);
  opacity: 0.45;
  flex-shrink: 0;
  min-width: 2.2ch;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.lp-point__head {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  color: var(--color-parent-dark);
}
.lp-point__body {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--color-text);
  opacity: 0.78;
  max-width: 40em;
}

/* ── The honest bit ───────────────────────────────────────────────────────── */
.lp-honest { padding: var(--space-2xl) 0; }
.lp-honest__body {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  max-width: 36em;
}
.lp-honest__sig {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-text-muted);
  padding-top: var(--space-md);
  border-top: 1.5px solid var(--color-border);
  max-width: 36em;
}

/* ── Closing CTA ──────────────────────────────────────────────────────────── */
/* The one fully saturated surface on the page, and it lands on the parent-blue
   because the parent is who signs up. Gold button for maximum contrast on it. */
.lp-close {
  background: var(--color-parent-primary);
  padding: var(--space-2xl) 0;
  text-align: center;
}
.lp-close__head {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.lp-close__sub {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  color: #fff;
  opacity: 0.88;
  margin: 0 auto var(--space-xl);
  max-width: 30em;
}
.lp-close__btn { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.lp-close__micro {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  opacity: 0.8;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.lp-foot {
  background: var(--color-bg);
  padding: var(--space-xl) 0;
  text-align: center;
}
.lp-foot__tag {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}
.lp-foot__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.lp-foot__links a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
}
.lp-foot__links a:hover { color: var(--color-parent-primary); }
.lp-foot__copy {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ── Legal pages (privacy-policy.html, terms-conditions.html) ─────────────── */
/* Long-form reading, so the measure is capped well under the 1040px wrap and
   the type is a step larger than the landing page's body copy. */
.lp-legal { padding: var(--space-xl) 0 var(--space-2xl); }
.lp-legal__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}
.lp-legal__updated {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}
.lp-legal__lead {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-text);
  padding: var(--space-lg);
  background: var(--color-parent-bg);
  border: 1.5px solid var(--color-parent-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}
.lp-legal h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--color-parent-dark);
}
.lp-legal h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: var(--space-lg) 0 var(--space-sm);
}
.lp-legal p,
.lp-legal li {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--color-text);
  max-width: 68ch;
}
.lp-legal p { margin-bottom: var(--space-md); }
.lp-legal ul { margin: 0 0 var(--space-md) var(--space-lg); }
.lp-legal li { margin-bottom: var(--space-sm); }
.lp-legal strong { font-weight: 800; }
.lp-legal a { color: var(--color-parent-primary); font-weight: 700; }
.lp-legal__note {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.65;
  color: var(--color-warning-text);
  background: var(--color-warning-bg);
  border: 1.5px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  max-width: 68ch;
}

/* ── Effort, not grades (index.html) ──────────────────────────────────────── */
/* Sits between the trust points and the honest note, because it is the answer
   to the objection those two raise between them. Surface + hairline rules is
   .lp-how's treatment reused, not a fourth section style: the page alternates
   surface / parent-bg / surface / bg / parent-primary down its length. */
.lp-effort {
  background: var(--color-surface);
  border-top: 1.5px solid var(--color-border);
  border-bottom: 1.5px solid var(--color-border);
  padding: var(--space-2xl) 0;
}
.lp-effort__label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}
.lp-effort__body {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  max-width: 36em;
}
.lp-effort__body:last-child { margin-bottom: 0; }
.lp-effort__body strong { font-weight: 800; }

/* ── Content articles ─────────────────────────────────────────────────────── */
/* The guide pages reuse .lp-legal wholesale for the reading column: same 68ch
   measure, same heading scale, same link colour. An article page carries BOTH
   classes on <main> (class="lp-legal lp-article"), so only the parts a legal
   page has no use for live here. */
.lp-article__eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* The in-article CTA. Reuses .lp-legal__lead's parent-bg card rather than
   introducing a second boxed treatment inside the same reading column. */
.lp-article__cta {
  background: var(--color-parent-bg);
  border: 1.5px solid var(--color-parent-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  max-width: 68ch;
}
.lp-article__cta-head {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--color-parent-dark);
  margin-bottom: var(--space-sm);
}
.lp-article__cta p {
  margin-bottom: var(--space-lg);
  color: var(--color-text);
  opacity: 0.85;
}

.lp-article__related {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1.5px solid var(--color-border);
  max-width: 68ch;
}
.lp-article__related-head {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
/* Overrides .lp-legal ul's indent — these are navigation, not prose bullets. */
.lp-article__related ul {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.lp-article__related li { margin-bottom: 0; }
.lp-article__related a {
  color: var(--color-parent-primary);
  font-weight: 700;
}

/* ── Focus visibility ─────────────────────────────────────────────────────── */
.lp a:focus-visible,
.lp .btn:focus-visible {
  outline: 3px solid var(--color-parent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.lp-close a:focus-visible { outline-color: #fff; }

/* ── Tablet ───────────────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .lp-h2         { font-size: 2.2rem; }
  .lp-hero__title { font-size: 3.2rem; }
  .lp-hero       { padding: var(--space-2xl) 0; }
  .lp-hero__actions {
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
  }
  .lp-beat {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }
  .lp-beat__text { flex: 1 1 55%; }
  .lp-beat__art  { flex: 1 1 45%; }
  .lp-beat--flip { flex-direction: row-reverse; }
  .lp-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl) var(--space-2xl);
  }
  .lp-close__head { font-size: 2.5rem; }
}

/* ── Desktop ──────────────────────────────────────────────────────────────── */
@media (min-width: 1040px) {
  .lp-hero__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2xl);
  }
  .lp-hero__copy { flex: 1 1 60%; }
  .lp-hero__art  { flex: 1 1 40%; }
  .lp-hero__title { font-size: 2.9rem; }
  .lp-bank { max-width: 340px; }
}

/* ── Motion ───────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .lp-bank__pig { animation: none; }
  .lp * { transition-duration: 0.01ms !important; }
}
