/* ================================================================
   1. BASE / GLOBAL
   ================================================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.7;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
}

h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: var(--color-text-primary);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.microcopy {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 1rem 2rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-accent-blue);
  color: var(--color-text-primary);
  font-weight: var(--weight-bold);
  z-index: var(--z-tooltip);
}

:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* ================================================================
   2. LAYOUT UTILITIES
   ================================================================ */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding-x);
}

.section {
  padding: var(--section-padding-y-sm) 0;
}

.section--bg {
  background: var(--color-bg);
}

.section--surface {
  background: var(--color-surface);
}

.section-header {
  max-width: 48rem;
  margin-bottom: 3rem;
}

.section-header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.text-center {
  text-align: center;
}

/* ================================================================
   3. COMPONENT STYLES
   ================================================================ */

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  min-height: 3rem;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: #0F172A;
  background: var(--color-accent-amber);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

.btn-primary:hover {
  background: #D97706;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary--glow {
  animation: glow-pulse 3s ease-in-out infinite;
}

.btn-primary--glow:hover {
  animation: none;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
  50%      { box-shadow: 0 0 20px rgba(245, 158, 11, 0.4); }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  min-height: 3rem;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-blue);
  background: transparent;
  border: 1.5px solid var(--color-accent-blue);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.2);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast),
              background var(--transition-fast);
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: var(--text-lg);
}

/* ── Card ────────────────────────────────────────────── */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-normal),
              transform var(--transition-normal),
              border-color var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.5);
}

.card-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* ── Badge ───────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.025em;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge--green {
  color: #065F46;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge--blue {
  color: #1D4ED8;
  background: rgba(37, 99, 235, 0.10);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.badge--amber {
  color: #92400E;
  background: rgba(227, 163, 65, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ── Section Label ───────────────────────────────────── */

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  margin-bottom: 1rem;
}

/* ── Stat Number ─────────────────────────────────────── */

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-accent-green);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── Logo ────────────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  user-select: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-extrabold);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* ================================================================
   4. HEADER + STICKY NAV
   ================================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition-fast),
              box-shadow var(--transition-fast);
}

.header.scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.header-nav {
  display: none;
}

.header-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-cta {
  display: none;
  padding: 0.5rem 1.125rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  min-height: unset;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--color-text-primary);
  font-size: 1.5rem;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--color-bg);
  padding: 6rem var(--container-padding-x) 2rem;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 1rem;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav .btn-primary {
  margin-top: 1.5rem;
  text-align: center;
}

/* ================================================================
   5. HERO SECTION
   ================================================================ */

.hero {
  padding: 8rem 0 var(--section-padding-y-sm);
  text-align: center;
}

.hero h1 {
  max-width: 50rem;
  margin: 0 auto 1.5rem;
}

.hero .lead {
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.hero .btn-primary {
  margin-bottom: 1rem;
}

.hero .microcopy {
  margin-bottom: 3rem;
}

.trust-strip {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ================================================================
   6. SOCIAL PROOF STRIP
   ================================================================ */

.proof-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.proof-stat-caption {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.proof-affiliation {
  text-align: center;
  margin-bottom: 2rem;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.proof-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ================================================================
   7. PAIN POINTS SECTION
   ================================================================ */

.pain-bridge {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: center;
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

/* ================================================================
   8. WHY PEDAL SECTION
   ================================================================ */

.why-narrative {
  max-width: 48rem;
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
}

/* ================================================================
   9. SERVICES SECTION
   ================================================================ */

.card-outcome {
  color: var(--color-accent-green);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  margin-bottom: 0.75rem;
}

.inline-cta {
  text-align: center;
  margin-top: 3rem;
}

.inline-cta p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* ================================================================
   10. RESULTS / CASE STUDIES SECTION
   ================================================================ */

.case-card {
  border-left: 3px solid var(--color-accent-green);
}

.case-card h3 {
  font-size: var(--text-lg);
  margin: 1.25rem 0 0.5rem;
}

.result-highlight {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1.25rem;
}

.result-highlight p {
  color: var(--color-accent-green);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
}

.attribution {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-secondary);
  margin-top: 1rem;
}

/* ================================================================
   11. TESTIMONIALS SECTION
   ================================================================ */

.stars {
  color: var(--color-accent-amber);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial-name {
  display: block;
  font-style: normal;
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.testimonial-role {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: normal;
}

/* ================================================================
   12. PRICING SECTION
   ================================================================ */

.pricing-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.pricing-card--featured {
  border-color: var(--color-accent-amber);
  position: relative;
}

.pricing-label {
  margin-bottom: 0.75rem;
}

.pricing-range {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}

.pricing-features {
  text-align: left;
  margin-bottom: 2rem;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pricing-features li::before {
  content: '\2713';
  color: var(--color-accent-green);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.trust-line {
  text-align: center;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-top: 3rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   13. FAQ SECTION
   ================================================================ */

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

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

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding-bottom: 1.25rem;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ================================================================
   14. FINAL CTA SECTION
   ================================================================ */

.final-cta {
  text-align: center;
}

.final-cta h2 {
  margin-bottom: 1rem;
}

.final-cta .lead {
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.final-cta .btn-primary {
  margin-bottom: 1rem;
}

.secondary-contact {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 1.5rem;
}

.secondary-contact a {
  color: var(--color-accent-blue);
  text-decoration: underline;
}

.secondary-contact a:hover {
  color: var(--color-text-primary);
}

/* ================================================================
   15. FOOTER
   ================================================================ */

.footer {
  padding: 3rem 0;
  background: var(--color-bg);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-nav ul {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footer-legal ul {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

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

/* ================================================================
   16. ANIMATIONS
   ================================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 100ms; }
.stagger-3 { transition-delay: 200ms; }
.stagger-4 { transition-delay: 300ms; }
.stagger-5 { transition-delay: 400ms; }
.stagger-6 { transition-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn-primary--glow {
    animation: none;
  }
}

/* ================================================================
   17. MOBILE STICKY CTA BAR
   ================================================================ */

.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem var(--container-padding-x);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.mobile-cta-bar.visible {
  transform: translateY(0);
}

.mobile-cta-bar .btn-primary {
  width: 100%;
}

/* ================================================================
   18. RESPONSIVE OVERRIDES
   ================================================================ */

/* Scroll offset for anchor links */
section[id] {
  scroll-margin-top: 5rem;
}

/* ── Tablet (>= 768px) ──────────────────────────────── */

@media (min-width: 768px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-2xl); }

  .stat-number {
    font-size: var(--text-6xl);
  }

  .section {
    padding: var(--section-padding-y) 0;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-strip li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--color-border);
  }

  .trust-strip li:first-child {
    padding-left: 0;
    border-left: none;
  }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ── Desktop (>= 1024px) ────────────────────────────── */

@media (min-width: 1024px) {
  .header-nav {
    display: block;
  }

  .header-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

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

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-top: 10rem;
    padding-bottom: var(--section-padding-y);
  }
}

/* ── Mobile only (< 768px) ──────────────────────────── */

@media (max-width: 767px) {
  .mobile-cta-bar {
    display: block;
  }

  .hero {
    padding-top: 6.5rem;
  }
}

/* ================================================================
   SPECIALTY CARDS
   ================================================================ */

.specialty-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.specialty-card:hover {
  border-color: rgba(37, 99, 235, 0.5);
}

.specialty-card h3 {
  margin-bottom: 0.75rem;
}

.specialty-link {
  display: block;
  margin-top: auto;
  padding-top: 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-blue);
}

/* 4-column grid at wide viewports */
@media (min-width: 1280px) {
  .grid-4--full {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Breadcrumb for category pages */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.breadcrumb a {
  color: var(--color-accent-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.375rem;
}

/* Nav dropdown */
.nav-dropdown { position: relative; }

.dropdown-toggle { cursor: pointer; }
.dropdown-caret {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}
.nav-dropdown.open .dropdown-caret { transform: rotate(180deg); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 15rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
  padding: 0.5rem;
  z-index: var(--z-modal);
  list-style: none;
}
.nav-dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.dropdown-menu a:hover {
  background: rgba(37,99,235,0.08);
  color: var(--color-text-primary);
}

/* Mobile dropdown */
.mobile-dropdown-group { border-bottom: 1px solid var(--color-border); }

.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
}

.mobile-dropdown-items {
  display: none;
  padding: 0 0 0.5rem;
}
.mobile-dropdown-items.open { display: block; }

.mobile-dropdown-items a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  border-bottom: none;
}
