/* ══════════════════════════════════════════════════════════════════
   MUSCLE TRAINING CLUB — Web (marketing + compliance)
   Shared stylesheet. Tokens mirror src/theme/tokens.ts from the app.
   Neon-noir: near-black surfaces lit by neon cyan. Glow is an accent,
   never a decorative wash. Verified WCAG 2.1 AA on intended backgrounds.
   ══════════════════════════════════════════════════════════════════ */

:root{
  /* Backgrounds */
  --bg:               #0A0A0F;
  --bg-deep:          #08080d;
  --surface:          #1A1A2E;
  --surface-elevated: #252540;
  --tabbar-bg:        #0D0D14;

  /* Neon accents */
  --primary:    #00F0FF;
  --secondary:  #FF50EF;
  --success:    #39FF14;
  --error:      #FF4D6A;
  --warning:    #FFB300;

  /* Text */
  --text:           #E0E0FF;
  --text-secondary: #9999BB;
  --text-muted:     #8888A8;

  /* Borders & effects */
  --border:       #2A2A45;
  --border-focus: #00F0FF;
  --overlay:      rgba(10,10,15,0.85);

  --glow-cyan:    rgba(0,240,255,0.30);
  --glow-magenta: rgba(255,80,239,0.30);
  --glow-green:   rgba(57,255,20,0.30);

  /* Spacing */
  --s-xs: 4px;  --s-sm: 8px;  --s-md: 12px; --s-lg: 16px;
  --s-xl: 24px; --s-xxl: 32px; --s-xxxl: 48px; --s-4xl: 64px; --s-5xl: 96px;

  /* Radius */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;

  /* Shadows / glow */
  --sh-glow:         0 0 8px var(--glow-cyan), 0 0 24px rgba(0,240,255,0.18);
  --sh-glow-magenta: 0 0 8px var(--glow-magenta), 0 0 24px rgba(255,80,239,0.18);
  --sh-card:         0 2px 4px rgba(0,0,0,0.3);

  /* Layout */
  --maxw: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2,0.6,0.2,1);
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:calc(var(--nav-h) + 24px); }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg-deep);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-size:16px; line-height:1.55; font-weight:400;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100vh;
  overflow-x:hidden;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
.pixel-art{ image-rendering:pixelated; image-rendering:crisp-edges; }
.mono{ font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace; }
.pixel-font{ font-family:'Press Start 2P',monospace; }

/* ─── Atmosphere (fixed, behind everything) ─────────────────────── */
.atmo{ position:fixed; inset:0; z-index:0; pointer-events:none; }
.atmo-glow{
  background:
    radial-gradient(ellipse 1100px 700px at 78% -8%, rgba(0,240,255,0.10), transparent 60%),
    radial-gradient(ellipse 900px 680px at -8% 22%, rgba(255,80,239,0.06), transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 108%, rgba(57,255,20,0.045), transparent 62%);
}
.atmo-grid{
  background-image:
    linear-gradient(rgba(0,240,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.035) 1px, transparent 1px);
  background-size:60px 60px;
  -webkit-mask-image:radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 80%);
          mask-image:radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 80%);
}
.atmo-scan{
  opacity:.45;
  background:repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255,255,255,0.012) 3px 4px);
}
.page-body{ position:relative; z-index:1; }

/* ─── Type scale ────────────────────────────────────────────────── */
.t-eyebrow{
  font-family:'JetBrains Mono',monospace;
  font-size:12px; letter-spacing:0.18em; text-transform:uppercase;
  color:var(--primary);
}
.t-eyebrow.muted{ color:var(--text-muted); }
h1,h2,h3,h4{ margin:0; letter-spacing:-0.02em; font-weight:700; line-height:1.1; }
.text-secondary{ color:var(--text-secondary); }
.text-muted{ color:var(--text-muted); }
.text-primary{ color:var(--primary); }
.text-success{ color:var(--success); }
.text-error{ color:var(--error); }
.text-warning{ color:var(--warning); }
.accent{ color:var(--primary); }

/* ─── Layout helpers ────────────────────────────────────────────── */
.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 32px; }
.wrap-narrow{ max-width:920px; }
.section{ padding:96px 0; }
.section-sm{ padding:64px 0; }
.divider{ border:0; border-top:1px solid var(--border); margin:0; }
.stack{ display:flex; flex-direction:column; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:48px; padding:13px 26px;
  border-radius:var(--r-md); border:1px solid transparent; background:transparent;
  font-family:inherit; font-size:15px; font-weight:600; line-height:1; letter-spacing:0.01em;
  cursor:pointer; transition:opacity 120ms var(--ease), transform 80ms var(--ease), box-shadow 160ms var(--ease);
  white-space:nowrap;
}
.btn:active{ opacity:.85; transform:scale(.98); }
.btn-primary{ border-color:var(--primary); color:var(--primary); box-shadow:var(--sh-glow); }
.btn-primary:hover{ box-shadow:0 0 12px var(--glow-cyan), 0 0 32px rgba(0,240,255,0.22); }
.btn-secondary{ border-color:var(--secondary); color:var(--secondary); }
.btn-ghost{ border-color:var(--border); color:var(--text); }
.btn-ghost:hover{ border-color:var(--text-secondary); }
.btn-danger{ border-color:var(--error); color:var(--error); }
.btn-lg{ min-height:56px; padding:16px 34px; font-size:16px; }
.btn-block{ width:100%; }

/* ─── Pills / tags ──────────────────────────────────────────────── */
.pill{
  display:inline-flex; align-items:center; gap:6px;
  border-radius:var(--r-sm); padding:5px 10px;
  font-size:12px; font-weight:600; line-height:1.2;
  background:var(--surface-elevated); color:var(--text-secondary);
}
.pill.cyan{ background:rgba(0,240,255,0.12); color:var(--primary); }
.pill.magenta{ background:rgba(255,80,239,0.14); color:var(--secondary); }
.pill.green{ background:rgba(57,255,20,0.14); color:var(--success); }
.pill.warn{ background:rgba(255,179,0,0.14); color:var(--warning); }

/* ─── Cards ─────────────────────────────────────────────────────── */
.card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:24px; box-shadow:var(--sh-card);
}
.card-hover{ transition:border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.card-hover:hover{ border-color:rgba(0,240,255,0.4); transform:translateY(-3px); box-shadow:var(--sh-glow); }

/* ════════════════════════════════════════════════════════════════
   NAVBAR (injected by site.js)
   ════════════════════════════════════════════════════════════════ */
.nav{
  position:sticky; top:0; z-index:100; height:var(--nav-h);
  background:rgba(8,8,13,0.78); backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  height:100%; max-width:var(--maxw); margin:0 auto; padding:0 32px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:40px; height:40px; border-radius:var(--r-md);
  border:1px solid var(--primary); background:rgba(0,240,255,0.06);
  display:grid; place-items:center; box-shadow:var(--sh-glow); overflow:hidden;
}
.brand-mark img{ width:30px; height:30px; }
.brand-word{ font-family:'Press Start 2P',monospace; font-size:13px; color:var(--primary); letter-spacing:0.04em; }
.nav-links{ display:flex; align-items:center; gap:6px; list-style:none; margin:0; padding:0; }
.nav-links a{
  display:inline-flex; align-items:center; height:40px; padding:0 14px;
  border-radius:var(--r-md); font-size:14px; font-weight:500; color:var(--text-secondary);
  transition:color 140ms var(--ease), background 140ms var(--ease);
}
.nav-links a:hover{ color:var(--text); background:rgba(255,255,255,0.03); }
.nav-links a.active{ color:var(--primary); }
.nav-right{ display:flex; align-items:center; gap:12px; }
.nav-toggle{
  display:none; width:44px; height:44px; border:1px solid var(--border);
  border-radius:var(--r-md); background:transparent; cursor:pointer;
  color:var(--text); align-items:center; justify-content:center;
}
.nav-toggle svg{ width:22px; height:22px; }

/* ════════════════════════════════════════════════════════════════
   FOOTER (injected by site.js)
   ════════════════════════════════════════════════════════════════ */
.footer{ border-top:1px solid var(--border); background:rgba(8,8,13,0.6); margin-top:96px; }
.footer-inner{
  max-width:var(--maxw); margin:0 auto; padding:64px 32px 40px;
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:48px;
}
.footer-brand .brand{ margin-bottom:16px; }
.footer-brand p{ color:var(--text-secondary); font-size:14px; max-width:34ch; margin:0 0 20px; }
.footer-col h4{ font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--text-muted); margin-bottom:16px; font-weight:600; }
.footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px; }
.footer-col a{ font-size:14px; color:var(--text-secondary); transition:color 140ms var(--ease); }
.footer-col a:hover{ color:var(--primary); }
.footer-bottom{
  max-width:var(--maxw); margin:0 auto; padding:24px 32px 40px;
  border-top:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
.footer-bottom .meta{ font-size:13px; color:var(--text-muted); }
.footer-bottom .meta a{ color:var(--text-secondary); }
.footer-bottom .meta a:hover{ color:var(--primary); }

/* ─── Store badges (CSS — placeholder for official badges) ──────── */
.store-badges{ display:flex; flex-wrap:wrap; gap:14px; }
.store-badge{
  display:inline-flex; align-items:center; gap:12px;
  min-height:56px; padding:10px 20px;
  border:1px solid var(--border); border-radius:var(--r-md);
  background:var(--surface); transition:border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.store-badge:hover{ border-color:rgba(0,240,255,0.45); box-shadow:var(--sh-glow); }
.store-badge svg{ width:28px; height:28px; flex-shrink:0; }
.store-badge .sb-text{ display:flex; flex-direction:column; line-height:1.2; }
.store-badge .sb-pre{ font-size:11px; color:var(--text-muted); letter-spacing:0.02em; }
.store-badge .sb-name{ font-size:17px; font-weight:600; color:var(--text); letter-spacing:0.01em; }

/* ════════════════════════════════════════════════════════════════
   PAGE HEADER (shared across content pages)
   ════════════════════════════════════════════════════════════════ */
.page-header{ padding:64px 0 48px; border-bottom:1px solid var(--border); }
.page-header .crumb{
  font-family:'JetBrains Mono',monospace; font-size:12px; letter-spacing:0.1em;
  color:var(--text-muted); margin-bottom:18px;
}
.page-header .crumb a{ color:var(--text-secondary); }
.page-header .crumb a:hover{ color:var(--primary); }
.page-header h1{ font-size:46px; line-height:1.05; margin:0 0 16px; }
.page-header .lede{ font-size:18px; color:var(--text-secondary); max-width:60ch; margin:0; }
.page-header .updated{
  margin-top:20px; display:inline-flex; align-items:center; gap:8px;
  font-size:13px; color:var(--text-muted);
}
.page-header .updated .dot{ width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 8px var(--glow-green); }

/* ─── Legal layout: sticky TOC + prose ──────────────────────────── */
.legal{
  display:grid; grid-template-columns:240px 1fr; gap:64px;
  padding:56px 0 24px; align-items:start;
}
.toc{ position:sticky; top:calc(var(--nav-h) + 32px); }
.toc h4{ font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--text-muted); margin:0 0 16px; font-weight:600; }
.toc ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; border-left:1px solid var(--border); }
.toc a{
  display:block; padding:7px 16px; font-size:13px; color:var(--text-secondary);
  border-left:2px solid transparent; margin-left:-1px; transition:color 140ms var(--ease), border-color 140ms var(--ease);
}
.toc a:hover{ color:var(--text); }
.toc a.active{ color:var(--primary); border-left-color:var(--primary); }

.prose{ max-width:72ch; }
.prose section{ padding:0 0 40px; scroll-margin-top:calc(var(--nav-h) + 24px); }
.prose h2{ font-size:24px; margin:0 0 16px; display:flex; align-items:baseline; gap:12px; }
.prose h2 .sn{ font-family:'JetBrains Mono',monospace; font-size:14px; color:var(--primary); font-weight:400; }
.prose h3{ font-size:17px; font-weight:600; margin:28px 0 10px; color:var(--text); }
.prose p{ color:var(--text-secondary); margin:0 0 16px; line-height:1.7; }
.prose ul,.prose ol{ color:var(--text-secondary); margin:0 0 16px; padding-left:22px; line-height:1.7; }
.prose li{ margin-bottom:8px; }
.prose li::marker{ color:var(--primary); }
.prose a.inline{ color:var(--primary); border-bottom:1px solid rgba(0,240,255,0.3); }
.prose strong{ color:var(--text); font-weight:600; }
.callout{
  border:1px solid var(--border); border-left:3px solid var(--primary);
  background:rgba(0,240,255,0.04); border-radius:var(--r-md);
  padding:16px 20px; margin:0 0 16px;
}
.callout.warn{ border-left-color:var(--warning); background:rgba(255,179,0,0.05); }
.callout p:last-child{ margin-bottom:0; }

/* ─── Steps (data deletion) ─────────────────────────────────────── */
.steps{ list-style:none; counter-reset:step; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
.steps li{
  position:relative; counter-increment:step;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:20px 24px 20px 68px;
}
.steps li::before{
  content:counter(step); position:absolute; left:20px; top:20px;
  width:32px; height:32px; border-radius:var(--r-md);
  border:1px solid var(--primary); color:var(--primary);
  display:grid; place-items:center; font-family:'JetBrains Mono',monospace;
  font-size:14px; font-weight:700; box-shadow:var(--sh-glow); background:rgba(0,240,255,0.04);
}
.steps li h3{ margin:0 0 6px; font-size:16px; font-weight:600; color:var(--text); }
.steps li p{ margin:0; color:var(--text-secondary); font-size:14px; line-height:1.6; }

/* ─── FAQ accordion ─────────────────────────────────────────────── */
.faq-group{ display:flex; flex-direction:column; gap:12px; }
.faq-item{ border:1px solid var(--border); border-radius:var(--r-lg); background:var(--surface); overflow:hidden; transition:border-color 160ms var(--ease); }
.faq-item[open]{ border-color:rgba(0,240,255,0.35); }
.faq-item summary{
  list-style:none; cursor:pointer; padding:20px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  font-size:16px; font-weight:600; color:var(--text);
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item .chev{ flex-shrink:0; width:20px; height:20px; color:var(--primary); transition:transform 200ms var(--ease); }
.faq-item[open] .chev{ transform:rotate(45deg); }
.faq-item .faq-body{ padding:0 24px 22px; color:var(--text-secondary); line-height:1.7; }
.faq-item .faq-body p{ margin:0 0 12px; }
.faq-item .faq-body p:last-child{ margin-bottom:0; }

/* ─── Forms (contact) ───────────────────────────────────────────── */
.field{ display:flex; flex-direction:column; gap:7px; }
.field label{ font-size:14px; font-weight:600; color:var(--text); }
.field input,.field select,.field textarea{
  min-height:48px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-md); padding:12px 16px; color:var(--text);
  font:400 16px/1.5 'Inter',sans-serif; outline:none; width:100%;
  transition:border-color 140ms var(--ease);
}
.field textarea{ min-height:140px; resize:vertical; }
.field input::placeholder,.field textarea::placeholder{ color:var(--text-muted); }
.field input:focus,.field select:focus,.field textarea:focus{ border-color:var(--primary); caret-color:var(--primary); box-shadow:0 0 0 1px var(--primary); }

/* ─── Section heading block ─────────────────────────────────────── */
.sec-head{ max-width:60ch; margin-bottom:48px; }
.sec-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.sec-head h2{ font-size:38px; line-height:1.08; margin:14px 0 16px; }
.sec-head p{ font-size:17px; color:var(--text-secondary); margin:0; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px){
  .footer-inner{ grid-template-columns:1fr 1fr; gap:40px 32px; }
  .legal{ grid-template-columns:1fr; gap:32px; }
  .toc{ position:static; }
  .toc ul{ flex-direction:row; flex-wrap:wrap; border-left:0; gap:8px; }
  .toc a{ border:1px solid var(--border); border-radius:var(--r-full); padding:6px 14px; }
  .toc a.active{ border-color:var(--primary); }
  .nav-links{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .nav.open .nav-links{
    display:flex; flex-direction:column; position:absolute; top:var(--nav-h); left:0; right:0;
    background:rgba(8,8,13,0.97); backdrop-filter:blur(14px); border-bottom:1px solid var(--border);
    padding:16px; gap:4px;
  }
  .nav.open .nav-links a{ height:48px; width:100%; }
  .page-header h1{ font-size:34px; }
  .sec-head h2{ font-size:30px; }
  .section{ padding:64px 0; }
}
@media (max-width: 560px){
  .wrap{ padding:0 20px; }
  .footer-inner{ grid-template-columns:1fr; }
  .footer-bottom{ padding:24px 20px 40px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
