/* RideForm website — tokens from DESIGN.md §1/§2/§3/§5. No values outside this sheet. */

:root {
  /* Palette (DESIGN.md §1) */
  --background: #FAF8F2;
  --surface: #FFFFFF;
  --surface-sand: #F1EBDC;
  --sand-border: #E0D7BE;
  --surface-muted: #EDEAE0;
  --primary: #45573A;
  --primary-tint: #E9EDE0;
  --accent: #E0662E;
  --accent-pressed: #C95A28;
  --on-accent: #FFF8F2;
  --text-primary: #23271C;
  --text-body: #3A3E30;
  --text-secondary: #6C7060;
  --text-muted: #6B6F59;
  --text-on-sand: #3A4430;
  --label-strong: #5C604B;
  --border: #E7E2D4;
  --divider: #F0ECDF;
  --track: #EAE5D6;
  --border-dashed: #C9C3AE;
  --good-bg: #E4EFDF;
  --good-text: #276B42;
  --sev-amber: #C89020;
  --amber-text: #8F6209;
  --sev-red: #C24634;
  --red-text: #A93A2A;
  --stripe-a: #DCE0CE;
  --stripe-b: #D3D8C3;
  --scrim: rgba(35, 39, 28, 0.70);
  --shadow-accent-btn: 0 12px 28px rgba(224, 102, 46, 0.35);
  --shadow-toggle: 0 2px 6px rgba(35, 39, 28, 0.08);

  /* Typography (DESIGN.md §3 families; sizes scaled for web) */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;

  /* Radii (DESIGN.md §5) */
  --radius-card: 16px;
  --radius-field: 14px;
  --radius-block: 12px;
  --radius-pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }

/* ---------- Header ---------- */

.site-header { padding: 20px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }

.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark:hover { text-decoration: none; }
.wordmark__block {
  width: 40px; height: 40px; border-radius: var(--radius-block);
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.wordmark__block img { width: 26px; height: 26px; }
.wordmark__name {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.4px; color: var(--text-primary);
}

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.site-nav a:hover { color: var(--text-primary); text-decoration: none; }

/* ---------- Hero ---------- */

.hero { padding: 56px 0 72px; }
.hero .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}

.hero h1 {
  font-family: var(--font-display); font-weight: 700; color: var(--text-primary);
  font-size: clamp(34px, 5vw, 52px); line-height: 1.15; letter-spacing: -0.5px;
}
.hero__sub {
  margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--text-secondary);
  max-width: 44ch;
}

.store-pills { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.store-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-pill); padding: 10px 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--text-muted);
}
.store-pill svg { width: 16px; height: 16px; stroke: var(--text-muted); }

.hero__note { margin-top: 14px; font-size: 14px; color: var(--text-muted); }

/* Scene: Welcome-screen anatomy (DESIGN.md §9) — silhouette on the stripe band, report card
   floating. Three scenes cross-fade (4 s hold, 600 ms ease-in-out); band and card frame never fade. */
.scene { position: relative; min-height: 340px; display: flex; align-items: flex-end; }
.scene__ground {
  position: absolute; left: 0; right: 0; bottom: 36px; height: 14px;
  border-radius: var(--radius-pill);
  background: repeating-linear-gradient(45deg,
    var(--stripe-a) 0 8px, var(--stripe-b) 8px 16px);
}
.scene__horse {
  position: absolute; left: 4px; height: 244px; width: auto;
  opacity: 0; transition: opacity 0.6s ease-in-out;
}
.scene__horse.is-active { opacity: 1; }
/* Grounding: jumping is airborne with its baked-in fence sitting on the band;
   standing scenes put hooves on the band's top edge. */
.scene__horse--jumping { bottom: 40px; }
.scene__horse--standing { bottom: 49px; }
.report-card {
  position: absolute; right: 0; bottom: 96px; width: 256px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 14px;
  box-shadow: var(--shadow-toggle);
  display: grid;
}
/* Card contents stack in one grid cell and cross-fade in sync with the scene */
.card-scene { grid-area: 1 / 1; opacity: 0; transition: opacity 0.6s ease-in-out; }
.card-scene.is-active { opacity: 1; }
.report-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; }
.report-card__row + .report-card__row { border-top: 1px solid var(--divider); }
.report-card .label {
  flex: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.48px; text-transform: uppercase;
  color: var(--label-strong); white-space: nowrap;
}
/* The bar absorbs width differences between font renderings; label and score never shrink or clip */
.score-bar { display: block; flex: 1 1 auto; min-width: 36px; max-width: 76px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.score-bar__fill { display: block; height: 100%; border-radius: 3px; background: var(--sev-amber); }
.score-bar__fill--weak { background: var(--sev-red); }
.score-num { flex: none; font-size: 11px; font-weight: 600; color: var(--amber-text); white-space: nowrap; }
.score-num--weak { color: var(--red-text); }
.pill-solid {
  flex: none;
  background: var(--good-bg); color: var(--good-text);
  font-size: 12px; font-weight: 600; border-radius: var(--radius-pill);
  padding: 3px 10px; white-space: nowrap;
}

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }

.section h2 {
  font-family: var(--font-display); font-weight: 700; color: var(--text-primary);
  font-size: clamp(24px, 3.4vw, 32px); line-height: 1.25; letter-spacing: -0.3px;
}
.section__lead { margin-top: 10px; color: var(--text-secondary); font-size: 16px; max-width: 60ch; }

.cards-3 { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
}
.card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  color: var(--text-primary); margin: 14px 0 8px;
}
.card p { font-size: 15px; line-height: 1.6; color: var(--text-body); }

.icon-block {
  width: 40px; height: 40px; border-radius: var(--radius-block);
  background: var(--primary); display: flex; align-items: center; justify-content: center;
}
.icon-block svg { width: 20px; height: 20px; stroke: var(--on-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-block svg .filled { fill: var(--on-accent); stroke: none; }

.step-num {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.55px;
}

/* ---------- Privacy band ---------- */

.privacy-card {
  margin-top: 32px; background: var(--surface-sand); border: 1px solid var(--sand-border);
  border-radius: var(--radius-card); padding: 28px;
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
}
.privacy-card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text-on-sand);
}
.privacy-card p { margin-top: 8px; font-size: 15px; color: var(--text-body); max-width: 72ch; }
.privacy-card ul { margin: 12px 0 0; padding: 0; list-style: none; }
.privacy-card li { display: flex; gap: 8px; font-size: 15px; color: var(--text-body); padding: 3px 0; }
.privacy-card li::before { content: "•"; color: var(--primary); font-weight: 700; }
.privacy-card__more { margin-top: 14px; font-weight: 600; font-size: 14px; }

/* ---------- Pricing ---------- */

.pricing-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column;
}
.price-card--free { background: var(--primary-tint); border-color: var(--primary-tint); }
.price-card__tier {
  font-size: 12px; font-weight: 600; letter-spacing: 0.48px; text-transform: uppercase;
  color: var(--label-strong);
}
.price-card__price {
  margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 30px;
  color: var(--text-primary);
}
.price-card__price span { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.price-card__desc { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--text-body); }
.pricing-note { margin-top: 18px; font-size: 13px; color: var(--text-secondary); }

/* ---------- Disclaimer strip ---------- */

.disclaimer-strip {
  border-top: 1px solid var(--track); margin-top: 24px; padding: 24px 0;
}
.disclaimer-strip p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); max-width: 78ch; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--track); padding: 32px 0 48px; }
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__brand img { width: 28px; height: 28px; border-radius: 8px; }
.site-footer__brand span { font-size: 14px; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { font-size: 14px; color: var(--text-muted); }
.site-footer nav a:hover { color: var(--text-primary); }

/* ---------- Legal page ---------- */

.legal { padding: 24px 0 72px; }
.legal h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 38px);
  color: var(--text-primary); letter-spacing: -0.4px;
}
.legal__meta { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.legal h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--text-primary);
  margin: 40px 0 12px;
}
.legal p { margin: 12px 0; font-size: 15.5px; line-height: 1.7; color: var(--text-body); }
.legal ul { margin: 12px 0 12px 22px; }
.legal li { margin: 6px 0; font-size: 15.5px; line-height: 1.7; color: var(--text-body); }
.legal strong { color: var(--text-primary); }

/* Draft banner mirrors the app's low-confidence banner (DESIGN.md §6) */
.draft-banner {
  margin: 28px 0; background: var(--surface);
  border: 1.5px dashed var(--border-dashed); border-radius: var(--radius-card);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start;
}
.draft-banner__q {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-sand); color: var(--text-secondary);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.draft-banner__title { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--text-primary); }
.draft-banner__body { margin-top: 3px; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hero { padding: 32px 0 48px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .scene { min-height: 380px; margin: 0 auto; width: 100%; max-width: 420px; }
  .scene__horse { height: 200px; }
  /* At phone widths the card floats above the horse instead of beside it */
  .report-card { top: 0; bottom: auto; width: 240px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .privacy-card { grid-template-columns: 1fr; }
}
