:root {
  --c-primary: #d53a18;
  --c-primary-dark: #b02a0e;
  --c-accent: #f5b000;
  --c-dark: #121212;
  --c-dark-muted: #2a2a2c;
  --c-light: #f8f6f0;
  --c-white: #ffffff;
  --c-border: #e2ded0;
  
  --font-h: 'Bricolage Grotesque', sans-serif;
  --font-b: 'Jost', sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  
  --radius: 4px;
}

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

body {
  font-family: var(--font-b);
  background-color: var(--c-light);
  color: var(--c-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-h);
  line-height: 1.1;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2.5rem, 8vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.01em; margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

p { margin-bottom: var(--space-sm); font-size: 1.125rem; }

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

a { color: var(--c-primary); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--c-primary-dark); }

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--c-dark-muted);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--space-sm);
  max-width: 1400px; margin: 0 auto;
}
.nav-logo {
  font-family: var(--font-h);
  font-size: 1.75rem;
  color: var(--c-white);
  font-weight: 800;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--c-primary); }
.nav-links {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.nav-links a {
  color: var(--c-white);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--c-primary); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none; border: none; color: white;
  font-size: 1.5rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--c-primary);
  color: var(--c-white);
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--c-dark); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn:hover { color: var(--c-white); }
.btn:hover::before { transform: scaleY(1); }

.btn-outline { background: transparent; border: 2px solid var(--c-dark); color: var(--c-dark); }
.btn-outline::before { background: var(--c-dark); }
.btn-outline:hover { color: var(--c-white); border-color: var(--c-dark); }

.btn-light { background: transparent; border: 2px solid var(--c-white); color: var(--c-white); }
.btn-light::before { background: var(--c-white); }
.btn-light:hover { color: var(--c-dark); border-color: var(--c-white); }

/* Heroes */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  padding-bottom: var(--space-lg);
  background-size: cover;
  background-position: center;
  margin-top: 0;
  padding-top: 100px; /* Space for nav */
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,18,18,0.95) 0%, rgba(18,18,18,0.4) 50%, rgba(18,18,18,0.2) 100%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  color: var(--c-white);
  width: 100%;
}
.hero-subtitle {
  color: var(--c-accent); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; display: block;
}
.hero-meta {
  display: flex; gap: 2rem; margin-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: var(--space-sm);
  flex-wrap: wrap;
}
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-accent); font-weight: 700; }
.meta-value { font-family: var(--font-h); font-size: 1.5rem; }

.page-header {
  padding: 150px 0 var(--space-md);
  background: var(--c-dark);
  color: var(--c-white);
  text-align: center;
}

/* Sections */
.section { padding: var(--space-xl) 0; }
.section-sm { padding: var(--space-md) 0; }
.section-dark { background: var(--c-dark); color: var(--c-white); }
.section-accent { background: var(--c-accent); color: var(--c-dark); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }

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

/* Route/Bike Cards */
.card {
  background: var(--c-white);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: transform 0.4s ease;
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.card-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img-wrap img { transform: scale(1.05); }
.card-body { padding: var(--space-md); flex: 1; display: flex; flex-direction: column; }
.card-tag { 
  position: absolute; top: 1rem; right: 1rem; 
  background: var(--c-primary); color: white; 
  padding: 0.25rem 0.75rem; font-family: var(--font-h); font-size: 0.8rem; text-transform: uppercase; 
  z-index: 2;
}
.card-stats {
  display: flex; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.stat { font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 0.25rem; color: var(--c-dark-muted); }

/* Blockquote */
blockquote {
  font-size: 1.5rem; font-style: italic; border-left: 4px solid var(--c-primary); padding-left: 1.5rem; margin: 2rem 0; color: var(--c-dark-muted);
}

/* Footer */
.site-footer {
  background: var(--c-dark); color: var(--c-white);
  padding: var(--space-xl) 0 var(--space-md);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-title { color: var(--c-accent); font-family: var(--font-h); font-size: 1.2rem; margin-bottom: 1.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #ccc; font-size: 0.95rem; display: block; }
.footer-links a:hover { color: var(--c-white); transform: translateX(5px); }
.footer-bottom { border-top: 1px solid var(--c-dark-muted); padding-top: var(--space-md); display: flex; justify-content: space-between; font-size: 0.85rem; color: #888; flex-wrap: wrap; gap: 1rem; }

/* Topographic background */
.bg-topo {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%231a1a1d' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.bg-topo-dark {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Feature Block */
.feature-block { display: flex; align-items: center; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.feature-block.reverse { flex-direction: row-reverse; }
.feature-img { flex: 1; position: relative; }
.feature-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.feature-img::after { 
  content: ''; position: absolute; bottom: -20px; right: -20px; 
  width: 100%; height: 100%; border: 2px solid var(--c-primary); z-index: -1; 
}
.feature-block.reverse .feature-img::after { right: auto; left: -20px; }
.feature-content { flex: 1; }
.feature-content .subtitle { color: var(--c-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem; }

/* Large Numbers */
.big-number { font-family: var(--font-h); font-size: clamp(4rem, 10vw, 8rem); line-height: 1; color: var(--c-border); font-weight: 800; }
.section-dark .big-number { color: rgba(255,255,255,0.1); }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--c-dark); }
.form-control { width: 100%; padding: 1rem; border: 1px solid var(--c-border); background: var(--c-white); font-family: var(--font-b); font-size: 1rem; transition: border-color 0.3s; }
.form-control:focus { outline: none; border-color: var(--c-primary); }
.section-dark .form-group label { color: var(--c-white); }
.section-dark .form-control { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); color: var(--c-white); }
.section-dark .form-control:focus { border-color: var(--c-accent); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item { aspect-ratio: 1; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }

/* Timeline for routes/history */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--c-border); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.4rem; top: 0; width: 1rem; height: 1rem; border-radius: 50%; background: var(--c-primary); border: 4px solid var(--c-light); }
.timeline-title { font-family: var(--font-h); font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; }

/* Responsive */
@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .feature-block, .feature-block.reverse { flex-direction: column; gap: var(--space-md); }
  .feature-img::after { display: none; }
  .hero-meta { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--c-dark); flex-direction: column; padding: var(--space-sm);
  }
  .nav-links.active { display: flex; }
  .menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; padding-bottom: var(--space-md); }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .section { padding: var(--space-md) 0; }
  .page-header { padding: 100px 0 var(--space-sm); }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
