/* Jarful — marketing + auth pages */
:root {
  color-scheme: light;
  --ink: #17233F;
  --paper: #F6F8FB;
  --white: #FFFFFF;
  --sky: #D7E8F7;
  --sky-strong: #4FA3E0;
  --coin: #F4B400;
  --coin-light: #FCE9A8;
  --coin-deep: #C99400;
  --mint: #2F9E6E;
  --mint-light: #DDF2E7;
  --berry: #E0457B;
  --muted: #55627D;
  --line: #D5DDE8;
  --danger: #C4314B;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--body);
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky-strong); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.7rem, 6.2vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ---------- Buttons: pressable stickers ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 1.05rem/1 var(--body);
  padding: .95rem 1.4rem;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active, .btn.is-pressed { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-coin { background: var(--coin); color: var(--ink); }
.btn-plain { background: var(--white); color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Nav ---------- */
.nav { padding: 18px 0; }
.nav .wrap { display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.55rem/1 var(--display); letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 34px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 700; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.nav .btn { padding: .7rem 1.1rem; font-size: .98rem; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 90px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 11ch; }
.hero .lede { margin-top: 1.4rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-note { margin-top: 1.1rem; font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

/* Hero demo: approve → coin → jar */
.demo {
  position: relative;
  background: var(--sky);
  border-radius: 36px 36px 36px 8px;
  padding: 32px 28px 26px;
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 18px;
  align-items: end;
}
@media (max-width: 480px) { .demo { grid-template-columns: 1fr; justify-items: center; } }
.chore-card {
  align-self: start;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 16px 16px 14px;
  width: 100%;
}
.chore-who { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: var(--muted); }
.chore-who .av { width: 32px; height: 32px; border-radius: 50%; background: #FFE3EE; display: grid; place-items: center; font-size: 1.1rem; }
.chore-title { font: 800 1.35rem/1.15 var(--display); margin: .7rem 0 .2rem; letter-spacing: -0.015em; }
.chore-pay { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; padding: .35rem .7rem; border-radius: 999px; margin-top: .8rem; }
.pill-wait { background: var(--coin-light); color: #6B5200; }
.pill-ok { background: var(--mint-light); color: #1C6B49; }
.chore-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.chore-actions .btn { padding: .6rem .9rem; font-size: .9rem; box-shadow: 0 3px 0 var(--ink); }
.demo .btn-approve { background: var(--mint); color: var(--white); }
.chore-paid { display: none; margin-top: .9rem; padding: .6rem 0 .15rem; font-weight: 700; color: var(--muted); border-top: 1.5px dashed var(--line); }
.demo .chore-card.is-approved .chore-actions { display: none; }
.demo .chore-card.is-approved .chore-paid { display: block; }

.jar-box { text-align: center; }
.jar-box svg { width: 170px; height: auto; overflow: visible; }
.jar-balance { font: 800 2rem/1 var(--display); margin-top: .4rem; letter-spacing: -0.02em; }
.jar-label { font-size: .9rem; color: var(--muted); }
#drop-coin { opacity: 0; }
.demo.is-dropping #drop-coin { animation: coinDrop .7s cubic-bezier(.45,.05,.7,.4) forwards; }
@keyframes coinDrop {
  0%   { opacity: 0; transform: translateY(-150px); }
  15%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
#new-coin { opacity: 0; transition: opacity .2s; }
.demo.is-landed #new-coin { opacity: 1; }
.demo.is-landed #drop-coin { opacity: 0; animation: none; }
.replay { position: absolute; right: 18px; top: 14px; background: none; border: 0; font: 700 .85rem var(--body); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-sky { background: var(--sky); }
.section-coin { background: var(--coin-light); }
.section-ink { background: var(--ink); color: var(--white); }
.section-head { max-width: 36rem; margin-bottom: 48px; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.15rem; }
.section-ink .section-head p { color: #C7D1E4; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; gap: 36px; } .split.flip > :first-child { order: 0; } }

/* Steps: a real sequence, laid out like a fridge strip */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2.5px solid var(--ink); }
.steps li { padding: 26px 22px 0 0; position: relative; }
.steps li + li { padding-left: 22px; border-left: 1.5px dashed var(--line); }
.step-n {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font: 800 1.2rem/1 var(--display);
  background: var(--coin); border: 2.5px solid var(--ink);
  position: absolute; top: -23px;
}
.steps h3 { margin: 1.2rem 0 .5rem; }
.steps p { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; border-top: 0; }
  .steps li, .steps li + li { border-left: 0; padding: 26px 0 0; border-top: 2.5px solid var(--ink); }
  .steps li:nth-child(even) { padding-left: 0; }
}
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

.illus { width: 100%; height: auto; }

/* Two screens */
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .screens { grid-template-columns: 1fr; } }
.screen-wrap h3 { margin-bottom: .4rem; }
.screen-wrap > p { color: var(--muted); margin-bottom: 1.2rem; font-size: 1rem; max-width: 40ch; }
.screen {
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  padding: 16px;
  max-width: 400px;
}
.switcher { display: flex; gap: 6px; padding-bottom: 14px; border-bottom: 1.5px solid var(--line); }
.sw { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; font-weight: 700; padding: 6px 2px; border-radius: 12px; color: var(--muted); }
.sw span:first-child { font-size: 1.35rem; line-height: 1.2; }
.sw.on { background: var(--sky); color: var(--ink); }
.screen-balance { padding: 16px 4px 10px; }
.screen-balance b { display: block; font: 800 2.3rem/1 var(--display); letter-spacing: -0.02em; }
.screen-balance small { color: var(--muted); font-size: .9rem; }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-top: 1.5px solid var(--line); font-size: .98rem; }
.row .grow { flex: 1; min-width: 0; }
.row .sub { display: block; color: var(--muted); font-size: .84rem; }
.chip { font-size: .8rem; font-weight: 700; padding: .35rem .65rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); white-space: nowrap; }
.chip-done { background: var(--mint); color: var(--white); border-color: var(--mint); }
.chip-wait { background: var(--coin-light); border-color: var(--coin-light); color: #6B5200; }
.chip-back { background: #FFE3EE; border-color: #FFE3EE; color: #9A1D4C; }
.screen .btn { padding: .75rem 1rem; font-size: .95rem; margin-top: 12px; box-shadow: 0 3px 0 var(--ink); }
.inbox-title { font: 800 1.2rem/1.2 var(--display); padding: 14px 4px 6px; display: flex; align-items: center; gap: .5rem; }
.count { background: var(--berry); color: var(--white); font: 700 .8rem/1 var(--body); padding: .3rem .5rem; border-radius: 999px; }
.req { border-top: 1.5px solid var(--line); padding: 12px 4px; }
.req .warn { display: block; font-size: .84rem; color: #8A4B00; margin-top: 2px; }
.req-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mini { font: 700 .82rem/1 var(--body); padding: .5rem .75rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); }
.mini-ok { background: var(--mint); color: var(--white); }

/* Ledger receipt */
.receipt {
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 26px 26px 34px;
  max-width: 420px;
  margin-inline: auto;
  transform: rotate(-1.5deg);
  position: relative;
  --tooth: 14px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
}
.receipt h3 { text-align: center; font-size: 1.15rem; }
.receipt .who { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.receipt table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.receipt td { padding: 7px 0; border-bottom: 1.5px dashed var(--line); vertical-align: top; }
.receipt td:first-child { color: var(--muted); width: 4.2rem; font-size: .88rem; padding-top: 9px; }
.receipt td:last-child { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 10px; }
.receipt .plus { color: var(--mint); }
.receipt .minus { color: var(--ink); }
.receipt tfoot td { border-bottom: 0; padding-top: 14px; font: 800 1.3rem/1 var(--display); color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; }
.facts li { padding-left: 2.2rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .25rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--coin); border: 2.5px solid var(--ink); }
.facts b { display: block; font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.01em; }
.facts span { color: var(--muted); }

/* Tablet switcher showcase */
.big-switcher { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.face {
  width: 112px; padding: 16px 8px 12px; border-radius: 22px;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.18);
  text-align: center; font-weight: 700;
}
.face .e { font-size: 2.6rem; line-height: 1.1; display: block; }
.face small { display: block; color: #AFBBD3; font-weight: 400; font-size: .82rem; margin-top: 2px; }
.face.parent { border-color: var(--coin); }
.ink-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.ink-points b { display: block; font-family: var(--display); font-size: 1.2rem; }
.ink-points span { color: #C7D1E4; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font: 700 1.2rem/1.3 var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.8rem; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* Final CTA */
.final { text-align: center; }
.final h2 { max-width: 16ch; margin-inline: auto; }
.final p { margin: 1rem auto 2rem; color: var(--muted); font-size: 1.15rem; max-width: 40ch; }
.final .hero-ctas { justify-content: center; }

.footer { padding: 36px 0 48px; border-top: 2px solid var(--line); font-size: .95rem; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer nav { margin-left: auto; display: flex; gap: 1.5rem; }
.footer a { text-decoration: none; font-weight: 700; color: var(--ink); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; }
.auth-side { background: var(--sky); padding: 32px 48px 48px; display: flex; flex-direction: column; }
.auth-side .brand { margin-bottom: auto; }
.auth-side .side-art { margin: 40px auto 28px; width: min(340px, 100%); }
.auth-side h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 14ch; }
.auth-side p { margin-top: .8rem; color: var(--muted); max-width: 34ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); }
.auth-card .sub { margin: .6rem 0 2rem; color: var(--muted); }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: inline-flex; }
}

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; margin-bottom: .4rem; }
.field .hint { display: block; font-size: .88rem; color: var(--muted); margin-top: .35rem; }
.input-wrap { position: relative; }
.field input {
  width: 100%;
  font: 400 1.05rem/1.3 var(--body);
  padding: .85rem 1rem;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
}
.field input:focus { outline: none; box-shadow: 0 0 0 4px var(--sky); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .err { display: block; color: var(--danger); font-size: .9rem; font-weight: 700; margin-top: .35rem; }
.reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: 700 .88rem var(--body); color: var(--muted); cursor: pointer; padding: .4rem .5rem; }
.input-wrap input[type="password"], .input-wrap input.has-reveal { padding-right: 4.5rem; }
.meter { height: 6px; border-radius: 999px; background: var(--line); margin-top: .5rem; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }

.alert { border: 2.5px solid var(--ink); border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1.4rem; font-weight: 700; }
.alert-error { background: #FFE6EA; border-color: var(--danger); color: #8C1D31; }
.alert-info { background: var(--coin-light); }
.alert[hidden] { display: none; }
.switch-auth { margin-top: 1.6rem; text-align: center; color: var(--muted); }
.switch-auth a { font-weight: 700; color: var(--ink); }
.kid-note { margin-top: 2rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--white); border: 1.5px dashed var(--line); font-size: .95rem; color: var(--muted); }
.tz-line { font-size: .9rem; color: var(--muted); margin: -.3rem 0 1.3rem; }

.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; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
