/* ==========================================================================
   Sunrise City Marathon — design tokens
   Display: Anton (bib-number energy) / Body: Inter
   Palette: asphalt dark, chalk-line light, track lime, sunrise coral
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --asphalt: #14171c;
  --asphalt-2: #1e2229;
  --asphalt-3: #2a2f38;
  --chalk: #f5f3ec;
  --chalk-2: #ebe8de;
  --lime: #c8ff4d;
  --coral: #ff5a3c;
  --ink: #14171c;
  --muted: #6b7078;
  --muted-light: #9aa0ab;
  --line: rgba(20, 23, 28, 0.12);
  --line-dark: rgba(245, 243, 236, 0.14);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--chalk);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0;
}

p { margin: 0 0 1em; color: var(--muted); max-width: 62ch; }

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

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--lime);
  color: var(--asphalt);
}
.btn-primary:hover { background: #d7ff70; }

.btn-outline {
  background: transparent;
  border-color: var(--line-dark);
  color: inherit;
}
.btn-outline:hover { border-color: var(--lime); }

.btn-coral {
  background: var(--coral);
  color: var(--chalk);
}
.btn-coral:hover { background: #ff7457; }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--asphalt);
  border-bottom: 1px solid var(--line-dark);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: var(--chalk);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--chalk);
}
.logo .mark { flex-shrink: 0; }
.logo .mark circle { stroke: var(--lime); }
.logo .mark path { stroke: var(--lime); }
.logo small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted-light);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--chalk); border-bottom-color: var(--lime); }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; }

@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--asphalt);
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 28px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line-dark);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    color: var(--chalk);
    padding: 8px 10px;
    cursor: pointer;
  }
  .nav-cta .btn-outline { display: none; }
}

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

.hero {
  background: var(--asphalt);
  color: var(--chalk);
  padding: 64px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.bib-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px dashed var(--line-dark);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lime);
  margin-bottom: 22px;
}
.bib-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.hero h1 {
  font-size: clamp(48px, 7.2vw, 92px);
  color: var(--chalk);
}
.hero h1 span { color: var(--lime); }

.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--muted-light);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.splits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  max-width: 560px;
}
.splits div + div { border-left: 1px solid var(--line-dark); padding-left: 22px; }
.splits dt {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--lime);
}
.splits dd {
  margin: 4px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted-light);
}

.route-art { position: relative; }
.route-art svg { width: 100%; height: auto; }

/* ---------- Section basics ---------- */

.section { padding: 84px 0; }
.section-alt { background: var(--chalk-2); }
.section-dark { background: var(--asphalt); color: var(--chalk); }
.section-dark p { color: var(--muted-light); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { margin: 10px 0 0; }

/* ---------- Category / distance cards ---------- */

.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.category-card {
  background: var(--chalk);
  padding: 34px 30px;
}
.category-card .dist {
  font-family: var(--font-display);
  font-size: 54px;
  line-height: 1;
}
.category-card .dist small { font-size: 22px; margin-left: 4px; }
.category-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 17px; margin-top: 14px; }
.category-card .price {
  margin-top: 18px;
  font-weight: 800;
  font-size: 22px;
  color: var(--coral);
}
.category-card ul { list-style: none; margin: 16px 0 0; padding: 0; font-size: 13.5px; color: var(--muted); }
.category-card li { padding: 5px 0; border-top: 1px solid var(--line); }
.category-card li:first-child { border-top: none; }

@media (max-width: 780px) {
  .categories { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .route-art { order: -1; max-width: 260px; }
}

/* ---------- Payment / QR bib card ---------- */

.bib-card-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }

.bib-card {
  background: var(--chalk);
  border-radius: 10px;
  padding: 30px;
  position: relative;
  box-shadow: 0 30px 60px -30px rgba(20, 23, 28, 0.35);
  border: 2px dashed var(--asphalt-3);
}
.bib-card::before, .bib-card::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--asphalt);
  top: 50%; transform: translateY(-50%);
}
.bib-card::before { left: -12px; }
.bib-card::after { right: -12px; }

.bib-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.bib-card-top .event-name { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.03em; }
.bib-card-top .bib-no { font-family: var(--font-display); font-size: 26px; color: var(--coral); }

.qr-frame {
  background: var(--chalk);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  justify-content: center;
}
.qr-frame img { width: 100%; max-width: 230px; }

.bib-card-meta { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.bib-card-meta strong { color: var(--ink); }

.pay-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.pay-steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.pay-steps li:first-child { border-top: none; padding-top: 0; }
.pay-steps li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--coral);
  flex-shrink: 0;
  width: 34px;
}
.pay-steps h4 { font-size: 16px; margin-bottom: 4px; }
.pay-steps p { margin: 0; font-size: 14px; }

.note-box {
  margin-top: 24px;
  border-left: 3px solid var(--lime);
  background: var(--chalk-2);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--muted);
  border-radius: 0 6px 6px 0;
}

@media (max-width: 900px) { .bib-card-wrap { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */

.form-card {
  background: var(--chalk);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px;
  max-width: 680px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row.single { grid-template-columns: 1fr; }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.field .req { color: var(--coral); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--asphalt);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field small { display: block; margin-top: 6px; color: var(--muted-light); font-size: 12px; }

.hp-field { position: absolute; left: -9999px; opacity: 0; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 24px;
}
.alert-success { background: #e6f7d9; border: 1px solid #b7e08a; color: #3a5a12; }
.alert-error { background: #fde3dc; border: 1px solid #ffb6a3; color: #9c2c17; }

@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } .form-card { padding: 26px; } }

/* ---------- Result / bib confirmation ---------- */

.result-card {
  background: var(--asphalt);
  color: var(--chalk);
  border-radius: 10px;
  padding: 44px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.result-card .bib-no {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--lime);
  margin: 10px 0 4px;
}
.result-card p { color: var(--muted-light); margin-left: auto; margin-right: auto; }

/* ---------- Info blocks / timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.timeline li:first-child { border-top: none; }
.timeline time { font-family: var(--font-display); font-size: 20px; color: var(--coral); }
.timeline h4 { font-size: 17px; margin-bottom: 6px; font-family: var(--font-body); font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } .timeline li { grid-template-columns: 80px 1fr; } }

.rules-list { list-style: none; margin: 0; padding: 0; }
.rules-list li {
  padding: 14px 0 14px 30px;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 14.5px;
  color: var(--muted);
}
.rules-list li:first-child { border-top: none; }
.rules-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 20px;
  width: 8px; height: 8px;
  background: var(--lime);
  border: 1.5px solid var(--asphalt);
  border-radius: 50%;
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
.contact-info dl { margin: 26px 0 0; }
.contact-info dt { font-size: 12px; letter-spacing: 0.05em; color: var(--muted-light); font-weight: 700; margin-top: 20px; }
.contact-info dd { margin: 4px 0 0; font-size: 16px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--asphalt);
  color: var(--muted-light);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-grid h4 { font-family: var(--font-body); color: var(--chalk); font-size: 14px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14px; }
.footer-grid a:hover { color: var(--lime); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 10px;
}

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