/* ──────────────────────────────────────────────────────────────────────────
   Fitmatch — shared styles
   Loaded by index.html, privacy.html and terms.html.

   Everything here is either site chrome (nav, footer) or a pattern used by
   more than one page. Page-specific rules stay in that page's <style> block.

   Document typography is scoped under .legal-page so it cannot collide with
   the waitlist hero, which styles bare h1/h2 at display sizes.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:      #f5f4f0;
  --surface: #ffffff;
  --fg:      #0a0a0a;
  --muted:   #6b6965;
  --border:  #e8e6e1;
  --accent:  #22c55e;

  --font-body:    "DM Sans", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", sans-serif;

  --gutter: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .6; transform: scale(1.4); }
}

/* ── nav ─────────────────────────────────────────────────────────────────── */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--gutter);
  position: relative;
  z-index: 10;
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 14px; }
.nav-logo-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--fg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
}
.nav-logo-wrap img { width: 36px; height: 36px; filter: invert(1); }
.live-dot {
  position: absolute; top: -3px; right: -3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.brand-text .name {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1;
}
.brand-text .tagline {
  font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 1.4px; text-transform: uppercase; margin-top: 3px;
}
.nav-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 50px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600;
}
.nav-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ── footer ──────────────────────────────────────────────────────────────── */

footer {
  background: var(--fg); color: rgba(255,255,255,.4);
  padding: 28px var(--gutter);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 22px; height: 22px; filter: invert(1); }
.footer-brand span {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,.7);
}
footer a { color: inherit; opacity: .6; }
footer a:hover { opacity: 1; }

/* ── legal documents ─────────────────────────────────────────────────────── */

.legal-page .wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.legal-page .eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted);
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 50px;
  padding: 7px 16px;
  margin-bottom: 24px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: 46px; font-weight: 800;
  line-height: 1.08; letter-spacing: -1.6px;
  margin-bottom: 14px;
}
.legal-page .updated {
  color: var(--muted); font-size: 14px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.legal-page .lede { font-size: 18px; line-height: 1.65; margin-bottom: 18px; }

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; letter-spacing: -.5px;
  margin-top: 52px; margin-bottom: 14px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.legal-page h3 {
  font-size: 15px; font-weight: 700;
  letter-spacing: .2px;
  margin-top: 28px; margin-bottom: 8px;
}

.legal-page p { color: #3a3833; line-height: 1.75; margin-bottom: 16px; }
.legal-page ul { margin: 0 0 16px 22px; color: #3a3833; line-height: 1.75; }
.legal-page li { margin-bottom: 9px; }
.legal-page strong { color: var(--fg); font-weight: 700; }
.legal-page a { color: var(--fg); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.legal-page a:hover { text-decoration: none; }
.legal-page em { font-style: italic; }

.legal-page .legal { font-size: 14px; color: var(--muted); }
.legal-page .plain { font-size: 15px; }

/* ── callout ─────────────────────────────────────────────────────────────── */

.legal-page .callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 26px 0;
}
.legal-page .callout p:last-child { margin-bottom: 0; }
.legal-page .callout.warn { border-left-color: #e0803a; }

/* ── table ───────────────────────────────────────────────────────────────── */

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: 14.5px;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
.legal-page th, .legal-page td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-page tr:last-child td { border-bottom: none; }
.legal-page th { font-weight: 700; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.legal-page td { color: #3a3833; line-height: 1.6; }
.legal-page td:first-child { white-space: nowrap; padding-right: 24px; font-weight: 600; color: var(--fg); }

/* ── document footer note ────────────────────────────────────────────────── */

.legal-page .doc-footer {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .legal-page h1 { font-size: 36px; letter-spacing: -1.1px; }
  .legal-page h2 { font-size: 21px; }
  footer { flex-direction: column; align-items: flex-start; }
}
