/* IronLifts — public site
   Aesthetic: "training console". Near-black instrument panel, Geist + Geist
   Mono, a single violet accent used like an LED, teal as the secondary phase.
   Mirrors the app's design tokens (see Sources/.../DesignSystem/Theme.swift):
   bg #0A0A0A, surface #161616, text #FAFAF7, muted .7 white, divider .08 white,
   accent #7C3AED, warmup teal #37B3A0. No build step, no JS. */

:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --text: #fafaf7;
  --muted: rgba(255, 255, 255, 0.7);   /* ~9:1 on bg — carries info */
  --faint: rgba(255, 255, 255, 0.45);  /* decorative / non-essential */
  --divider: rgba(255, 255, 255, 0.08);
  --hairline: rgba(255, 255, 255, 0.14);
  --accent: #7c3aed;
  --accent-bright: #a883ff;             /* inline links on near-black: clears AA */
  --teal: #37b3a0;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 66ch;
  --pad: clamp(20px, 5vw, 48px);
  --maxw: 1080px;
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Instrument-panel atmosphere: a faint hairline grid + a single violet glow
   bleeding from the top, like a powered-on console. Fixed, behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(124, 58, 237, 0.16), transparent 60%),
    linear-gradient(var(--divider) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, var(--divider) 1px, transparent 1px) 0 0 / 56px 100%;
  background-color: var(--bg);
  mask-image: radial-gradient(140% 100% at 50% 0%, #000 55%, transparent 100%);
}

/* Fine grain so flat blacks don't band on OLED. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

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

/* ---- layout ---------------------------------------------------------- */

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0;
}

/* ---- site header ----------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.72);
  border-bottom: 1px solid var(--divider);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }
.glyph {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 18px -6px var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--surface); }

/* ---- hero ------------------------------------------------------------ */

.hero { padding: clamp(56px, 12vw, 132px) 0 clamp(40px, 8vw, 88px); }
.hero__eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(44px, 8.5vw, 92px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  max-width: 15ch;
}
.hero h1 .dim { color: var(--faint); }
.hero__lede {
  font-size: clamp(17px, 2.3vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 36px;
}

/* 5×5 rep-tile motif — echoes the app's square rep tiles. */
.tiles {
  display: flex;
  gap: 10px;
  margin: 0 0 40px;
  flex-wrap: wrap;
}
.tile {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tile--done {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 13px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--text); color: #0a0a0a; }
.btn--primary:hover { color: #0a0a0a; transform: translateY(-2px); }
.btn--ghost { border-color: var(--hairline); color: var(--text); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: var(--text); background: var(--surface); }
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  background: var(--surface);
  color: var(--muted);
  border-color: var(--divider);
}
.btn .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}

/* ---- spec sheet ------------------------------------------------------ */

.section { padding: clamp(48px, 9vw, 96px) 0; border-top: 1px solid var(--divider); }
.section__head { margin-bottom: 36px; }
.section__head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 14px 0 0;
}

.spec { border-top: 1px solid var(--divider); }
.spec__row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1fr) 2fr;
  gap: 18px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--divider);
}
.spec__idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent-bright); letter-spacing: 0.08em; }
.spec__key {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec__val { font-size: 16.5px; color: var(--text); }
.spec__val span { color: var(--faint); }

/* ---- transparency callout ------------------------------------------- */

.note {
  border: 1px solid var(--divider);
  background: linear-gradient(180deg, var(--surface), rgba(22, 22, 22, 0.4));
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
}
.note p { margin: 0 0 14px; color: var(--muted); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); font-weight: 600; }

/* ---- footer ---------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--divider);
  padding: 40px 0 64px;
  margin-top: 24px;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot__links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---- legal / document page ------------------------------------------ */

.doc { padding: clamp(40px, 8vw, 80px) 0 24px; }
.doc__header { max-width: var(--measure); margin-bottom: 40px; }
.doc__header h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 18px 0 14px;
}
.doc__meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.doc__meta span { color: var(--muted); }

.tldr {
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 0 0 8px;
  max-width: var(--measure);
}
.tldr h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 10px;
}
.tldr ul { margin: 0; padding-left: 18px; color: var(--muted); }
.tldr li { margin: 6px 0; }
.tldr li strong { color: var(--text); font-weight: 600; }

.prose { max-width: var(--measure); }
.prose section { padding: 34px 0; border-top: 1px solid var(--divider); }
.prose section:first-of-type { border-top: none; }
.prose h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.prose h2 .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
}
.prose h3 { font-size: 16px; font-weight: 600; margin: 22px 0 8px; color: var(--text); }
.prose p { color: var(--muted); margin: 0 0 14px; }
.prose ul { color: var(--muted); padding-left: 20px; margin: 0 0 14px; }
.prose li { margin: 8px 0; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--divider);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text);
}
.placeholder {
  color: var(--teal);
  border-bottom: 1px dashed var(--teal);
  font-style: normal;
}

/* ---- entrance motion ------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .hero .hero__eyebrow.reveal { animation-delay: 0.02s; }
  .hero h1.reveal { animation-delay: 0.10s; }
  .hero .hero__lede.reveal { animation-delay: 0.18s; }
  .hero .tiles.reveal { animation-delay: 0.24s; }
  .hero .cta-row.reveal { animation-delay: 0.34s; }

  /* rep tiles light up left-to-right after the row arrives */
  .tile { opacity: 0; animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
  .tile:nth-child(1) { animation-delay: 0.40s; }
  .tile:nth-child(2) { animation-delay: 0.48s; }
  .tile:nth-child(3) { animation-delay: 0.56s; }
  .tile:nth-child(4) { animation-delay: 0.64s; }
  .tile:nth-child(5) { animation-delay: 0.72s; }

  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes pop { from { opacity: 0; transform: scale(0.86) translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---- responsive ------------------------------------------------------ */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .spec__row { grid-template-columns: 34px 1fr; }
  .spec__val { grid-column: 2; }
  .tile { width: 50px; height: 50px; font-size: 18px; }
  .nav a:first-child { display: none; } /* keep only Privacy on small screens */
}

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
