/* ============================================================
   Bucka Bros. Motorcycle Touring — USA 1995
   A modern rebuild preserving the spirit of the original
   ============================================================ */

:root {
  --bg-warm:    #f5f0e6;
  --bg-card:    rgba(255, 255, 255, 0.88);
  --text:       #2b2520;
  --text-muted: #6b6260;
  --accent:     #c0392b;
  --accent-dark:#962d22;
  --link:       #c0392b;
  --link-visit: #3a3088;
  --border:     #d5cfc2;
  --shadow:     rgba(0,0,0,0.12);
  --road-dark:  #1a1a2e;
  --road-gold:  #d4a843;
  --deprecated: #8b7355;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: url('../graphics/textures/yellow_rock.gif') repeat;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

/* ---------- layout ---------- */
.page-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 2.5rem 3rem;
  box-shadow: 0 2px 16px var(--shadow);
  margin-bottom: 2rem;
}

.card-narrow {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- typography ---------- */
h1 {
  font-size: 2.2rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  font-weight: normal;
  font-style: italic;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--road-gold);
  color: var(--text);
}

h3 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.8rem;
  color: var(--accent-dark);
}

h4 {
  font-size: 1.05rem;
  margin: 1.2rem 0 0.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

blockquote {
  border-left: 4px solid var(--road-gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(212, 168, 67, 0.08);
  font-style: italic;
  color: var(--text-muted);
}

/* ---------- links ---------- */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}
a:visited { color: var(--link-visit); }
a:hover { text-decoration: underline; color: var(--accent-dark); }

/* ---------- time capsule banner ---------- */
.time-capsule {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f9f3e3 0%, #f0e8d2 100%);
  border: 1px solid var(--road-gold);
  border-left: 5px solid var(--road-gold);
  border-radius: 6px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #5a4a30;
}

.time-capsule-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---------- hero (landing page) ---------- */
.hero {
  text-align: center;
  padding: 3rem 2rem 2rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.2rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

.hero .intro {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero .stat {
  text-align: center;
}

.hero .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  line-height: 1.2;
}

.hero .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- navigation grid ---------- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.nav-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
  color: var(--text) !important;
  display: block;
}

.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.nav-card .icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.nav-card h3 {
  color: var(--accent);
  margin: 0 0 0.5rem;
  border: none;
  font-size: 1.1rem;
}

.nav-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---------- route map ---------- */
.route-map {
  text-align: center;
  margin: 2rem 0;
}

.route-map img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 12px var(--shadow);
}

.route-map figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ---------- table of contents ---------- */
.toc {
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem 1.8rem;
  margin-bottom: 2rem;
}

.toc h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toc ul {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.toc a {
  color: var(--accent);
}

/* ---------- place cards (What to See) ---------- */
.place-list {
  list-style: none;
  padding: 0;
}

.place-item {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}

.place-item:last-child {
  border-bottom: none;
}

.place-name {
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--text);
}

.place-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.place-desc {
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

/* ---------- comparison table ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.compare-table th {
  background: var(--road-dark);
  color: white;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: normal;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table tr:nth-child(even) td {
  background: rgba(0,0,0,0.02);
}

.compare-table .pro { color: #27763c; }
.compare-table .con { color: var(--accent-dark); }

/* ---------- photo gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: #222;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: white;
  padding: 1.5rem 0.6rem 0.5rem;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .caption {
  opacity: 1;
}

/* ---------- lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80vw;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  line-height: 1;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- deprecated badge ---------- */
.deprecated {
  display: inline-block;
  background: var(--deprecated);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.deprecated-note {
  background: rgba(139, 115, 85, 0.1);
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  color: var(--deprecated);
  font-style: italic;
  margin: 1rem 0;
}

/* ---------- checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.checklist li {
  padding: 0.3rem 0 0.3rem 1.8rem;
  position: relative;
  break-inside: avoid;
}

.checklist li::before {
  content: "\25A2";
  position: absolute;
  left: 0;
  color: var(--road-gold);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ---------- road list ---------- */
.road-list {
  counter-reset: road;
  list-style: none;
  padding: 0;
}

.road-list li {
  counter-increment: road;
  padding: 0.8rem 0 0.8rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.road-list li::before {
  content: "#" counter(road);
  position: absolute;
  left: 0;
  font-weight: bold;
  color: var(--road-gold);
  font-size: 1.1rem;
}

.road-votes {
  display: inline-block;
  background: var(--road-dark);
  color: var(--road-gold);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
}

/* ---------- breadcrumb / back nav ---------- */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ---------- page footer ---------- */
.page-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.page-footer a {
  color: var(--text-muted);
}

/* ---------- vote list ---------- */
.vote-list {
  list-style: none;
  padding: 0;
}

.vote-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.vote-bar {
  height: 8px;
  background: var(--road-gold);
  border-radius: 4px;
  min-width: 8px;
}

.vote-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 2.5rem;
  text-align: right;
}

.vote-name {
  flex: 1;
  font-size: 0.95rem;
}

/* ---------- original posting ---------- */
.email-block {
  background: #1a1a2e;
  color: #c8c8d0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  white-space: pre;
  tab-size: 8;
}

.email-block .header {
  color: var(--road-gold);
  font-weight: bold;
}

.email-block .separator {
  color: #555;
  display: block;
  margin: 0.3rem 0;
}

.email-block .section {
  color: #e8e8e8;
  font-weight: bold;
}

.email-block .sig {
  color: #888;
  font-size: 0.8rem;
}

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }

  .card {
    padding: 1.5rem 1.2rem;
    border-radius: 0;
  }

  .page-wrapper {
    padding: 1rem 0.5rem 3rem;
  }

  h1 { font-size: 1.8rem; }
  .hero h1 { font-size: 2rem; }

  .hero .stats { gap: 1.5rem; }

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

  .toc ul {
    columns: 1;
  }

  .checklist {
    columns: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .compare-table {
    font-size: 0.85rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.5rem;
  }
}

/* ---------- print ---------- */
@media print {
  body { background: white; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .nav-card:hover { transform: none; }
  .lightbox-overlay { display: none !important; }
}
