/* Gainsmith website. Same tokens as the app (Theme.swift): WCAG 2.2 AA in light and dark. No tracking,
   no third-party requests: fonts are served from this site. */

@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/assets/fonts/Archivo-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url("/assets/fonts/ArchivoExpanded-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url("/assets/fonts/ArchivoExpanded-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --raised: #EDEFF2;
  --line: rgba(0, 0, 0, 0.09);
  --fg: #14161B;
  --muted: #4F5869;
  --faint: #5B6473;
  --accent: #A9380E;            /* text and links: 6.1:1 on the page */
  --accent-soft: rgba(169, 56, 14, 0.08);
  --cta: #FF7547;               /* big actions, always with --on-cta text (7.4:1) */
  --on-cta: #0E0F13;
  --ready: #147048;
  --recovering: #895800;
  --fatigued: #B3101E;
  --map-base: #DDE1E7;
  --map-muscle: #737C8E;
  --map-edge: #F4F5F7;
  --stage: #14161B;
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.06), 0 12px 32px rgba(16, 18, 24, 0.08);
  --display: "Archivo Expanded", "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r: 14px;
  --r-sm: 10px;
  --wrap: 1120px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F13;
    --surface: #16181E;
    --raised: #1F222A;
    --line: rgba(255, 255, 255, 0.08);
    --fg: #F2F4F8;
    --muted: #A3ACBA;
    --faint: #8A93A3;
    --accent: #FF7547;
    --accent-soft: rgba(255, 117, 71, 0.11);
    --ready: #3DDC97;
    --recovering: #FFB020;
    --fatigued: #FF7480;
    --map-base: #262A33;
    --map-muscle: #717B8D;
    --map-edge: #0E0F13;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
ul { margin: 0; padding: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cta); color: var(--on-cta); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  font: 600 12px/1.3 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { font: 800 15px/1 var(--display); letter-spacing: 0.22em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 12px; border-radius: 8px; }
.nav a:hover { background: var(--raised); }
.nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-cta { background: var(--cta); color: var(--on-cta); }
.btn-cta:hover { background: #FF8D63; text-decoration: none; }
.btn-quiet { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--raised); }
.btn svg { width: 18px; height: 18px; flex: none; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font: 600 13px/1.2 var(--body);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 70px); margin-top: 20px; overflow-wrap: anywhere; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); max-width: 34em; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { margin-top: 18px; font-size: 14px; color: var(--faint); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The stage: the app's dark demo surface, in both appearances. */
.stage {
  position: relative; display: flex; flex-direction: column;
  background: var(--stage); border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stage .media { aspect-ratio: 5 / 4; }
.stage picture, .stage img { width: 100%; height: 100%; object-fit: contain; }
.stage .floating { padding: 0 18px 18px; display: grid; gap: 10px; }
.target {
  background: rgba(22, 24, 30, 0.92); color: #F2F4F8;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
  padding: 14px 16px; display: flex; gap: 14px; align-items: center;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.target .icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 117, 71, 0.14); display: grid; place-items: center; flex: none; }
.target .icon svg { width: 20px; height: 20px; color: #FF7547; }
.target small { display: block; font: 600 11px/1.3 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #FF7547; }
.target strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.target span.sub { display: block; font-size: 13px; color: #A3ACBA; }
.stage .badge {
  position: absolute; top: 16px; left: 16px;
  font: 600 11px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: #F2F4F8; background: rgba(255, 255, 255, 0.08); padding: 8px 10px; border-radius: 999px;
}

/* ---------- Trust strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; padding: 20px 0; }
.strip li { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.strip svg { width: 18px; height: 18px; color: var(--ready); flex: none; }

/* ---------- Sections ---------- */
section.block { padding: clamp(64px, 9vw, 112px) 0; }
.block-head { max-width: 760px; }
.block-head h2 { font-size: clamp(30px, 4.6vw, 52px); margin-top: 14px; }
.block-head p:not(.eyebrow) { margin-top: 18px; font-size: 19px; color: var(--muted); }

.grid { display: grid; gap: 16px; margin-top: 44px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px;
}
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.card .glyph { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.card .glyph svg { width: 22px; height: 22px; }

/* Pro: copy beside the readiness map */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; margin-top: 44px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.points { list-style: none; display: grid; gap: 26px; padding: 0; margin: 0; }
.points li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.points .num { width: 44px; height: 44px; border-radius: 12px; background: var(--cta); color: var(--on-cta); display: grid; place-items: center; font: 800 16px/1 var(--display); }
.points h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.points p { margin-top: 6px; color: var(--muted); }

.mapcard { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 24px 22px; box-shadow: var(--shadow); }
.mapcard .maps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mapcard .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.mapcard .head strong { font: 800 18px/1.2 var(--display); text-transform: uppercase; }
.mapcard .head span { color: var(--muted); font-size: 14px; }
.bodymap { width: 100%; height: auto; }
.bm-sil { fill: var(--map-base); stroke: var(--map-muscle); stroke-width: 1.2; stroke-linejoin: round; }
.bm-u { fill: var(--map-muscle); stroke: var(--map-edge); stroke-width: 1.4; }
.bm-r { fill: var(--ready); stroke: var(--map-edge); stroke-width: 1.4; }
.bm-m { fill: var(--recovering); stroke: var(--map-edge); stroke-width: 1.4; }
.bm-f { fill: var(--fatigued); stroke: var(--map-edge); stroke-width: 1.4; }
.bm-stripe { stroke: none; }
.bm-stripe-line { fill: var(--map-edge); opacity: 0.55; }
.bm-line { stroke: var(--map-edge); stroke-width: 1.3; fill: none; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend .r { background: var(--ready); }
.legend .m { background: var(--recovering); }
.legend .f { background: repeating-linear-gradient(45deg, var(--fatigued) 0 3px, color-mix(in srgb, var(--fatigued) 55%, var(--surface)) 3px 5px); }

/* Demos */
.demos { display: grid; gap: 16px; margin-top: 44px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) { .demos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.demo figure { margin: 0; }
.demo .frame { aspect-ratio: 1 / 1; background: var(--stage); border-radius: var(--r); overflow: hidden; }
.demo img { width: 100%; height: 100%; }
.demo figcaption { margin-top: 12px; font-weight: 700; font-size: 16px; }
.demo figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* Privacy band */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .grid { margin-top: 36px; }
.band .card { background: var(--bg); }

/* Pricing */
.prices { display: grid; gap: 16px; margin-top: 44px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1000px) { .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prices { grid-template-columns: 1fr; } }
.price { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 22px; }
.price.best { border: 2px solid var(--cta); }
.price .tag { position: absolute; top: -12px; left: 20px; background: var(--cta); color: var(--on-cta); font: 600 11px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.price h3 { font: 600 13px/1.3 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.price .amount { font: 800 38px/1.05 var(--display); margin-top: 6px; }
.price .amount small { font: 600 15px var(--body); color: var(--muted); letter-spacing: 0; }
.price p { color: var(--muted); font-size: 15px; }
.price ul { list-style: none; display: grid; gap: 8px; margin-top: 14px; font-size: 15px; }
.price li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.price li svg { width: 18px; height: 18px; color: var(--ready); margin-top: 3px; }
.fineprint { margin-top: 22px; font-size: 14px; color: var(--faint); max-width: 70ch; }

/* FAQ */
.faq { margin-top: 36px; display: grid; gap: 10px; max-width: 820px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 700; font-size: 17px; line-height: 1.4;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
details .answer { padding: 0 20px 20px; color: var(--muted); display: grid; gap: 10px; }
details .answer ol, details .answer ul { padding-left: 20px; display: grid; gap: 6px; }

/* Closing call to action */
.closing { text-align: center; }
.closing .inner { background: var(--stage); color: #F2F4F8; border-radius: 28px; padding: clamp(40px, 7vw, 80px) 24px; display: grid; justify-items: center; gap: 18px; position: relative; overflow: hidden; }
.closing h2 { font-size: clamp(30px, 5vw, 56px); max-width: 16ch; }
.closing p { color: #A3ACBA; max-width: 38em; font-size: 18px; }
.closing .eyebrow { color: #FF7547; }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc { padding: clamp(40px, 6vw, 72px) 0 96px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(34px, 6vw, 56px); margin-top: 14px; }
.doc .meta { margin-top: 14px; color: var(--muted); font-size: 15px; }
.doc .toc { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc .toc a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.doc .toc a:hover { border-color: var(--accent); }
.doc h2 { font: 800 22px/1.2 var(--display); text-transform: uppercase; margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 18px; font-weight: 700; margin-top: 30px; }
.doc p, .doc ul, .doc ol { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 8px; }
.doc .summary { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 22px 20px; }
.doc .summary ul { list-style: none; padding: 0; gap: 12px; margin-top: 12px; }
.doc .summary li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.doc .summary li svg { width: 22px; height: 22px; color: var(--ready); }
.table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 600 12px/1.3 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.table td:first-child { font-weight: 600; }

.contact-card { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.contact-card p { margin: 6px 0 0; color: var(--muted); }
.contact-card strong { font-size: 19px; }
@media (max-width: 600px) { .contact-card { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 22px; }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer nav a { color: var(--fg); font-weight: 600; text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer small { font-size: 13px; color: var(--faint); line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.doc .intro { margin-top: 28px; }
@media (max-width: 560px) { .strip ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; } .strip li { font-size: 14px; } }
@media (max-width: 600px) {
  .table { overflow: visible; }
  .table table { min-width: 0; }
  .table thead { display: none; }
  .table tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; border: 0; padding: 2px 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
}
