/* Forge — marketing site design system.
   Cream + coral brand identity, mirrored from the app (src/theme.ts).
   Type: Barlow Condensed (display) + Barlow (body) — athletic/action pairing.
   All motion is gated behind prefers-reduced-motion. */

:root {
  /* ground + surface */
  --bg: #F8EFE9;
  --bg-2: #FBF3EE;
  --bg-3: #F3E4DA;
  --surface: #FFFFFF;
  --surface-sunk: #FCF6F1;

  /* ink */
  --ink: #2A140D;          /* near-black, 6.3:1 on cream */
  --ink-soft: rgba(42, 20, 13, 0.72);
  --ink-faint: rgba(42, 20, 13, 0.52);
  --ink-ghost: rgba(42, 20, 13, 0.10);

  /* brand coral */
  --coral: #F1795A;
  --coral-ink: #C2512F;    /* AA-safe coral for small text on cream (~4.6:1) */
  --coral-deep: #A83E22;
  --coral-wash: rgba(241, 121, 90, 0.12);
  --coral-glow: rgba(241, 121, 90, 0.38);

  /* rarity accents (from theme.rarityTheme.light) */
  --common: #78716C;
  --rare: #2563EB;
  --epic: #7C3AED;
  --legendary: #C08A1E;
  --mythic: #DB2777;

  /* semantic */
  --ok: #2F9E6A;
  --warn: #C7891C;
  --danger: #D14343;

  /* type */
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* spacing scale (4pt) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(42,20,13,0.06), 0 2px 8px rgba(42,20,13,0.05);
  --shadow-md: 0 4px 14px rgba(42,20,13,0.09), 0 12px 34px rgba(42,20,13,0.08);
  --shadow-coral: 0 10px 30px rgba(241,121,90,0.30);

  --maxw: 1160px;

  /* z-scale */
  --z-nav: 50; --z-modal: 80; --z-toast: 90;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--coral-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s4);
  color: var(--ink);
}
h1 { font-size: clamp(44px, 8vw, 92px); text-transform: uppercase; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.5vw, 52px); text-transform: uppercase; }
h3 { font-size: clamp(21px, 2.4vw, 27px); }
p  { margin: 0 0 var(--s4); max-width: 68ch; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-soft); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: clamp(56px, 9vw, 120px); }
.eyebrow {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 14px; color: var(--coral-ink);
  margin: 0 0 var(--s3);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 18px;
  padding: 15px 30px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-coral); }
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-ghost); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral-ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  backdrop-filter: saturate(1.2) blur(10px);
  background: rgba(248,239,233,0.78);
  border-bottom: 1px solid var(--ink-ghost);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: var(--s5); }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--coral-ink); text-decoration: none; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: var(--s5); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .cols-3 { grid-template-columns: 1fr; } .cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--ink-ghost);
  border-radius: var(--radius-lg); padding: var(--s6);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--coral-glow); }
.card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--coral-wash); color: var(--coral-ink); margin-bottom: var(--s4); }
.card .ic svg { width: 24px; height: 24px; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- footer ---------- */
.footer { background: #21120C; color: rgba(255,255,255,0.72); padding-block: var(--s8) var(--s6); }
.footer h4 { color: #fff; font-size: 16px; letter-spacing: 0.12em; margin-bottom: var(--s4); }
.footer a { color: rgba(255,255,255,0.72); font-size: 15px; display: block; margin-bottom: 8px; }
.footer a:hover { color: var(--coral); text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s6); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-base { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--s7); padding-top: var(--s5); font-size: 13px; color: rgba(255,255,255,0.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- misc ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--coral-wash); color: var(--coral-ink); }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5vw, 56px); color: var(--coral-ink); line-height: 1; }
.hr { height: 1px; background: var(--ink-ghost); border: 0; margin-block: var(--s6); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
details { border: 1px solid var(--ink-ghost); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s3); overflow: hidden; }
details summary { cursor: pointer; padding: var(--s4) var(--s5); font-family: var(--display); font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; color: var(--coral-ink); font-size: 26px; line-height: 1; }
details[open] summary::after { content: '\2212'; }
details .answer { padding: 0 var(--s5) var(--s5); color: var(--ink-soft); }
