/* ══════════════════════════════════════════════════════════════════
   FitLog · landing page

   Design system: the product is a LOG, so the page borrows from a
   real logbook, not a SaaS template. Ruled hairlines instead of
   gradient glow, a ledger card instead of a phone screenshot, and
   sharp corners because the app itself has none rounded off.

   Color:  ink (near-black, warm) and paper (warm cream, for the two
           printed surfaces). Two accents, each with a fixed meaning:
           ember is the streak, violet is Pro.
   Type:   Big Shoulders Display for the wordmark and big numerals,
           Work Sans for reading, IBM Plex Mono for anything that is
           genuinely tabular. A ledger device, not a hacker one.
   Layout: asymmetric, left-set, ruled like a page in a logbook.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --ink:        #0b0a09;
  --ink-raised: #141210;
  --ink-2:      #1a1815;
  --line:       #2b2822;
  --line-soft:  #1e1c18;

  --paper:      #f3ede1;
  --paper-dim:  #d9cfb8;
  --ink-on-paper: #1a1611;

  --text:  #f2ede3;
  --muted: #a39c8a;
  --faint: #6f6957;
  --dim:   #4a4638;

  /**
   * Two accents, each with one meaning, never swapped:
   *   ember  = the streak. Consistency, fire, the thing you can lose.
   *   pro    = Pro and the AI features. Everything paid wears violet.
   * A colour that means something is worth more than a colour that is
   * merely there, so nothing decorative is allowed to borrow either one.
   */
  --ember:      #ff5a1f;
  --ember-deep: #ad3308;
  --ember-soft: rgba(255, 90, 31, .13);

  --pro:        #a78bfa;
  --pro-deep:   #6d28d9;
  --pro-soft:   rgba(167, 139, 250, .13);

  --green:      #6fae63;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 3px;
  --radius:    5px;

  --wrap: 1180px;
  --nav-h: 74px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A very faint ruled-paper texture behind the whole page, the one
   ambient effect, and it means something: this product is a log. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom, rgba(242,237,227,.028) 0px, rgba(242,237,227,.028) 1px,
    transparent 1px, transparent 34px
  );
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: .98; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
strong, b { font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--paper); color: var(--ink-on-paper); padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

/* ─── Shared type helpers ──────────────────────────────────────── */
.mono-9  { font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.ls-3    { letter-spacing: 1.5px; }
.ls-4    { letter-spacing: 2px; }
.muted   { color: var(--muted); }
.faint   { color: var(--faint); }
.dim     { color: var(--dim); }
.accent  { color: var(--ember); }
.ember   { color: var(--ember); }
.pro-accent { color: var(--pro); }
.row-between { display: flex; align-items: center; justify-content: space-between; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 1px;
  color: var(--faint); margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--ember); flex: none; }
.eyebrow b { color: var(--text); font-weight: 600; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--ember); z-index: 120;
}

main, .footer, .nav, .marquee { position: relative; z-index: 2; }

/* ═══ NAV ══════════════════════════════════════════════════════ */

.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.nav.stuck {
  background: rgba(11,10,9,.9); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-tile {
  width: 32px; height: 32px; background: var(--paper);
  display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-sm);
}
.brand-tile.sm { width: 38px; height: 38px; }
.brand-tile img { width: 84%; height: 84%; object-fit: contain; border-radius: 2px; }
.brand-word {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 18px; color: var(--text) !important;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s;
}
.nav-cta:hover { background: var(--ember); border-color: var(--ember); color: #fff !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ═══ REVEAL ═══════════════════════════════════════════════════ */

.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ═══ HERO ═════════════════════════════════════════════════════ */

.hero { padding: 56px 0 0; }
/* Vertical padding only, this element also carries .wrap, and the shorthand
   would reset .wrap's horizontal gutter to zero, putting the headline hard
   against the edge of a phone screen. Same reason throughout this file. */
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center;
  padding-top: 40px; padding-bottom: 76px;
  border-bottom: 1px solid var(--line);
}

.hero-copy { min-width: 0; }

.hero-title {
  font-size: clamp(48px, 6.6vw, 92px); letter-spacing: -0.015em;
  text-transform: uppercase; margin-bottom: 26px; text-wrap: balance;
}
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: .16em; }
.hero-title .word > span {
  display: inline-block;
  transition: transform .85s var(--ease);
  transition-delay: calc(var(--w, 0) * 110ms + 80ms);
}
.js .hero-title .word > span { transform: translateY(105%); }
.js .hero-title.in .word > span { transform: none; }

.hero-sub { max-width: 46ch; color: var(--muted); font-size: 17.5px; line-height: 1.7; margin-bottom: 34px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

.hero-note {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; color: var(--faint);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none;
  box-shadow: 0 0 0 0 rgba(111,174,99,.55); animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(111,174,99,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(111,174,99,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,174,99,0); }
}

/* ─── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform .18s var(--ease), background .18s, color .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn .btn-body { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.btn-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; color: currentColor; opacity: .6; }
.btn-label  { font-size: 14.5px; font-weight: 600; }
.btn.full { width: 100%; justify-content: center; }

.btn-primary { background: var(--ember); color: #fff; border-color: var(--ember); }
.btn-primary:hover { background: #ff6b37; }

.btn-ghost { background: var(--ink-raised); color: var(--text); }
.btn-ghost:hover { border-color: var(--faint); }

.btn-ember  { background: var(--ember); color: #fff; border-color: var(--ember); }
.btn-ember:hover { background: #ff6b37; }

.btn-pro { background: var(--pro); color: #17111f; border-color: var(--pro); }
.btn-pro:hover { background: #b9a3fb; }

.btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { transform: none; background: var(--ink-raised); border-color: var(--line); }

/* ─── Ledger card (the hero's visual anchor, a logbook page, not a
       phone screenshot) ─────────────────────────────────────────── */

.ledger { min-width: 0; }
.ledger-card {
  background: var(--paper); color: var(--ink-on-paper);
  border-radius: var(--radius); padding: 26px 26px 22px;
  box-shadow: 0 32px 70px rgba(0,0,0,.45);
  transform: rotate(1.2deg);
}
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.ledger-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; color: var(--ink-on-paper); opacity: .55; }
.ledger-date { font-family: var(--font-mono); font-size: 11px; color: var(--ink-on-paper); opacity: .55; }
.ledger-title { font-family: var(--font-display); font-size: 26px; text-transform: uppercase; letter-spacing: .2px; margin-bottom: 14px; }

.ledger-rule { height: 1px; background: var(--ink-on-paper); opacity: .18; margin: 0 0 12px; }

.ledger-rows { display: grid; gap: 10px; margin-bottom: 14px; }
.ledger-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline; font-size: 13.5px; }
.ledger-row .exercise { font-weight: 600; }
.ledger-row .sets, .ledger-row .load { font-family: var(--font-mono); font-size: 12.5px; opacity: .72; text-align: right; font-variant-numeric: tabular-nums; }

.ledger-foot { display: flex; justify-content: space-between; align-items: center; }
.ledger-stat { display: flex; flex-direction: column; }
.ledger-stat .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; opacity: .55; }
.ledger-stat .v { font-family: var(--font-mono); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger-flame { display: flex; align-items: center; gap: 6px; color: var(--ember-deep); }
.ledger-flame svg { width: 15px; height: 15px; }

.ledger-pin {
  position: absolute; top: -10px; left: 34px; width: 34px; height: 18px;
  background: var(--ember); border-radius: 2px; opacity: .92;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.ledger-wrap { position: relative; }

/* ─── Scroll hint ──────────────────────────────────────────────── */
.scroll-hint { display: flex; align-items: center; gap: 10px; padding: 22px 0; }
.scroll-rail { width: 30px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-rail i { position: absolute; top: 0; left: -30px; width: 14px; height: 1px; background: var(--ember); animation: railrun 2.4s var(--ease) infinite; }
@keyframes railrun { to { transform: translateX(60px); } }

/* ═══ MARQUEE ══════════════════════════════════════════════════ */

.marquee { border-bottom: 1px solid var(--line); background: var(--ink-raised); overflow: hidden; padding: 15px 0; }
.marquee-track {
  display: flex; gap: 30px; width: max-content; animation: slide 46s linear infinite;
  font-family: var(--font-mono); font-size: 12px; color: var(--faint); white-space: nowrap;
}
.marquee-track span:nth-child(even) { color: var(--dim); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ═══ SECTIONS ═════════════════════════════════════════════════ */

.section { padding: 108px 0; }
.band { padding: 0; border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 48px); text-transform: uppercase; margin-bottom: 18px; text-wrap: balance;
}
.section-sub { color: var(--muted); line-height: 1.8; font-size: 16.5px; max-width: 56ch; }

/* ─── Stats ────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 34px 30px; border-right: 1px solid var(--line); display: grid; gap: 6px;
}
.stat:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 46px; letter-spacing: -.01em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--text); }
.stat-note { font-size: 12.5px; color: var(--faint); }

/* ─── Feature cards ────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  position: relative; background: var(--ink); padding: 30px 26px 32px;
}
/* Violet, because the badge means Pro. */
.card-tag {
  display: inline-flex; font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px;
  color: var(--pro); border: 1px solid var(--pro-deep); background: var(--pro-soft);
  border-radius: 999px; padding: 3px 9px; margin-bottom: 18px;
}
.card.is-pro .card-ico { stroke: var(--pro); }
.card-ico { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; display: block; }
.card:not(.violet) .card-ico { margin-bottom: 24px; }
.card h3 { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; letter-spacing: .2px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.75; }

.offline-strip {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); padding: 24px 26px; margin-top: 1px;
  color: var(--muted); font-size: 14.5px; line-height: 1.75;
}
.offline-strip .ico { stroke: var(--green); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.offline-strip strong { color: var(--text); font-family: var(--font-display); text-transform: uppercase; font-size: 14.5px; letter-spacing: .2px; display: block; margin-bottom: 6px; }

/* ═══ STREAK SHOWCASE ══════════════════════════════════════════ */

.streak-section { border-bottom: 1px solid var(--line); background: var(--ink-raised); }
.streak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.streak-copy h2 { font-size: clamp(32px, 4.6vw, 54px); margin-bottom: 20px; text-transform: uppercase; }

.tick-list { display: grid; gap: 13px; margin: 24px 0 32px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.tick-list li::before { content: '·'; color: var(--ember); flex: none; font-family: var(--font-mono); }

.demo-panel { background: var(--paper); color: var(--ink-on-paper); border-radius: var(--radius); position: relative; overflow: hidden; }
.demo-panel::after { content: ''; position: absolute; inset: 0; background: var(--ember); opacity: 0; pointer-events: none; }
.demo-panel.flash::after { animation: panelflash 1s var(--ease); }
@keyframes panelflash { 0% { opacity: 0; } 14% { opacity: .14; } 100% { opacity: 0; } }

.demo-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgba(26,22,17,.14); }
.demo-head .tag { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .2px; }
.demo-body { padding: 24px 22px 22px; }
.demo-body .status { font-family: var(--font-mono); font-size: 12px; opacity: .6; }
.demo-streak { font-family: var(--font-display); font-size: 56px; line-height: 1; margin: 8px 0 24px; font-variant-numeric: tabular-nums; }
.demo-streak.pulse { animation: numpulse .5s var(--ease); }
.demo-streak small { font-family: var(--font-mono); font-size: 13px; opacity: .55; margin-left: 10px; font-weight: 500; }
@keyframes numpulse { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.demo-foot { text-align: center; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; opacity: .6; }

.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ─── One restore card ─────────────────────────────────────────── */
.rcard {
  position: relative; height: 118px; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px solid rgba(26,22,17,.18); background: rgba(26,22,17,.04);
  display: grid; place-items: center; transition: border-color .4s, background .4s;
}
.rcard .rindex { position: absolute; top: 9px; left: 11px; font-family: var(--font-mono); font-size: 10px; opacity: .5; }
.rcard .rlabel { position: absolute; bottom: 11px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .5px; color: var(--ember-deep); }
.rcard .rflame { position: relative; width: 26px; height: 34px; }
.rcard .rflame i { position: absolute; display: block; transform: rotate(-45deg); }
.rcard .ro { width: 20px; height: 20px; bottom: 6px; left: 3px;  background: var(--ember); opacity: .85; border-radius: 50% 10% 50% 50%; }
.rcard .rt { width: 10px; height: 10px; bottom: 6px; left: 8px;  background: #ffc069; border-radius: 50% 10% 50% 50%; }

.rcard .rfire { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--ember-deep); opacity: 0; border-top: 3px solid #ffc069; }
.rcard .rslash { position: absolute; top: 50%; left: -20%; right: -20%; height: 1px; background: rgba(26,22,17,.3); transform: rotate(-32deg); opacity: 0; }
.rcard .rspent { position: absolute; bottom: 11px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .5px; color: var(--dim); opacity: 0; }
.rcard .rember { position: absolute; bottom: 22px; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: #ffc069; opacity: 0; }

.rcard.ready .rflame { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.rcard.burning { animation: cardlift 1.3s var(--ease) forwards; }
@keyframes cardlift {
  0%   { transform: translateY(0)    scale(1)    rotate(0deg); }
  18%  { transform: translateY(-16px) scale(1.07) rotate(-3deg); }
  50%  { transform: translateY(-16px) scale(1.07) rotate(3deg); }
  62%  { transform: translateY(-16px) scale(1.07) rotate(3deg); }
  100% { transform: translateY(0)    scale(1)    rotate(0deg); }
}
.rcard.burning { border-color: var(--ember); background: rgba(255,90,31,.14); }
.rcard.burning .rfire  { animation: fireup 1.3s var(--ease) forwards; }
.rcard.burning .rflame { animation: glyphburn 1.3s var(--ease) forwards; }
.rcard.burning .rlabel { animation: fadeout .4s var(--ease) forwards; }
.rcard.burning .rslash { animation: slashin 1.3s var(--ease) forwards; }
.rcard.burning .rspent { animation: spentin 1.3s var(--ease) forwards; }
.rcard.burning .rember { animation: emberup 1.3s var(--ease) forwards; animation-delay: var(--ed, 0s); }

@keyframes fireup { 0% { height:0; opacity:0; } 12% { height:0; opacity:0; } 42% { height:100%; opacity:1; } 82% { height:100%; opacity:0; } 100% { height:0; opacity:0; } }
@keyframes glyphburn { 0% { transform: scale(1); opacity:1; } 40% { transform: scale(1.2); opacity:1; } 100% { transform: scale(.78); opacity:.2; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes slashin { 0%, 72% { opacity: 0; } 100% { opacity: 1; } }
@keyframes spentin { 0%, 75% { opacity: 0; } 100% { opacity: 1; } }
@keyframes emberup { 0% { opacity:0; transform: translate(0,0);} 22% { opacity:1; } 100% { opacity:0; transform: translate(var(--ex,0), -56px); } }

.rcard.spent { border-color: rgba(26,22,17,.14); background: transparent; }
.rcard.spent .rflame { opacity: .2; animation: none; }
.rcard.spent .ro { background: var(--dim); }
.rcard.spent .rt { background: var(--paper-dim); }
.rcard.spent .rindex { opacity: .3; }
.rcard.spent .rlabel { opacity: 0; }
.rcard.spent .rslash { opacity: 1; }
.rcard.spent .rspent { opacity: 1; }

/* ═══ PLATE MATH ════════════════════════════════════════════════
   The interactive piece. Plate colours are the real IWF competition
   set, so a lifter recognises 25/20/15/10 by colour before reading a
   single number. That is domain encoding, not decoration, which is why
   it is allowed its own palette next to the two brand accents. */

.plate-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plate-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 56px; align-items: center; }
.plate-copy { min-width: 0; }
.plate-copy h2 { font-size: clamp(30px, 4.2vw, 46px); text-transform: uppercase; margin-bottom: 18px; }

.plate-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.plate-presets button {
  font-family: var(--font-mono); font-size: 12.5px; padding: 9px 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--ink-raised); color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}
.plate-presets button:hover { border-color: var(--faint); color: var(--text); }
.plate-presets button.on { background: var(--text); border-color: var(--text); color: var(--ink); }

.plate-stage { min-width: 0; }

.plate-readout { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.plate-kg { font-family: var(--font-display); font-size: clamp(52px, 8vw, 84px); line-height: .9; font-variant-numeric: tabular-nums; }
.plate-unit { font-family: var(--font-mono); font-size: 16px; color: var(--muted); }
.plate-side { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); margin-left: auto; }

/* The bar itself: a shaft with a sleeve each side that plates stack onto,
   loaded from the collar outwards the way a real bar is. */
.barbell {
  position: relative; height: 148px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
}
.bar-shaft {
  position: absolute; left: 4%; right: 4%; height: 7px;
  background: linear-gradient(180deg, #8f8f96, #4d4d55);
  border-radius: 2px;
}
.bar-sleeve {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 3px; height: 100%;
}
.bar-sleeve.left  { right: 50%; flex-direction: row-reverse; padding-right: 26px; }
.bar-sleeve.right { left: 50%; flex-direction: row; padding-left: 26px; }

.plate {
  flex: none; width: 15px; border-radius: 3px;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.4);
  transform-origin: center;
  animation: plateOn .34s var(--ease) both;
  animation-delay: var(--pd, 0s);
  position: relative;
}
/* Loaded outwards from the collar, so each plate lands after the one
   inside it, the way you would actually slide them on. */
@keyframes plateOn {
  from { transform: scaleY(.34) translateX(var(--px, 14px)); opacity: 0; }
  to   { transform: scaleY(1) translateX(0); opacity: 1; }
}
.bar-sleeve.left .plate  { --px: 14px; }
.bar-sleeve.right .plate { --px: -14px; }

.plate span {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  writing-mode: vertical-rl; text-orientation: mixed;
  color: rgba(0,0,0,.62); user-select: none;
}
.plate.light span { color: rgba(0,0,0,.55); }
.plate.dark span  { color: rgba(255,255,255,.82); }

.collar {
  flex: none; width: 9px; height: 30px; border-radius: 2px;
  background: linear-gradient(180deg, #9a9aa2, #55555d);
  animation: plateOn .3s var(--ease) both;
}

.plate-label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  color: var(--faint); margin-bottom: 9px;
}

.plate-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; background: var(--line); border-radius: 2px; outline: none;
}
.plate-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ember); border: 3px solid var(--ink); cursor: grab;
  box-shadow: 0 0 0 1px var(--ember);
}
.plate-range::-webkit-slider-thumb:active { cursor: grabbing; }
.plate-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ember); border: 3px solid var(--ink); cursor: grab;
  box-shadow: 0 0 0 1px var(--ember);
}
.plate-range:focus-visible { outline: 2px solid var(--ember); outline-offset: 6px; }

.plate-note { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-top: 14px; min-height: 18px; }
.plate-note b { color: var(--text); font-weight: 500; }

/* ═══ ABOUT ═════════════════════════════════════════════════════ */

.about-section { background: var(--ink-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.person { background: var(--ink); padding: 32px 28px 30px; }
.person-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--ink-raised); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 17px; letter-spacing: .5px; color: var(--muted);
  margin-bottom: 20px;
}
.person h3 { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; letter-spacing: .2px; margin-bottom: 6px; }
.person-role { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--ember); margin-bottom: 14px; }
.person p { color: var(--muted); font-size: 14.5px; line-height: 1.75; margin-bottom: 16px; }
.person-link { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); border-bottom: 1px solid var(--line); transition: border-color .2s; }
.person-link:hover { border-color: var(--ember); }

.about-strip {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); padding: 24px 26px; margin-top: 1px;
  color: var(--muted); font-size: 14.5px; line-height: 1.75;
}
.about-strip .ico { stroke: var(--muted); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.about-strip strong { color: var(--text); font-family: var(--font-display); text-transform: uppercase; font-size: 14.5px; letter-spacing: .2px; display: block; margin-bottom: 6px; }

/* ═══ FAQ ═══════════════════════════════════════════════════════ */

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; text-align: left;
  font-family: var(--font-display); font-size: 20px; text-transform: uppercase; letter-spacing: .2px;
  color: var(--text); transition: color .2s;
}
.faq-q:hover { color: var(--ember); }
.faq-chev {
  width: 18px; height: 18px; flex: none; fill: none; stroke: var(--faint); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .3s var(--ease), stroke .2s;
}
.faq-q[aria-expanded="true"] .faq-chev { transform: rotate(180deg); stroke: var(--ember); }

/* Height is animated from a measured pixel value set in JS, because
   auto is not animatable and a fixed max-height guess either clips a
   long answer or makes a short one drift open slowly. */
.faq-a { height: 0; overflow: hidden; transition: height .32s var(--ease); }
.faq-a p { color: var(--muted); font-size: 15px; line-height: 1.8; max-width: 68ch; padding-bottom: 24px; }
.faq-a a { color: var(--text); border-bottom: 1px solid var(--line); }
.faq-a a:hover { border-color: var(--ember); }

/* ═══ HOW IT WORKS ══════════════════════════════════════════════ */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 32px 30px 6px; border-right: 1px solid var(--line); position: relative; }
.steps li:last-child { border-right: none; }
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--ember); display: block; margin-bottom: 20px; }
.steps li h3 { font-family: var(--font-display); font-size: 19px; text-transform: uppercase; letter-spacing: .2px; margin-bottom: 12px; }
.steps li p { color: var(--muted); font-size: 14.5px; line-height: 1.75; padding-bottom: 30px; }

/* ═══ PRICING ══════════════════════════════════════════════════ */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); max-width: 900px; }
.plan { background: var(--ink); padding: 36px 32px; position: relative; display: flex; flex-direction: column; }
.plan-pro {
  background:
    radial-gradient(520px circle at 80% 0%, rgba(167,139,250,.10), transparent 62%),
    var(--ink-raised);
  box-shadow: inset 0 0 0 1px rgba(167,139,250,.28);
}
.plan-flag {
  position: absolute; top: 24px; right: 24px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; color: var(--pro);
  border: 1px solid var(--pro-deep); background: var(--pro-soft);
  border-radius: 999px; padding: 4px 10px;
}
.plan header { margin-bottom: 28px; }
.plan-name { display: block; font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 16px; }
.plan-price { font-family: var(--font-display); font-size: 40px; letter-spacing: 0; text-transform: none; }
.plan-price small { font-family: var(--font-body); font-size: 13px; color: var(--faint); margin-left: 6px; font-weight: 500; }
.plan ul { display: grid; gap: 13px; margin-bottom: 30px; flex: 1; }
.plan li { display: flex; gap: 11px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.plan li::before { content: '+'; color: var(--green); flex: none; font-family: var(--font-mono); font-weight: 600; }
.plan-pro li::before { color: var(--pro); }
.plan li b { color: var(--text); font-weight: 700; }
.plan-note { font-size: 12px; color: var(--faint); margin-top: 14px; }

/* ═══ DOWNLOAD ═════════════════════════════════════════════════ */

.download { border-top: 1px solid var(--line); }
.download-panel h2 { font-size: clamp(32px, 4.8vw, 52px); margin-bottom: 16px; text-transform: uppercase; }
.download-panel .section-sub { max-width: 56ch; }

.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 44px 0 24px; }
.dl-card { background: var(--ink); padding: 28px 22px; display: grid; gap: 6px; transition: background .2s; }
.dl-card:hover { background: var(--ink-raised); }
.dl-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.dl-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.dl-label { font-family: var(--font-display); font-size: 19px; text-transform: uppercase; letter-spacing: .2px; }
.dl-meta { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-top: 4px; }

.dl-card.soon { opacity: .45; cursor: not-allowed; }
.dl-card.soon:hover { background: var(--ink); }

.apk-help { font-size: 13px; line-height: 1.8; color: var(--faint); max-width: 60ch; }

/* ═══ FOOTER ═══════════════════════════════════════════════════ */

.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-meta { display: flex; gap: 18px; }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════
   Three tiers: desktop (default), tablet (≤1024), phone (≤680). */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-bottom: 56px; }
  .ledger-card { transform: none; max-width: 460px; }
  .streak-grid { grid-template-columns: 1fr; gap: 40px; }
  .plate-grid { grid-template-columns: 1fr; gap: 40px; }
  .people { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: none; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: none; }
  .plans { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 88px 0; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 20px; }
  .section { padding: 68px 0; }
  .hero { padding: 40px 0 0; }
  .hero-grid { padding-top: 28px; padding-bottom: 44px; }

  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,10,9,.98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .38s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
  .nav-cta { text-align: center; border: none; }
  .nav-toggle { display: flex; }

  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .ledger-card { padding: 22px 20px 18px; }

  .barbell { height: 118px; }
  .plate { width: 12px; }
  .bar-sleeve.left { padding-right: 16px; }
  .bar-sleeve.right { padding-left: 16px; }
  .plate-side { margin-left: 0; width: 100%; }
  .faq-q { font-size: 17px; padding: 18px 0; }
  .person { padding: 26px 22px 24px; }
}

/* ═══ REDUCED MOTION ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title .word > span { transform: none; }
}
