/* ════════════════════════════════════════
   RailRoam Design System
   ════════════════════════════════════════ */

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

:root {
  --rust: #C45B28;
  --rust-light: #E8823D;
  --rust-dark: #A04A20;
  --iron: #2B2D31;
  --steel: #3D4047;
  --rail-silver: #8B8F99;
  --cream: #F5F0E8;
  --warm-white: #FDFBF7;
  --forest: #2D5016;
  --track-gold: #D4A843;
  --danger: #C42828;
  --success: #28A745;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--iron);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

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

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 40px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(43, 45, 49, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 91, 40, 0.15);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--cream);
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--rust); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--rail-silver);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
}

.nav-cta {
  background: var(--rust) !important;
  color: var(--cream) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--rust-light) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── TRACK DIVIDER ── */
.track-divider {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0px,
    var(--rust) 40px,
    transparent 40px,
    transparent 56px
  );
}

.track-divider-thin {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0px,
    var(--rust) 24px,
    transparent 24px,
    transparent 36px
  );
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--rust);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--rust-light);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--rust);
  border: 2px solid var(--rust);
}

.btn-secondary:hover {
  background: var(--rust);
  color: var(--cream);
}

.btn-dark {
  background: var(--iron);
  color: var(--cream);
}

.btn-dark:hover {
  background: var(--steel);
  color: var(--cream);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ── CARDS ── */
.card {
  background: var(--cream);
  border-radius: 12px;
  border: 1px solid rgba(43, 45, 49, 0.08);
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(43, 45, 49, 0.08);
}

.card-dark {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(196, 91, 40, 0.2);
}

.card-dark:hover {
  border-color: var(--rust);
}

/* ── SPEC TABLE ── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid rgba(43, 45, 49, 0.08);
}

.spec-table td {
  padding: 14px 0;
  font-size: 0.95rem;
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--iron);
  width: 40%;
}

.spec-table td:last-child {
  color: var(--steel);
}

/* ── EMAIL CAPTURE ── */
.email-capture {
  display: flex;
  gap: 12px;
  max-width: 480px;
}

.email-capture input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(43, 45, 49, 0.12);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--warm-white);
  color: var(--iron);
  outline: none;
  transition: border-color 0.2s;
}

.email-capture input:focus {
  border-color: var(--rust);
}

.email-capture input::placeholder {
  color: var(--rail-silver);
}

.email-capture-dark input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(196, 91, 40, 0.3);
  color: var(--cream);
}

.email-capture-dark input::placeholder {
  color: var(--rail-silver);
}

.email-capture-dark input:focus {
  border-color: var(--rust-light);
}

.email-success {
  color: var(--success);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 8px;
}

.email-error {
  color: var(--danger);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ── PAGE HERO ── */
.page-hero {
  padding: 140px 40px 80px;
  background: linear-gradient(170deg, var(--iron) 0%, #1a1b1e 55%, var(--steel) 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 48%, rgba(196,91,40,0.08) 48%, rgba(196,91,40,0.08) 52%, transparent 52%),
    repeating-linear-gradient(0deg, transparent, transparent calc(100% - 2px), rgba(139,143,153,0.06) calc(100% - 2px), rgba(139,143,153,0.06) 100%);
  background-size: 100% 100%, 100% 80px;
  pointer-events: none;
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--cream);
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.page-hero h1 em {
  font-style: normal;
  color: var(--rust);
}

.page-hero .subtitle {
  font-size: 1.15rem;
  color: var(--rail-silver);
  max-width: 600px;
  line-height: 1.65;
}

/* ── SECTIONS ── */
.section {
  padding: 100px 40px;
}

.section-cream { background: var(--cream); }
.section-white { background: var(--warm-white); }
.section-dark { background: var(--iron); }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  letter-spacing: -1px;
  color: var(--iron);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--steel);
  max-width: 600px;
  margin: 16px auto 0;
  line-height: 1.65;
}

.section-dark .section-header h2 { color: var(--cream); }
.section-dark .section-header p { color: var(--rail-silver); }

/* ── FEATURE GRID ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-item {
  padding: 36px 28px;
  background: var(--cream);
  border-radius: 10px;
  border: 1px solid rgba(43, 45, 49, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(43, 45, 49, 0.08);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--iron);
  margin-bottom: 10px;
}

.feature-item p {
  font-size: 0.92rem;
  color: var(--steel);
  line-height: 1.65;
}

/* ── TWO-COL LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.two-col-reverse { direction: rtl; }
.two-col-reverse > * { direction: ltr; }

/* ── STAT BAR ── */
.stat-bar {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  border-left: 2px solid var(--rust);
  padding-left: 16px;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--rail-silver);
  margin-top: 2px;
}

/* ── CONCEPT VISUAL (SVG) ── */
.concept-visual {
  background: var(--iron);
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}

.concept-visual::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0px,
    var(--rust) 20px,
    transparent 20px,
    transparent 30px
  );
}

/* ── CORRIDOR CARD ── */
.corridor-card {
  background: var(--cream);
  border-radius: 10px;
  border: 1px solid rgba(43, 45, 49, 0.08);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.corridor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(43, 45, 49, 0.1);
}

.corridor-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--iron);
  margin-bottom: 6px;
}

.corridor-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.corridor-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.corridor-tag-state { background: rgba(196,91,40,0.1); color: var(--rust); }
.corridor-tag-length { background: rgba(45,80,22,0.1); color: var(--forest); }
.corridor-tag-difficulty { background: rgba(43,45,49,0.08); color: var(--steel); }
.corridor-tag-status-trail { background: rgba(40,167,69,0.1); color: var(--success); }
.corridor-tag-status-abandoned { background: rgba(196,91,40,0.12); color: var(--rust-dark); }

.corridor-desc {
  font-size: 0.88rem;
  color: var(--steel);
  line-height: 1.6;
  margin-bottom: 10px;
}

.corridor-highlights {
  font-size: 0.82rem;
  color: var(--rail-silver);
  font-style: italic;
}

/* ── MAP ── */
.map-container {
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(43, 45, 49, 0.08);
  margin-bottom: 48px;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-bar select,
.filter-bar input {
  padding: 10px 16px;
  border: 2px solid rgba(43, 45, 49, 0.1);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  background: var(--warm-white);
  color: var(--iron);
  outline: none;
  transition: border-color 0.2s;
}

.filter-bar select:focus,
.filter-bar input:focus {
  border-color: var(--rust);
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 80px 40px;
  background: var(--iron);
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--cream);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.05rem;
  color: var(--rail-silver);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.cta-section .email-capture {
  margin: 0 auto;
}

/* ── FOOTER ── */
.site-footer {
  padding: 48px 40px 32px;
  background: var(--iron);
  border-top: 1px solid rgba(196, 91, 40, 0.15);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  font-size: 1.2rem;
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--rail-silver);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: var(--rail-silver);
  font-size: 0.88rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--cream); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(139, 143, 153, 0.15);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--rail-silver);
}

/* ── CORRIDOR GRID ── */
.corridor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── COMPARISON TABLE ── */
.comparison-section {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.comparison-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 16px 20px;
  border-bottom: 2px solid var(--rust);
  color: var(--iron);
}

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(43,45,49,0.08);
  color: var(--steel);
}

.comparison-table tr:hover td {
  background: rgba(196,91,40,0.03);
}

/* ── LEAFLET OVERRIDES ── */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  font-family: 'DM Sans', sans-serif !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  font-size: 0.88rem !important;
  line-height: 1.5 !important;
}

.leaflet-popup-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: var(--iron);
  margin-bottom: 6px;
}

.leaflet-popup-content .popup-meta {
  color: var(--rust);
  font-weight: 500;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-nav { padding: 0 20px; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 45, 49, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hamburger { display: flex; }

  .page-hero { padding: 120px 24px 60px; }

  .section { padding: 64px 24px; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .two-col-reverse { direction: ltr; }

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

  .stat-bar { gap: 28px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .map-container { height: 350px; }

  .email-capture {
    flex-direction: column;
  }

  .filter-bar {
    flex-direction: column;
  }

  .cta-section { padding: 64px 24px; }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 2rem; letter-spacing: -1px; }
  .section-header h2 { font-size: 1.6rem; }
  .btn-lg { padding: 14px 28px; font-size: 0.95rem; }
}
