/* =========================================================
   Zone 2 Running Coach — shared stylesheet
   ========================================================= */

/* ---------------------------------------------------------
   Design tokens
   --------------------------------------------------------- */
:root {
  --bg:          #FAF7F2;
  --surface:     #FFFFFF;
  --text:        #1E1E1C;
  --muted:       #6B6963;
  --accent:      #7A9C8E;
  --accent-dark: #5F7D71;
  --pale-sage:   #EEF3F0;
  --danger:      #B85C5C;
  --pale-rose:   #F7ECEC;
  --rose-border: #E8CACA;
  --border:      #ECE7DE;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-w:       1120px;
  --legal-w:     720px;
  --px:          24px;
  --radius-card: 16px;
  --radius-pill: 999px;
}

/* ---------------------------------------------------------
   Reset & base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

ul, ol { list-style: none; }

a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

/* ---------------------------------------------------------
   Focus styles
   --------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------------------------------------------------------
   Skip link
   --------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.1s;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------
   Layout container
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

.container--legal {
  max-width: var(--legal-w);
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--accent-dark); }

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  border-radius: 9px;
  flex-shrink: 0;
  user-select: none;
}

.site-name { white-space: nowrap; }

.site-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 2px;
  display: inline-block;
}
.nav-list a:hover { color: var(--text); }
.nav-list a[aria-current="page"] { color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px 48px;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-legal {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 480px;
}
.footer-legal p + p { margin-top: 4px; }

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
}
.footer-nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.87rem;
}
.footer-nav-list a:hover { color: var(--text); }

/* ---------------------------------------------------------
   Section spacing
   --------------------------------------------------------- */
.section { padding-block: 72px; }
.section--sm { padding-block: 48px; }
.section--lg { padding-block: 96px; }

.section + .section { padding-top: 0; }

/* ---------------------------------------------------------
   Page hero (landing)
   --------------------------------------------------------- */
.page-hero {
  padding-block: 88px 72px;
  text-align: center;
}

.page-hero__inner {
  max-width: 680px;
  margin-inline: auto;
}

/* ---------------------------------------------------------
   Pill label
   --------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--pale-sage);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

/* ---------------------------------------------------------
   Headings
   --------------------------------------------------------- */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.hero-headline {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 36px;
}

.section-heading {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 48px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.15s, color 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover { background: var(--pale-sage); color: var(--accent-dark); }

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 32px;
}

/* ---------------------------------------------------------
   Feature grid
   --------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card { padding: 28px; }

.feature-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card__body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------------------------------------------------------
   Quote / principle card
   --------------------------------------------------------- */
.quote-card {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  padding: 40px 48px;
}

.quote-card blockquote {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  font-style: normal;
}

.quote-card blockquote em {
  font-style: italic;
  color: var(--accent-dark);
}

.quote-card__sub {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   Callout boxes
   --------------------------------------------------------- */
.callout {
  background: var(--pale-sage);
  border: 1px solid #C8DDD6;
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout strong { color: var(--text); }

.callout--warning {
  background: var(--pale-rose);
  border-color: var(--rose-border);
}

.callout--warning strong { color: var(--danger); }

/* ---------------------------------------------------------
   Prose content (legal pages)
   --------------------------------------------------------- */
.prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 52px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
}

.prose p { margin-bottom: 16px; }

.prose ul,
.prose ol {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 16px;
}

.prose ol { list-style: decimal; }

.prose li { margin-bottom: 6px; line-height: 1.6; }

.prose li p { margin-bottom: 0; }

.prose .callout { margin-bottom: 24px; }

.prose strong { font-weight: 600; }

/* ---------------------------------------------------------
   Page header (legal/support pages)
   --------------------------------------------------------- */
.page-intro {
  padding-block: 56px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.page-intro__label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.page-intro h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.page-intro__sub {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 32px;
}

/* ---------------------------------------------------------
   Needs list (landing page)
   --------------------------------------------------------- */
.needs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.needs-list li {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.97rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.needs-list li::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Contact card
   --------------------------------------------------------- */
.contact-card { text-align: center; }

.contact-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-card p {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 460px;
  margin-inline: auto;
  margin-bottom: 24px;
}

.contact-card .response-note {
  display: block;
  margin-top: 14px;
  font-size: 0.83rem;
  color: var(--muted);
}

/* Address block */
.address {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  font-style: normal;
}

/* ---------------------------------------------------------
   Closing callout section (landing page)
   --------------------------------------------------------- */
.cta-section {
  text-align: center;
}
.cta-section .callout {
  display: inline-block;
  max-width: 560px;
  text-align: center;
  padding: 40px 40px;
}
.cta-section .callout h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.cta-section .callout p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 24px;
}

/* ---------------------------------------------------------
   Sustainable running section
   --------------------------------------------------------- */
.sustain-section { max-width: 640px; }
.sustain-section p { color: var(--muted); margin-bottom: 14px; font-size: 1rem; }
.sustain-section p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------
   FAQ / common questions
   --------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--border); padding-block: 28px; }
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.faq-item p { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.faq-item p + p { margin-top: 10px; }

/* ---------------------------------------------------------
   404 page
   --------------------------------------------------------- */
.page-404 {
  text-align: center;
  padding-block: 96px 80px;
}
.page-404 h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.page-404 p { color: var(--muted); font-size: 1.05rem; margin-bottom: 36px; }
.page-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------------------------------------------------------
   Utility
   --------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mb-8  { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --px: 20px; }

  html { font-size: 16px; }

  .page-hero { padding-block: 60px 48px; }

  .feature-grid { grid-template-columns: 1fr; }

  .quote-card { padding: 28px 24px; }

  .card { padding: 22px 20px; }

  .section { padding-block: 52px; }
  .section--lg { padding-block: 64px; }

  .footer-inner { flex-direction: column; }

  .cta-section .callout { padding: 28px 24px; }

  .header-inner { gap: 10px; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 1.85rem; }
  .site-name { font-size: 0.88rem; }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
