/* ════════════════════════════════════════════════════════════════
   TOTAL — powerlifting tracker landing
   Dark (Iron Red) is the default theme; Light (Steel Blue) via toggle.
   The in-app phone/watch screens are always dark; their accent follows
   the page accent (red ↔ blue).
   ════════════════════════════════════════════════════════════════ */

:root { --maxw: 1200px; }

/* ── DARK · Iron Red (default) ── */
html[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-alt: #0f0f12;
  --surface: #17171a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2ee;
  --text-dim: rgba(244, 242, 238, 0.62);
  --text-mute: rgba(244, 242, 238, 0.40);
  --accent: #e02a30;
  --accent-glow: rgba(224, 42, 48, 0.16);
  --accent-shadow: rgba(224, 42, 48, 0.55);
  --nav-bg: rgba(10, 10, 12, 0.72);
  --btn-solid: #f4f2ee;
  --btn-solid-text: #0a0a0c;
  color-scheme: dark;
}

/* ── LIGHT · Steel Blue ── */
html[data-theme="light"] {
  --bg: #eef0f3;
  --bg-alt: #e6e9ee;
  --surface: #ffffff;
  --line: rgba(20, 30, 45, 0.10);
  --line-strong: rgba(20, 30, 45, 0.18);
  --text: #0f1722;
  --text-dim: rgba(15, 23, 34, 0.62);
  --text-mute: rgba(15, 23, 34, 0.42);
  --accent: #2a6fdb;
  --accent-glow: rgba(42, 111, 219, 0.14);
  --accent-shadow: rgba(42, 111, 219, 0.45);
  --nav-bg: rgba(238, 240, 243, 0.72);
  --btn-solid: #0f1722;
  --btn-solid-text: #ffffff;
  color-scheme: light;
}

:root {
  --font-display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ── Shared text atoms ───────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.6px;
  line-height: 0.96;
  text-transform: uppercase;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.kicker.center { justify-content: center; }

/* ── Three-stripe mark ───────────────────────────────────────── */
.stripes {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  vertical-align: middle;
  gap: 22%;
  width: 1em;
  height: 1em;
}
.stripes i { display: block; height: 18%; border-radius: 99px; background: var(--accent); }
.stripes i:nth-child(1) { width: 55%; }
.stripes i:nth-child(2) { width: 78%; }
.stripes i:nth-child(3) { width: 100%; }
.stripes.on-text i { background: var(--text); }

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark .stripes { width: 22px; height: 22px; }
.wordmark b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-dim);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 18px -8px var(--accent-shadow);
  transition: transform .15s ease, filter .15s ease;
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* theme toggle */
.theme-toggle {
  width: 56px;
  height: 30px;
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: left .25s cubic-bezier(.16, 1, .3, 1);
}
html[data-theme="dark"] .theme-toggle .knob { left: 28px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* mobile menu button */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.nav-burger svg { width: 20px; height: 20px; stroke: var(--text); }

/* mobile sheet */
.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 20px 28px 40px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  visibility: hidden;
}
.mobile-sheet.open { transform: none; visibility: visible; }
.mobile-sheet .sheet-top { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.mobile-sheet nav { display: flex; flex-direction: column; gap: 6px; margin-top: 32px; }
.mobile-sheet nav a {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.sheet-close { width: 40px; height: 40px; font-size: 26px; color: var(--text); }

/* ════════════════════════════════════════════════════════════════
   STORE BUTTONS
   ════════════════════════════════════════════════════════════════ */
.store-row { display: flex; gap: 14px; flex-wrap: wrap; }
.store-row.center { justify-content: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  border-radius: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.badge .b-label { text-align: left; line-height: 1.05; }
.badge .b-label small { display: block; font-size: 11px; opacity: 0.7; letter-spacing: 0.3px; }
.badge .b-label strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: 0.6px; }
.badge svg { width: 26px; height: 26px; flex-shrink: 0; }

.badge-apple {
  background: var(--btn-solid);
  color: var(--btn-solid-text);
  box-shadow: 0 8px 24px -10px var(--accent-shadow);
}
.badge-apple:hover { transform: translateY(-2px); }
.badge-soon {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  cursor: default;
}

.hero-meta {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════ */
.hero { position: relative; overflow: hidden; }
.hero .glow {
  position: absolute;
  top: -12%;
  right: -6%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0 96px;
  position: relative;
  z-index: 1;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 20px 0 0;
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.92;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.hero-copy h1 .accent { color: var(--accent); }
.hero-copy .lead {
  margin: 26px 0 0;
  max-width: 480px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hero-copy .store-row { margin-top: 34px; }

.hero-phone { display: flex; justify-content: center; position: relative; }
.hero-phone .phone-scaler { animation: floaty 6s ease-in-out infinite; }

.float-chip {
  position: absolute;
  z-index: 3;
  padding: 11px 15px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: floaty 5s ease-in-out infinite;
}
.float-chip .stripes { width: 22px; height: 22px; }
.float-chip small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-mute); }
.float-chip b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1; color: var(--text); }
.float-chip.accent b { color: var(--accent); }
.float-chip.tl { top: 150px; left: -52px; animation-delay: .4s; }
.float-chip.br { bottom: 168px; right: -44px; animation-delay: .9s; }

/* ════════════════════════════════════════════════════════════════
   STATS
   ════════════════════════════════════════════════════════════════ */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 46px 0; }
.stats-grid .stat { padding: 4px 26px; }
.stats-grid .stat + .stat { border-left: 1px solid var(--line); }
.stat .num {
  font-family: var(--font-display);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1;
  color: var(--text);
}
.stat .cap { margin-top: 10px; font-size: 13px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.3px; }

/* ════════════════════════════════════════════════════════════════
   FEATURES
   ════════════════════════════════════════════════════════════════ */
.features { background: var(--bg); }
.section-head { padding-top: 90px; text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 16px auto 0;
  max-width: 760px;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 0.98;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
}
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0;
}
.feature-text h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 18px 0 0;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 0.98;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
}
.feature-text p { margin: 20px 0 0; max-width: 460px; font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.bullets { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.bullets li { display: flex; align-items: flex-start; gap: 13px; font-size: 15.5px; color: var(--text); line-height: 1.4; }
.bullets li .stripes { width: 17px; height: 17px; margin-top: 3px; flex-shrink: 0; }

.feature-phone { display: flex; justify-content: center; position: relative; }
.feature-phone .glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.feature-phone .phone-scaler { animation: floaty 6s ease-in-out infinite; }

/* ════════════════════════════════════════════════════════════════
   WATCH
   ════════════════════════════════════════════════════════════════ */
.watch {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.watch .glow {
  position: absolute;
  bottom: -20%;
  left: -8%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.watch-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 90px 0;
  position: relative;
  z-index: 1;
}
.watch-text h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 18px 0 0;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 0.98;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
}
.watch-text p { margin: 20px 0 0; max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.watch-row { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.watch-row .watch-scaler:nth-child(1) { animation: floaty 5.5s ease-in-out infinite; }
.watch-row .watch-scaler:nth-child(2) { animation: floaty 5.5s ease-in-out .5s infinite; }
.watch-row .watch-scaler:nth-child(3) { animation: floaty 5.5s ease-in-out 1s infinite; }

/* ════════════════════════════════════════════════════════════════
   GALLERY (marquee)
   ════════════════════════════════════════════════════════════════ */
.gallery { background: var(--bg); padding: 92px 0 96px; overflow: hidden; }
.marquee {
  position: relative;
  width: 100%;
  margin-top: 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .phone-scaler { margin: 0 12px; }

/* ════════════════════════════════════════════════════════════════
   CTA
   ════════════════════════════════════════════════════════════════ */
.cta { background: var(--bg-alt); border-top: 1px solid var(--line); }
.cta-inner { padding: 96px 0; text-align: center; position: relative; }
.cta-inner .stripes { width: 52px; height: 52px; margin: 0 auto 26px; }
.cta-inner h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.cta-inner h2 .accent { color: var(--accent); }
.cta-inner p { margin: 22px auto 0; max-width: 460px; font-size: 18px; line-height: 1.55; color: var(--text-dim); }
.cta-inner .store-row { margin-top: 34px; }

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-grid p { margin: 18px 0 0; max-width: 260px; font-size: 14px; line-height: 1.6; color: var(--text-mute); }
.footer-col h4 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-mute); }
.footer-col ul { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--text-dim); transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-mute);
}

/* ════════════════════════════════════════════════════════════════
   ANIMATIONS / REVEAL
   ════════════════════════════════════════════════════════════════ */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Reveal only hides when JS is active (html.js) so no-JS users still see content */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track,
  .hero-phone .phone-scaler,
  .feature-phone .phone-scaler,
  .watch-row .watch-scaler,
  .float-chip { animation: none !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-cta { display: none; }
  .hero-grid, .feature-row, .watch-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-copy .store-row, .hero-copy .hero-meta { justify-content: center; }
  .hero-phone { margin-top: 24px; }
  .hero-phone .float-chip { display: none; }
  .feature-row .feature-phone { order: -1; }
  .section-head { padding-top: 64px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .stats-grid .stat:nth-child(3) { border-left: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid .stat { border-left: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .feature-row, .watch-grid { gap: 36px; padding: 60px 0; }
}
