/* ═══════════════════════════════════════════════════════
   rebuilt.css — Shared Design System | Rebuilt v1.0
   ═══════════════════════════════════════════════════════ */

/* Fonts loaded via <link> in each HTML file */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── TOKENS — REBUILT DESIGN SYSTEM v2.0 ── */
:root {
  /* Canvas */
  --color-bg:          #F5F3EF;
  --color-bg-alt:      #EDE9E3;
  --color-surface:     #FFFFFF;
  --color-border:      rgba(0,0,0,0.07);
  --color-border-mid:  rgba(0,0,0,0.12);

  /* Text */
  --color-text-1:      #131110;
  --color-text-2:      #4D4A46;
  --color-text-3:      #908D89;

  /* Accent — Primary (verdant green: CTAs, logo, key UI) */
  --color-accent:        #35996A;
  --color-accent-deep:   #267A53;
  --color-accent-tint:   rgba(53,153,106,0.08);
  --color-accent-glow:   rgba(53,153,106,0.18);

  /* Accent — Energy (toned lime: gamification, data viz, badges) */
  --color-lime:          #A8CC2A;
  --color-lime-deep:     #8AAD1C;
  --color-lime-tint:     rgba(168,204,42,0.10);
  --color-lime-border:   rgba(168,204,42,0.25);

  /* Glass layer */
  --glass-fill:        rgba(255,255,255,0.72);
  --glass-border:      rgba(255,255,255,0.50);
  --glass-shadow:      0 8px 40px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);

  /* Spacing scale (4px base) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-3: 0 12px 48px rgba(0,0,0,0.09), 0 4px 16px rgba(0,0,0,0.05);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-ui:      'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Legacy aliases (mapped to v2.0 tokens) */
  --bg:          var(--color-bg);
  --bg-alt:      var(--color-bg-alt);
  --bg-card:     var(--color-surface);
  --bg-card-alt: var(--color-bg-alt);
  --fg:          var(--color-text-2);
  --fg-bright:   var(--color-text-1);
  --fg-muted:    var(--color-text-2);
  --fg-dim:      var(--color-text-3);
  --fg-faint:    var(--color-text-3);
  --accent:      var(--color-accent);
  --accent-h:    var(--color-accent-deep);
  --accent-text: var(--color-accent);
  --border:      var(--color-border);
  --border-lt:   var(--color-border);
  --nav-bg:      var(--glass-fill);
  --nav-bg-scrolled: rgba(255,255,255,0.92);
  --footer-bg:   var(--color-bg-alt);
}

/* ── BODY ── */
body {
  background: var(--color-bg);
  color: var(--color-text-1);
  font-family: var(--font-ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1040px;
  z-index: 100;
  background: var(--glass-fill);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}
.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 900; letter-spacing: .03em;
  text-transform: uppercase; color: var(--fg-bright); text-decoration: none;
  flex-shrink: 0;
}
.nav-logo b { color: var(--accent-text); font-weight: 900; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--color-text-2);
  text-decoration: none; transition: color .15s;
}
.nav-links a:hover { color: var(--color-text-1); }
.nav-links a.nav__link--active { color: var(--color-accent); }
.nav-right { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.nav-signin {
  font-size: 14px; font-weight: 500; color: var(--fg);
  text-decoration: none; transition: color .15s;
}
.nav-signin:hover { color: var(--fg-bright); }
.nav-cta {
  font-size: 14px; font-weight: 600;
  background: var(--color-text-1); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-pill);
  text-decoration: none; transition: background .15s;
  border: none; cursor: pointer;
}
.nav-cta:hover { background: var(--color-accent-deep); color: #fff; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--fg); transition: all .2s; }
.nav-mobile {
  display: none; position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px; z-index: 99;
  flex-direction: column; gap: 16px;
}
.nav-mobile a {
  font-size: 16px; color: var(--fg); text-decoration: none;
  padding: 8px 0; border-bottom: 1px solid var(--border-lt);
}
.nav-mobile .nav-cta {
  text-align: center; padding: 12px; border-radius: 6px;
  display: block; width: 100%; font-size: 15px; margin-top: 4px;
}
.nav-mobile.open { display: flex; }

/* ── LAYOUT ── */
.section { position: relative; z-index: 1; padding: 96px 0; }
.section.dark { background: var(--bg-alt); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── TYPOGRAPHY ── */
.section-label {
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  color: var(--accent-text); letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px); font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-text-1); line-height: 1; margin-bottom: 16px;
}
.section-sub {
  font-size: 17px; color: var(--fg-muted);
  max-width: 560px; margin-bottom: 48px;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block; background: var(--color-accent); color: #fff;
  font-size: 15px; font-weight: 600; padding: 14px 28px;
  border-radius: var(--radius-sm); text-decoration: none;
  transition: background .15s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--color-accent-deep); }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--accent-text);
  font-size: 15px; font-weight: 600; padding: 14px 28px;
  border-radius: 6px; text-decoration: none;
  border: 1px solid var(--accent); transition: all .15s; cursor: pointer;
}
.btn-secondary:hover { background: var(--color-accent-tint); }
.btn-large { font-size: 17px; padding: 16px 36px; }

/* ── HERO (centered — for-gyms / challenges) ── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 100px 24px 80px;
  position: relative; z-index: 1;
}
.hero-label {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--accent-text);
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 20px;
  animation: fadeUp .6s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 9vw, 96px); font-weight: 400;
  line-height: .92; letter-spacing: -0.02em;
  color: var(--color-text-1); margin-bottom: 28px;
  animation: fadeUp .6s .1s ease both;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 20px); color: var(--fg-muted);
  max-width: 520px; margin: 0 auto 36px;
  animation: fadeUp .6s .2s ease both;
}
.hero-btns {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 48px;
  animation: fadeUp .6s .3s ease both;
}
.hero-pills {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; animation: fadeUp .6s .4s ease both;
}
.hero-pill {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--fg-dim);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px; letter-spacing: .06em;
}

/* ── ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ── */
footer {
  background: var(--footer-bg); border-top: 1px solid var(--border-lt);
  padding: 48px 0 32px; position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 14px; color: var(--fg-faint); margin-top: 10px; line-height: 1.5; }
.footer-copy { font-size: 12px; color: var(--color-text-3); margin-top: 8px; }
.footer-col h4 {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--fg-dim);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--fg-faint);
  text-decoration: none; margin-bottom: 8px; transition: color .15s;
}
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom {
  border-top: 1px solid var(--bg-card); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-bottom span { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--color-text-3); }

/* ── FAQ ── */
.faq-list { margin-top: 48px; display: flex; flex-direction: column; gap: 2px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 24px; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 500; color: var(--fg-bright);
  font-family: 'DM Sans', sans-serif;
}
.faq-q:hover { color: var(--accent-text); }
.faq-arrow { color: var(--fg-dim); transition: transform .25s; font-size: 14px; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent-text); }
.faq-a { display: none; padding: 0 24px 20px; font-size: 15px; color: var(--fg-muted); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── FINAL CTA ── */
.final-cta { padding: 120px 24px; text-align: center; position: relative; z-index: 1; }
.final-cta h2 {
  font-family: var(--font-display); font-size: clamp(44px,7vw,72px);
  font-weight: 400; letter-spacing: -0.02em; color: var(--color-text-1);
  line-height: .95; margin-bottom: 20px;
}
.final-cta p { font-size: 18px; color: var(--fg-muted); margin-bottom: 36px; }
.final-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── PRICING ── */
.pricing-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 48px 40px;
  max-width: 400px; margin: 48px auto 0; text-align: center;
}
.pricing-price {
  font-family: var(--font-display);
  font-size: 72px; font-weight: 400; color: var(--color-text-1); line-height: 1;
}
.pricing-period { font-size: 20px; color: var(--fg-muted); font-weight: 400; }
.pricing-trial {
  font-family: 'DM Mono', monospace; font-size: 12px; color: var(--accent-text);
  letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 28px;
}
.pricing-features {
  list-style: none; text-align: left; margin-bottom: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.pricing-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--fg);
}
.pricing-features li::before { content: '✓'; color: var(--accent-text); font-weight: 700; flex-shrink: 0; }
.pricing-note { font-size: 13px; color: var(--fg-dim); margin-top: 16px; line-height: 1.5; }
.pricing-gym-callout {
  max-width: 500px; margin: 40px auto 0;
  padding: 28px; border-top: 1px solid var(--border);
  text-align: center;
}
.pricing-gym-callout p { font-size: 16px; color: var(--fg); margin-bottom: 6px; }
.pricing-gym-callout small { font-size: 14px; color: var(--fg-muted); display: block; margin-bottom: 14px; }
.pricing-gym-callout a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.pricing-gym-callout a:hover { text-decoration: underline; }

/* ── THEME TOGGLE ── */
.nav-theme-toggle {
  width: 36px; height: 36px; border-radius: 6px;
  border: 1px solid var(--border); background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted); transition: all .15s;
}
.nav-theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-text); }

/* ── COMING SOON LINKS ── */
.footer-col a[data-coming-soon="true"] {
  opacity: 0.5; cursor: default; pointer-events: none;
}
.footer-col a[data-coming-soon="true"]:hover { color: var(--fg-faint); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: var(--sp-3) var(--sp-4); width: calc(100% - 32px); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-card { padding: 36px 24px; margin: 32px 24px 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-btns, .final-cta-btns { flex-direction: column; align-items: center; }
}
