/* route.v1.css — shared styles for /routes/* pages.
   Versioned filename: bump to route.v2.css when CSS changes. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --green:          #2EBD7A;
  --bg:             #060F0B;
  --surface:        #0A1A12;
  --surface-mid:    #0D1F17;
  --border-subtle:  rgba(46,189,122,0.08);
  --border-active:  rgba(46,189,122,0.25);
  --text-primary:   #E8F0EC;
  --text-secondary: #C8DDD4;
  --text-muted:     rgba(255,255,255,0.45);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-width: 320px;
}

h1, h2, h3 { font-family: 'Lora', Georgia, serif; }

/* -- NAV -- */
nav#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,15,11,0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  padding: 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: inline-flex; align-items: center; text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-how {
  font-size: 14px; color: var(--text-muted);
  text-decoration: none; margin-right: 20px;
  transition: color 0.2s;
}
.nav-how:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--green); color: #060F0B;
  font-weight: 700; font-size: 14px;
  padding: 10px 22px; border-radius: 99px;
  text-decoration: none; display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(46,189,122,0.35);
}
.hamburger {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(6,15,11,0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  flex-direction: column; align-items: center;
  justify-content: center; gap: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.nav-drawer.open { opacity: 1; pointer-events: all; }
.nav-drawer a {
  font-family: 'Lora', serif; font-size: 24px; font-weight: 700;
  color: var(--text-primary); text-decoration: none; text-align: center;
  transition: color 0.2s;
}
.nav-drawer a:hover { color: var(--green); }
.nav-drawer .nav-cta-drawer {
  background: var(--green); color: #060F0B;
  padding: 14px 36px; border-radius: 14px; font-size: 18px;
}

/* -- HERO -- */
.route-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 80px 80px 64px;
}
.route-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; color: var(--text-primary);
  line-height: 1.1; margin-bottom: 20px;
}
.route-subhead {
  font-size: 1rem; font-weight: 300;
  color: var(--text-secondary); line-height: 1.7;
  max-width: 640px; margin-bottom: 28px;
}
.stat-pills { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-pill {
  background: rgba(46,189,122,0.1);
  border: 1px solid rgba(46,189,122,0.25);
  color: var(--green); border-radius: 100px;
  padding: 6px 16px; font-size: .78rem; font-weight: 600;
}

/* -- BREADCRUMB NAV -- */
nav.breadcrumb { margin-bottom: 24px; }
nav.breadcrumb ol {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: .72rem; letter-spacing: .08em;
  padding: 0; margin: 0;
}
nav.breadcrumb li { color: var(--text-muted); }
nav.breadcrumb li:not(:last-child)::after {
  content: '\203A'; margin-left: 6px; color: var(--text-muted);
}
nav.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
nav.breadcrumb a:hover { color: var(--green); }
nav.breadcrumb [aria-current="page"] { color: var(--text-secondary); }

/* -- ROUTE OVERVIEW -- */
.route-overview {
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 64px 80px;
}
.route-overview h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 32px 0 28px;
}
.overview-stat { display: flex; flex-direction: column; gap: 4px; }
.overview-stat .stat-num {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem; font-weight: 700; line-height: 1;
  color: var(--green);
}
.overview-stat .stat-label {
  font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.overview-body {
  font-size: 1rem; font-weight: 300;
  color: var(--text-secondary); line-height: 1.7;
  max-width: 640px;
}

/* -- EXIT TABLE -- */
.exit-section {
  background: var(--bg);
  padding: 64px 80px;
}
.section-label {
  font-family: system-ui, sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: var(--green);
  text-transform: uppercase; margin-bottom: 16px;
}
.exit-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 36px;
}
.exit-table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
}
thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}
thead th {
  padding: 14px 16px; text-align: left;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
tbody tr:nth-child(odd)  { background: var(--bg); }
tbody tr:nth-child(even) { background: var(--surface-mid); }
tbody tr { border-bottom: 1px solid var(--border-subtle); }
tbody td { padding: 14px 16px; vertical-align: middle; }
.exit-num {
  font-family: 'Lora', serif; font-weight: 700;
  color: var(--green); white-space: nowrap;
}
.exit-name {
  font-weight: 500; color: var(--text-primary);
}
.exit-state {
  color: var(--text-muted); font-size: .85rem;
}
.type-badge {
  display: inline-block;
  background: rgba(46,189,122,0.1);
  color: var(--green); border-radius: 100px;
  padding: 2px 10px; font-size: .68rem; font-weight: 600;
  white-space: nowrap;
}
.type-badge--rest {
  background: rgba(139,92,246,0.12);
  color: #A78BFA;
}
.type-badge--plaza {
  background: rgba(251,191,36,0.12);
  color: #FBBF24;
}
.exit-coords {
  color: var(--text-muted); font-size: .78rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
}

/* -- POI CHIPS -- */
.poi-list { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.poi-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-mid);
  border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 4px 10px;
  font-size: .72rem; color: var(--text-secondary);
  white-space: nowrap;
}
.poi-icon { font-size: .68rem; }
.poi-rating {
  color: #FBBF24; font-weight: 600;
  font-size: .68rem;
}

/* -- ROUTE TIPS -- */
.route-tips {
  background: var(--bg);
  padding: 64px 80px;
  border-bottom: 1px solid var(--border-subtle);
}
.route-tips h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 24px;
}
.route-tips h3 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary); margin: 28px 0 10px;
}
.route-tips p {
  font-size: 1rem; font-weight: 300;
  color: var(--text-secondary); line-height: 1.7;
  max-width: 640px;
}

/* -- ROUTE FAQ -- */
.route-faq {
  background: var(--surface);
  padding: 64px 80px;
  border-bottom: 1px solid var(--border-subtle);
}
.route-faq h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 28px;
}
.route-faq details {
  background: var(--surface-mid);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  max-width: 720px;
}
.route-faq summary {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary);
  cursor: pointer; list-style: none;
  position: relative; padding-right: 32px;
}
.route-faq summary::-webkit-details-marker { display: none; }
.route-faq summary::after {
  content: '+'; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; color: var(--green); font-weight: 300;
}
.route-faq details[open] summary::after { content: '\2212'; }
.route-faq details p {
  font-size: .95rem; font-weight: 300;
  color: var(--text-secondary); line-height: 1.7;
  margin: 12px 0 0;
}

/* -- CTA -- */
.route-cta {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  text-align: center; padding: 80px 56px;
}
.route-cta h2 {
  font-size: 2rem; font-style: italic;
  color: var(--text-primary); margin-bottom: 16px;
}
.route-cta p {
  font-size: 1rem; font-weight: 300;
  color: var(--text-secondary); line-height: 1.7;
  max-width: 520px; margin: 0 auto 32px;
}
.btn-coming-soon {
  background: var(--green); color: #060F0B;
  font-weight: 700; font-size: 16px;
  padding: 16px 32px; border-radius: 14px;
  border: none; cursor: default; opacity: 0.75;
  display: inline-block;
}
.cta-sub {
  display: block; margin-top: 14px;
  font-size: .78rem; color: var(--text-muted);
}

/* -- RELATED ROUTES -- */
.related-routes {
  background: var(--bg);
  padding: 64px 80px;
}
.related-routes h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--text-primary);
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}
.related-card-hw {
  display: inline-block;
  background: rgba(46,189,122,0.1);
  color: var(--green);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 100px;
  margin-bottom: 10px;
}
.related-card h3 {
  font-size: 1rem; color: var(--text-primary);
  margin-bottom: 8px;
}
.related-card p { font-size: .8rem; color: var(--text-muted); }

/* -- BACK LINK -- */
.back-link {
  text-align: center; padding: 32px;
  border-top: 1px solid var(--border-subtle);
}
.back-link a {
  color: var(--text-muted); font-size: .84rem;
  text-decoration: none; transition: color 0.2s;
}
.back-link a:hover { color: var(--text-secondary); }

/* -- FOOTER -- */
footer {
  background: #060F0B;
  border-top: 1px solid rgba(46,189,122,0.08);
  padding: 48px 80px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-left { display: flex; flex-direction: column; gap: 0; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.2); display: block; margin-top: 5px; }
.footer-privacy {
  font-size: 13px; color: rgba(255,255,255,0.2);
  margin-top: 4px; text-decoration: none; display: block;
}
.footer-privacy:hover { color: rgba(255,255,255,0.5); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a {
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.footer-osm { font-size: .7rem; color: var(--text-muted); opacity: .5; margin-top: 8px; }
.footer-osm a { color: inherit; }

/* -- RESPONSIVE -- */
@media (max-width: 960px) {
  .route-hero { padding: 64px 40px 48px; }
  .exit-section { padding: 48px 40px; }
  .route-cta { padding: 64px 40px; }
  footer { padding: 48px 40px; }
  .route-overview, .route-tips, .route-faq, .related-routes {
    padding: 48px 40px;
  }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  nav#main-nav { padding: 0 24px; }
  .nav-right .nav-how { display: none; }
  .nav-right .nav-cta { display: none; }
  .hamburger { display: flex; }
  .nav-drawer { display: flex; }
  .route-hero { padding: 48px 24px 40px; }
  .exit-section { padding: 40px 24px; }
  .route-cta { padding: 56px 24px; }
  footer { padding: 40px 24px; flex-direction: column; align-items: flex-start; }
  .stat-pills { flex-wrap: wrap; }
  .route-overview, .route-tips, .route-faq, .related-routes {
    padding: 40px 24px;
  }
  .overview-grid { gap: 16px; }
  .overview-stat .stat-num { font-size: 1.5rem; }

  /* Responsive table -> card layout */
  .exit-table-wrap { overflow-x: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody { display: flex; flex-direction: column; gap: 16px; }
  tbody tr {
    background: var(--surface-mid) !important;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: center;
  }
  tbody td {
    padding: 0;
    border: none;
  }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
  }
  tbody td.exit-num {
    font-size: 1.3rem;
    margin-right: auto;
  }
  tbody td.exit-num::before { display: none; }
  tbody td.exit-name {
    font-size: 1rem;
    flex-basis: 100%;
    order: -1;
  }
  tbody td.exit-name::before { display: none; }
  tbody td.exit-state { order: 1; }
  tbody td.exit-state::before { display: none; }
  tbody td[data-label="Type"] { order: 2; }
  tbody td[data-label="Type"]::before { display: none; }
  tbody td[data-label="What's Here"] {
    flex-basis: 100%;
    order: 3;
    margin-top: 8px;
  }
  tbody td[data-label="What's Here"] .poi-list { max-width: 100%; }
  tbody td.exit-coords {
    flex-basis: 100%;
    order: 4;
    margin-top: 4px;
  }
}
