/* =========================================================
   Base Tokens
   ========================================================= */
:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #fbfdff;
  --text: #0f172a;
  --text-muted: #5b667a;
  --line: #e7ecf5;
  --line-strong: #d8e1ef;
  --primary: #2f6e52;
  --primary-strong: #245641;
  --primary-soft: #e9f4ee;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 40px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --max-width: 1140px;
  --font-ui: "Manrope", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* =========================================================
   Global Resets
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(47, 110, 82, 0.08), transparent 65%),
    radial-gradient(760px 420px at 100% 0%, rgba(47, 110, 82, 0.05), transparent 62%),
    var(--bg);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

/* =========================================================
   Layout Helpers
   ========================================================= */
.container {
  width: min(var(--max-width), 100% - 2rem);
  margin: 0 auto;
}

.section {
  padding: 2.5rem 0 0;
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.section-head {
  margin-bottom: 1.4rem;
}

.section-head h2,
.section h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.1;
}

/* =========================================================
   Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2f6e52, #3f8a63);
  color: #eefbf2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  gap: 1.2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(145deg, var(--primary), #3f8a63);
  color: #f4fff8;
  box-shadow: 0 10px 20px rgba(47, 110, 82, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(145deg, var(--primary-strong), var(--primary));
}

.btn-soft,
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-soft:hover,
.btn-ghost:hover {
  box-shadow: var(--shadow-sm);
}

.strava-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.strava-connect img {
  height: 44px;
  width: auto;
  display: block;
}

.strava-connect:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.strava-connect:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding-top: 5rem;
  padding-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero-name {
  margin: 0;
  font-size: clamp(4rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--primary);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.hero .lead {
  margin: 0;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}


/* =========================================================
   Cards + Grids
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.features-grid,
.testimonials-grid,
.pricing-grid {
  display: grid;
  gap: 1rem;
}

.feature-card,
.quote,
.pricing-card {
  padding: 1.2rem;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.feature-card p,
.quote p,
.final-cta p {
  margin: 0.6rem 0 0;
  color: var(--text-muted);
}

.feature-card:hover,
.quote:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* =========================================================
   Testimonials
   ========================================================= */
.quote footer {
  margin-top: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 1.1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "›";
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  transform: rotate(90deg);
  display: inline-block;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(270deg);
}

.faq-item p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  padding: 2rem;
  text-align: center;
}

.final-cta h2 {
  margin: 0;
}

.final-cta .hero-actions {
  margin-top: 1rem;
  justify-content: center;
  align-items: center;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.footer-inner a {
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text);
}

.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.strava-powered {
  display: inline-flex;
  align-items: center;
}

.strava-powered img {
  height: 26px;
  width: auto;
}

/* =========================================================
   Scroll Reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 760px) {
  .nav-links {
    display: flex;
  }

  .hero {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


@media (max-width: 759px) {
  .container {
    width: min(var(--max-width), 100% - 1.5rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .actions.compact,
  .final-cta .btn {
    width: 100%;
  }

  .actions.compact .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    padding: 0.8rem 0;
  }

  .footer-right {
    flex-direction: column;
    gap: 0.45rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1117;
    --surface: #111a23;
    --surface-soft: #151f2a;
    --text: #e6edf5;
    --text-muted: #9fb0c3;
    --line: #243244;
    --line-strong: #2f4157;
    --primary: #4a8f6d;
    --primary-strong: #5ca980;
    --primary-soft: #142b21;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.42);
  }

  body {
    background:
      radial-gradient(900px 480px at 0% -10%, rgba(91, 180, 135, 0.14), transparent 65%),
      radial-gradient(760px 420px at 100% 0%, rgba(91, 180, 135, 0.1), transparent 62%),
      var(--bg);
  }

  .site-header { background: rgba(11, 17, 23, 0.84); }
  .desktop-tabs,
  .nav-links a:hover { color: var(--text); }
  .btn-soft,
  .btn-ghost { background: var(--surface); }

  .feature-card,
  .final-cta,
  .card {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
  }

  .icon { background: #1a2736; }
  .icon img { filter: invert(1) brightness(0.85); }
  .site-footer {
    border-top-color: var(--line);
    background: rgba(11, 17, 23, 0.86);
  }
  .footer-right a { color: #b6cae0; }
}
