/* ============================================
   Zone Pedal — zonepedal.com
   Static site styles
   ============================================ */

/* --- Reset & Custom Properties --- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0c;
  --bg-surface: #111114;
  --bg-elevated: #19191e;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(240, 133, 12, 0.25);
  --text: #e4e4e8;
  --text-secondary: #8c8c98;
  --text-muted: #55555f;
  --accent: #f0850c;
  --accent-soft: rgba(240, 133, 12, 0.1);
  --accent-glow: rgba(240, 133, 12, 0.06);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --container: min(72rem, 90vw);
  --section-gap: clamp(5rem, 10vw, 8rem);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

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

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

/* --- Navigation --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.logo span {
  color: var(--accent);
  transition: color 0.2s;
}

.logo:hover { color: var(--accent); opacity: 1; }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* --- Hero --- */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.overline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
  animation: fade-down 0.8s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: fade-down 0.8s ease 0.1s both;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 32ch;
  margin: 0 auto;
  animation: fade-down 0.8s ease 0.2s both;
}

/* --- Hero Visualization --- */

.hero-viz {
  width: 100%;
  max-width: 56rem;
  margin: 3rem auto 0;
  position: relative;
  z-index: 1;
  padding: 0 1rem;
  animation: fade-up 1s ease 0.5s both;
}

.hero-viz svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.zone-band { fill: var(--accent-soft); }

.zone-line {
  stroke: var(--accent);
  opacity: 0.2;
  stroke-dasharray: 4 6;
}

.zone-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  fill: var(--accent);
  opacity: 0.4;
}

.hr-trace-glow {
  stroke: var(--accent);
  opacity: 0.12;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-trace 3.5s ease-out 0.8s forwards;
}

.hr-trace {
  stroke: var(--accent);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-trace 3.5s ease-out 0.8s forwards;
}

@keyframes draw-trace {
  to { stroke-dashoffset: 0; }
}

.zone-badge {
  opacity: 0;
  animation: badge-in 0.6s ease forwards;
  animation-delay: 4s;
}

.zone-badge rect { fill: var(--accent); }

.zone-badge text {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: bold;
  fill: var(--bg);
  letter-spacing: 0.1em;
}

@keyframes badge-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Hero Metrics --- */

.hero-metrics {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s ease 0.6s both;
}

.metric { text-align: center; }

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text);
  display: block;
}

.metric-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

/* --- Section Shared --- */

section {
  padding: var(--section-gap) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--text);
}

.section-divider {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

/* --- Features --- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: var(--container);
  max-width: 56rem;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  transition: border-color 0.3s, background-color 0.3s;
}

.feature-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
}

.feature-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Plans --- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: var(--container);
  max-width: 56rem;
  margin: 0 auto;
}

.plan-group h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.plan-group ul {
  list-style: none;
  padding: 0;
}

.plan-group li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 2;
  white-space: nowrap;
}

.plan-note {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- How It Works --- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: var(--container);
  max-width: 56rem;
  margin: 0 auto;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: calc(16.67% + 2rem);
  right: calc(16.67% + 2rem);
  height: 1px;
  background: linear-gradient(90deg, var(--border-accent), var(--accent) 50%, var(--border-accent));
  opacity: 0.3;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 24ch;
  margin: 0 auto;
}

/* --- CTA --- */

.cta {
  text-align: center;
  padding: var(--section-gap) 0;
}

.cta p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  font-family: var(--font-body);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(240, 133, 12, 0.15);
  opacity: 1;
}

.app-store-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.badge-small {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.badge-large {
  font-size: 1.15rem;
  font-weight: 600;
}

/* --- Footer --- */

.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); opacity: 1; }

/* --- Document Pages (Privacy, Terms) --- */

.document {
  max-width: 48rem;
  margin: 0 auto;
  padding: 10rem 2rem 6rem;
}

.document h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.document .last-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.document h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.document h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.document p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.document ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.document ul li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.document ul li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.document a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document strong {
  font-weight: 500;
  color: var(--text);
}

.document .contact-block {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.document .contact-block a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* --- Animations --- */

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.15s; }
.fade-in:nth-child(4) { transition-delay: 0.2s; }

/* --- Responsive --- */

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .steps::before { display: none; }

  .hero-metrics {
    flex-direction: column;
    gap: 1.5rem;
  }

  .feature-card { padding: 2rem; }

  .site-footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-links { gap: 1rem; }
  .hero { padding: 7rem 1rem 3rem; }
  .hero-metrics { gap: 1.25rem; }
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
