/* GravelHQ — homepage-only styles. Ride-report pages use theme/additional-css.css instead;
   the homepage is structurally different enough (hero/map/stat-strip) to warrant its own file
   rather than bloating the shared one with rules only used once. Same palette/tokens throughout. */

:root {
  color-scheme: dark;
  --ghq-base: #0F151B;
  --ghq-panel: #172029;
  --ghq-panel-2: #1D2731;
  --ghq-line: #28323C;
  --ghq-amber: #F2A63C;
  --ghq-amber-dim: #6B5127;
  --ghq-red: #E1614F;
  --ghq-chalk: #EEF2F5;
  --ghq-steel: #93A1AC;
  --ghq-body: #C7CFD5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ghq-base);
  color: var(--ghq-body);
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- NAV ---------- */
.ghq-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: transparent;
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.ghq-nav.scrolled {
  background: rgba(15, 21, 27, 0.92);
  backdrop-filter: blur(8px);
  padding: 12px 32px;
  border-bottom: 1px solid var(--ghq-line);
}
.ghq-nav-logo {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ghq-chalk);
}
.ghq-nav-logo span { color: var(--ghq-amber); }
.ghq-nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.ghq-nav-links > a { color: var(--ghq-steel); transition: color .2s; }
.ghq-nav-links > a:hover { color: var(--ghq-amber); }

/* ---------- MEGA MENU ---------- */
.ghq-nav-item { position: relative; }
.ghq-nav-trigger {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ghq-steel); display: flex; align-items: center; gap: 6px;
  padding: 0; transition: color .2s;
}
.ghq-nav-trigger:hover, .ghq-nav-item.open .ghq-nav-trigger { color: var(--ghq-amber); }
.ghq-caret { font-size: 11px; transition: transform .2s ease; display: inline-block; }
.ghq-nav-item.open .ghq-caret { transform: rotate(180deg); }

.ghq-mega {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(820px, 92vw);
  background: var(--ghq-panel);
  border: 1px solid var(--ghq-line);
  border-radius: 14px;
  padding: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 200;
}
.ghq-nav-item.open .ghq-mega {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ghq-mega-heading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ghq-amber); margin-bottom: 12px;
  display: block; transition: color .15s;
}
.ghq-mega-heading:hover { color: var(--ghq-chalk); text-decoration: underline; }
.ghq-mega-col { display: flex; flex-direction: column; gap: 10px; }
.ghq-mega-col a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--ghq-chalk); font-size: 14px; font-weight: 600;
  padding: 4px 0; border-radius: 6px; transition: color .15s;
}
.ghq-mega-col a:hover { color: var(--ghq-amber); }
.ghq-mega-col a.ghq-mega-soon { color: var(--ghq-steel); cursor: default; }
.ghq-mega-col a.ghq-mega-soon:hover { color: var(--ghq-steel); }
.ghq-mega-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; flex-shrink: 0;
  background: rgba(242,166,60,.14); color: var(--ghq-amber);
}
.ghq-tag-soon { background: rgba(147,161,172,.14); color: var(--ghq-steel); }
@media (max-width: 640px) {
  .ghq-mega { grid-template-columns: 1fr; width: 92vw; }
}

/* ---------- HERO ---------- */
.ghq-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.ghq-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 65%;
  transform: scale(1.08);
  filter: brightness(0.55) saturate(1.05);
}
.ghq-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,21,27,.35) 0%, rgba(15,21,27,.55) 55%, var(--ghq-base) 100%);
}
.ghq-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
}
.ghq-hero-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ghq-amber);
  border: 1px solid var(--ghq-amber-dim);
  border-radius: 999px;
  padding: 7px 18px;
  display: inline-block;
  margin-bottom: 26px;
  background: rgba(15,21,27,.4);
}
.ghq-hero h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--ghq-chalk);
  letter-spacing: -0.015em;
}
.ghq-hero h1 em { font-style: normal; color: var(--ghq-amber); }
.ghq-hero p {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: #DCE3E8;
  max-width: 600px;
  margin: 0 auto 34px;
}
.ghq-hero-cta {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.ghq-btn {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  display: inline-block;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ghq-btn-primary {
  background: var(--ghq-amber);
  color: #1A1300;
}
.ghq-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(242,166,60,.35); }
.ghq-btn-ghost {
  border: 1px solid var(--ghq-line);
  color: var(--ghq-chalk);
  background: rgba(255,255,255,.03);
}
.ghq-btn-ghost:hover { border-color: var(--ghq-amber); transform: translateY(-2px); }

.ghq-scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  color: var(--ghq-steel);
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 2;
  animation: ghq-bob 2.2s ease-in-out infinite;
}
@keyframes ghq-bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* ---------- STATS STRIP ---------- */
.ghq-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ghq-line);
  border-top: 1px solid var(--ghq-line);
  border-bottom: 1px solid var(--ghq-line);
}
.ghq-stat {
  background: var(--ghq-base);
  padding: 40px 20px;
  text-align: center;
}
.ghq-stat-num {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--ghq-amber);
  line-height: 1;
}
.ghq-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ghq-steel);
  margin-top: 10px;
}
@media (max-width: 760px) {
  .ghq-stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- SECTIONS ---------- */
.ghq-section { max-width: 1160px; margin: 0 auto; padding: 90px 24px; }
.ghq-section-head { max-width: 640px; margin: 0 auto 50px; text-align: center; }
.ghq-section-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ghq-amber); margin-bottom: 12px;
}
.ghq-section-head h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--ghq-chalk);
  margin: 0 0 14px;
}
.ghq-section-head p { color: var(--ghq-steel); font-size: 16.5px; line-height: 1.6; margin: 0; }

/* fade-in-on-scroll */
.ghq-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.ghq-reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- RIDE CARDS ---------- */
.ghq-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .ghq-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ghq-card-grid { grid-template-columns: 1fr; } }

.ghq-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ghq-line);
  background: var(--ghq-panel);
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  transition: transform .25s ease, border-color .25s ease;
}
.ghq-card:hover { transform: translateY(-6px); border-color: var(--ghq-amber-dim); }
.ghq-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .4s ease;
}
.ghq-card:hover .ghq-card-bg { transform: scale(1.06); }
.ghq-card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,21,27,0) 30%, rgba(15,21,27,.92) 100%);
}
.ghq-card-body { position: relative; z-index: 2; padding: 22px; width: 100%; }
.ghq-card-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ghq-amber); margin-bottom: 8px;
}
.ghq-card h3 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 20px; color: var(--ghq-chalk); margin: 0 0 6px; }
.ghq-card p { font-size: 14px; color: var(--ghq-steel); margin: 0; line-height: 1.5; }
.ghq-card-stat { display: inline-block; margin-top: 12px; font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--ghq-chalk); background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 999px; }

.ghq-card.ghq-card-soon {
  background: repeating-linear-gradient(135deg, var(--ghq-panel) 0px, var(--ghq-panel) 14px, var(--ghq-panel-2) 14px, var(--ghq-panel-2) 28px);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ghq-card-soon .ghq-card-body { padding: 24px; }
.ghq-card-soon h3 { color: var(--ghq-chalk); }
.ghq-card-soon .ghq-card-tag { color: var(--ghq-steel); }

/* ---------- MAP ---------- */
.ghq-map-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ghq-line);
}

/* ---------- STATIC MAP LEGEND ---------- */
.ghq-map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.ghq-map-legend a, .ghq-map-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ghq-panel);
  border: 1px solid var(--ghq-line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ghq-chalk);
  transition: border-color .15s;
}
.ghq-map-legend a:hover { border-color: var(--ghq-amber); }
.ghq-map-legend .ghq-pin-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ghq-amber);
  color: #1A1300;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ghq-map-legend .ghq-pin-num.ghq-pin-soon { background: var(--ghq-steel); }

/* ---------- PRODUCT CARD (Amazon, pending real tag) ---------- */
.ghq-product-rec {
  display: flex;
  gap: 20px;
  background: var(--ghq-panel);
  border: 1px solid var(--ghq-line);
  border-radius: 14px;
  padding: 24px;
  align-items: center;
  opacity: .55;
}
.ghq-product-rec img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; }
.ghq-product-rec-body h4 { font-family: 'Archivo', sans-serif; margin: 0 0 6px; color: var(--ghq-chalk); font-size: 16px; }
.ghq-product-rec-body p { margin: 0; color: var(--ghq-steel); font-size: 13.5px; }
.ghq-product-rec-pending {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ghq-red); margin-top: 8px; display: inline-block;
}
@media (max-width: 600px) { .ghq-product-rec { flex-direction: column; text-align: center; } }

/* ---------- FOOTER ---------- */
.ghq-footer {
  border-top: 1px solid var(--ghq-line);
  padding: 50px 24px 40px;
  text-align: center;
  color: var(--ghq-steel);
  font-size: 13px;
}
.ghq-footer-logo { font-family: 'Archivo', sans-serif; font-weight: 900; color: var(--ghq-chalk); font-size: 18px; margin-bottom: 10px; }
.ghq-footer-logo span { color: var(--ghq-amber); }

/* ---------- country pillar cards (homepage) ---------- */
.ghq-pillar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.ghq-pillar-grid .ghq-card { min-height: 260px; }
@media (max-width: 1000px) { .ghq-pillar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ghq-pillar-grid { grid-template-columns: 1fr; } }

/* ---------- COUNTRY NAV + DROPDOWNS (replaces the old 4-column mega menu) ---------- */
.ghq-burger { display: none; background: none; border: 1px solid var(--ghq-line); border-radius: 8px; width: 42px; height: 38px; padding: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.ghq-burger span { display: block; width: 20px; height: 2px; background: var(--ghq-chalk); }
.ghq-drop {
  position: absolute; top: calc(100% + 16px); left: 0; min-width: 250px;
  background: var(--ghq-panel); border: 1px solid var(--ghq-line); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 200;
}
.ghq-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.ghq-drop-right .ghq-drop { left: auto; right: 0; }
.ghq-drop a { color: var(--ghq-chalk); font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.ghq-drop a:hover { background: var(--ghq-panel-2); color: var(--ghq-amber); }
.ghq-drop a.ghq-drop-all { color: var(--ghq-amber); font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--ghq-line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
@media (hover: hover) and (min-width: 901px) { .ghq-nav-item:hover .ghq-drop { opacity: 1; visibility: visible; transform: none; pointer-events: auto; } .ghq-nav-item:hover .ghq-nav-trigger { color: var(--ghq-amber); } }
.ghq-nav-item.open .ghq-drop { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@media (max-width: 900px) {
  .ghq-burger { display: flex; }
  .ghq-nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ghq-panel); border-bottom: 1px solid var(--ghq-line); padding: 8px 20px 18px; max-height: 80vh; overflow-y: auto; }
  .ghq-nav-links.open { display: flex; }
  .ghq-nav-item { border-bottom: 1px solid var(--ghq-line); }
  .ghq-nav-trigger { width: 100%; justify-content: space-between; padding: 14px 0; font-size: 16px; }
  .ghq-drop { position: static; min-width: 0; border: none; box-shadow: none; padding: 0 0 10px 10px; opacity: 1; visibility: visible; transform: none; pointer-events: auto; display: none; background: transparent; }
  .ghq-drop::before { display: none; }
  .ghq-nav-item.open .ghq-drop { display: flex; }
  .ghq-nav-links > a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--ghq-line); }
}
