/* ============================================
   TRAIL FOR FUN — Site La Fontinoise 2026
   Brand: purple-to-orange gradient + topo lines
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Condensed:wght@400;500;600;700&family=Work+Sans:wght@300;400;500;600&display=swap');

/* --- CSS Variables (brand palette) --- */
:root {
  --purple-deep: #2a0a3e;
  --purple-mid: #4a1248;
  --purple-light: #6b1d52;
  --orange: #e14c04;
  --orange-light: #f06820;
  --orange-soft: #f5923e;
  --white: #ffffff;
  --cream: #f8f5f6;
  --text-body: #2c2c2c;
  --text-light: rgba(255,255,255,0.85);
  --text-muted: rgba(255,255,255,0.6);
  --gradient-brand: linear-gradient(135deg, var(--orange) 0%, var(--purple-mid) 50%, var(--purple-deep) 100%);
  --gradient-hero: linear-gradient(160deg, var(--orange) 0%, #c03518 30%, var(--purple-mid) 65%, var(--purple-deep) 100%);
  --shadow-soft: 0 4px 24px rgba(42, 10, 62, 0.18);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); }

body {
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.65;
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-light); }

h1, h2, h3, h4 { font-family: 'Anton', sans-serif; text-transform: uppercase; line-height: 1.1; letter-spacing: 0.5px; }

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

/* --- Topographic pattern overlay (reusable) --- */
.topo-bg {
  position: relative;
  overflow: hidden;
}
.topo-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1.5'%3E%3Cpath d='M-50 80Q200 30 500 90T1100 60'/%3E%3Cpath d='M-50 160Q200 120 500 170T1100 140'/%3E%3Cpath d='M-50 240Q200 200 500 250T1100 220'/%3E%3Cpath d='M-50 320Q200 290 500 330T1100 300'/%3E%3Cpath d='M-50 400Q200 370 500 410T1100 380'/%3E%3Cpath d='M-50 480Q200 450 500 490T1100 460'/%3E%3Cpath d='M-50 560Q200 530 500 570T1100 540'/%3E%3C/svg%3E");
  background-size: 800px 600px;
  pointer-events: none;
  z-index: 1;
}
.topo-bg > * { position: relative; z-index: 2; }

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(42, 10, 62, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nav-logo svg { width: 36px; height: 36px; }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-light);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--orange-soft); }

.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ===========================
   STICKY CTA
   =========================== */
.sticky-cta {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  background: var(--orange);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 50px;
  box-shadow: 0 6px 28px rgba(225, 76, 4, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.sticky-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(225, 76, 4, 0.55);
  color: var(--white);
}

/* ===========================
   HERO
   =========================== */
.hero {
  background: var(--gradient-hero);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0;
}
.hero-text { color: var(--white); }
.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--white);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--orange-soft); }
.hero-sub {
  font-family: 'Work Sans', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero-meta-item {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--text-light);
  letter-spacing: 0.5px;
}
.hero-meta-item svg { width: 20px; height: 20px; color: var(--orange-soft); }

.hero-image {
  position: relative;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  object-fit: cover;
  aspect-ratio: 3/2;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(225, 76, 4, 0.35);
}
.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(225, 76, 4, 0.45);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.btn-dark {
  background: var(--purple-deep);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--purple-mid);
  color: var(--white);
}

.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===========================
   DISTANCES STRIP
   =========================== */
.distances-strip {
  background: var(--purple-deep);
  padding: 48px 0;
}
.distances-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.distance-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.distance-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange-soft);
}
.distance-card .km {
  font-family: 'Anton', sans-serif;
  font-size: 48px;
  color: var(--white);
  line-height: 1;
}
.distance-card .unit {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--orange-soft);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.distance-card .elev {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ===========================
   SECTIONS
   =========================== */
section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--purple-deep);
  margin-bottom: 12px;
}
.section-header .section-line {
  width: 60px; height: 4px;
  background: var(--orange);
  margin: 0 auto 20px;
  border-radius: 2px;
}
.section-header p {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* --- About / Team section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text p {
  margin-bottom: 16px;
  font-size: 17px;
  color: #444;
}
.about-text p strong { color: var(--purple-deep); }
.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 4/3;
}

/* --- Photo gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-soft);
}
.gallery-grid .wide {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

/* --- Info cards --- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--orange);
}
.info-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--purple-deep);
  margin-bottom: 12px;
}
.info-card p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

/* --- Race details table --- */
.race-table-wrap {
  overflow-x: auto;
  margin-top: 32px;
}
.race-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
}
.race-table thead {
  background: var(--purple-deep);
  color: var(--white);
}
.race-table th {
  padding: 16px 20px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 14px;
}
.race-table td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: var(--text-body);
}
.race-table tbody tr:hover { background: rgba(225, 76, 4, 0.04); }
.race-table .km-cell {
  font-family: 'Anton', sans-serif;
  font-size: 24px;
  color: var(--purple-deep);
}
.race-table .price {
  font-weight: 700;
  color: var(--orange);
}

/* --- Race description blocks --- */
.race-desc {
  padding: 40px 0;
  border-bottom: 1px solid #e8e4e5;
}
.race-desc:last-child { border-bottom: none; }
.race-desc-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}
.race-desc-header h3 {
  font-size: 28px;
  color: var(--purple-deep);
}
.race-desc-header .elev-badge {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--orange);
  background: rgba(225, 76, 4, 0.08);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.race-desc p {
  font-size: 17px;
  color: #555;
  max-width: 720px;
}

/* --- Ravito details --- */
.ravito-list {
  list-style: none;
  margin-top: 24px;
}
.ravito-list li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ravito-list li::before {
  content: '🥤';
  font-size: 18px;
}

/* --- Practical info blocks --- */
.practical-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.practical-block h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--purple-deep);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.practical-block p {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
}

/* --- Results placeholder --- */
.results-placeholder {
  text-align: center;
  padding: 80px 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.results-placeholder h3 {
  font-size: 28px;
  color: var(--purple-deep);
  margin-bottom: 16px;
}
.results-placeholder p {
  font-size: 18px;
  color: #666;
  margin-bottom: 28px;
}

/* ===========================
   CTA BAND
   =========================== */
.cta-band {
  background: var(--gradient-brand);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 12px;
}
.cta-band p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
}
.cta-band .btn-primary {
  font-size: 20px;
  padding: 20px 48px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--purple-deep);
  color: var(--text-light);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.footer-brand svg { width: 48px; height: 48px; flex-shrink: 0; }
.footer-brand-text h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.footer-brand-text .since {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--orange-soft);
  letter-spacing: 2px;
}
.footer-brand-text p {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-links h5 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--white); }

/* ===========================
   PAGE HERO (sub-pages)
   =========================== */
.page-hero {
  background: var(--gradient-hero);
  padding: calc(var(--nav-height) + 64px) 0 64px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 19px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}
.breadcrumb {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.breadcrumb a { color: var(--orange-soft); }
.breadcrumb span { margin: 0 8px; }

/* ===========================
   PHOTO CREDIT
   =========================== */
.photo-credit {
  text-align: center;
  font-size: 13px;
  color: #999;
  padding: 16px;
  font-style: italic;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { order: -1; }
  .hero { min-height: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .distances-grid { grid-template-columns: repeat(2, 1fr); }
  .info-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 700px) {
  .nav-links { 
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(42, 10, 62, 0.97);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-content { padding: 40px 0; }
  .hero h1 { font-size: 2.8rem; }
  .distances-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid .wide { grid-column: span 2; }
  .sticky-cta {
    bottom: 16px; right: 16px;
    padding: 14px 22px;
    font-size: 14px;
  }
  .race-table { font-size: 15px; }
  .race-table th, .race-table td { padding: 12px 10px; }
}

@media (max-width: 480px) {
  .distances-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .btn { padding: 14px 24px; font-size: 15px; }
  section { padding: 56px 0; }
}

/* ===========================
   COUNTDOWN TIMER
   =========================== */
.countdown-section {
  background: var(--purple-deep);
  padding: 48px 0;
  text-align: center;
}
.countdown-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 24px;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.countdown-number {
  font-family: 'Anton', sans-serif;
  font-size: 64px;
  color: var(--white);
  line-height: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 24px;
  min-width: 100px;
}
.countdown-unit {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}
.countdown-separator {
  font-family: 'Anton', sans-serif;
  font-size: 48px;
  color: var(--orange);
  align-self: flex-start;
  padding-top: 20px;
}
@media (max-width: 600px) {
  .countdown-number { font-size: 42px; min-width: 72px; padding: 12px 16px; }
  .countdown-separator { font-size: 32px; padding-top: 14px; }
  .countdown { gap: 10px; }
  .countdown-block { min-width: 72px; }
}
