/* Kaboom Cardio website: one shared stylesheet, no framework. Colours follow the app (lib/ui/design/tokens.dart):
   ink, canvas, the warm peach pastels, and Kaboom Blue (C.blue #3F5EF5) as the accent. WCAG AA (4.5:1 for text):
   white on blue 5.1, blue on canvas 4.7, blue on white 5.1. Blue on peach is only 3.9-4.2, so links on the peach
   areas use the app's pressed blue (C.bluePressed #2B45C9: 5.7-6.2). Dark mode: #8EA2FF (6.0-7.7). */
:root {
  --ink: #17152b;
  --text: #3f3b52;
  --muted: #5e5a73;
  --bg: #f7f5f2;
  --card: #ffffff;
  --peach: #ffe3da;
  --peach-2: #ffd9cc;
  --blue: #3f5ef5;
  --blue-deep: #2b45c9;
  --on-blue: #ffffff;
  --line: #e4e0ea;
  --radius: 22px;
  --wrap: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f2ff;
    --text: #d6d2e4;
    --muted: #b9b4cc;
    --bg: #15131f;
    --card: #1f1c2c;
    --peach: #2a2032;
    --peach-2: #33243a;
    --blue: #8ea2ff;
    --blue-deep: #8ea2ff;
    --on-blue: #15131f;
    --line: #2e2a3d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(32px, 6vw, 52px); margin: 8px 0 10px; letter-spacing: -0.5px; }
h2 { font-size: 24px; margin: 40px 0 12px; }
h3 { font-size: 19px; margin: 0 0 6px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: 760px; padding-top: 8px; padding-bottom: 56px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 8px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }

/* legal pages (bodies unchanged) */
.updated { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }

/* landing */
.home { padding-bottom: 56px; }
.hero {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  background: linear-gradient(160deg, var(--peach) 0%, var(--peach-2) 100%);
  border-radius: 28px; padding: 36px 36px 0; margin-top: 24px; overflow: hidden;
}
.hero-text { padding-bottom: 36px; }
.pitch { font-size: 21px; color: var(--ink); font-weight: 600; margin: 0 0 10px; }
.hero-coach { width: 190px; align-self: end; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid .card { margin: 0; }
.plan ul { padding-left: 20px; }
.plan.pro { border: 2px solid var(--blue); }
.small { font-size: 14px; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: var(--on-blue);
  font-weight: 800; margin-bottom: 8px;
}
.steps strong { display: block; color: var(--ink); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 12px 0; }
.faq details p { margin: 0 0 14px; }
.note { background: var(--peach); border-radius: var(--radius); padding: 4px 22px 10px; margin-top: 40px; }
.note h2 { margin-top: 18px; font-size: 20px; }
.hero a:not(.text-button), .note a { color: var(--blue-deep); } /* text on peach: the deeper blue keeps AA */

/* store buttons (filled from store-links.json; empty = nothing at all) */
.store { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.store:empty { display: none; }
.store a { display: inline-block; line-height: 0; }
.store img { height: 54px; width: auto; }
.store a.text-button {
  line-height: 1.2; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700;
  border-radius: 14px; padding: 16px 20px; min-height: 54px;
}

/* footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 28px 22px 0; text-align: left; }
  .hero-coach { width: 140px; justify-self: end; margin-top: -12px; }
  .hero-text { padding-bottom: 8px; }
  .grid, .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
