/*
 * Let's Ride Expo — global site stylesheet
 * Extends the base theme tokens defined in letsride/css/lets-ride-theme.css.
 * Homepage-only section styles live in static/css/home.css.
 */

:root {
  --lre-orange-2: #e85f26;
  --lre-navy-3: #051620;
  --lre-max-width: 1220px;
  --lre-header-height: 92px;
  --lre-bottom-nav-height: 68px;
  --lre-radius-lg: 22px;
  --lre-radius-md: 14px;
  --transition-fast: 160ms ease;
  --transition-med: 320ms ease;
  --lre-glow-cyan: 0 0 0 1px rgba(84, 184, 224, 0.35), 0 20px 45px rgba(0, 0, 0, 0.4);
  --lre-glow-orange: 0 0 0 1px rgba(255, 107, 44, 0.4), 0 20px 45px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding-bottom: var(--lre-bottom-nav-height);
}

/* Override the asset pack's .lre-topo (loose ring/squiggle pattern) with the
   real terrain-contour SVG + a faint grit texture, applied site-wide. Sized
   as a large environmental texture (not a tiny repeating wallpaper, not a
   giant "cover" blow-up). */
.lre-topo {
  background-color: #071B24;
  background-image:
    url("../letsride/patterns/grit-overlay.dcc106c82cbb.svg"),
    url("../letsride/patterns/topographic-real-dark.ef2475a9629b.svg");
  background-size: 600px 600px, 1400px auto;
  background-position: center, center top;
  background-repeat: repeat, repeat;
}

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

a { color: var(--lre-cyan); text-decoration: none; }
a:hover, a:focus-visible { color: var(--lre-cyan-2); }

h1, h2, h3, h4 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.05;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(2rem, 4vw, 2.85rem); }
h3 { font-size: 1.15rem; }

.eyebrow {
  color: var(--lre-orange);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.6em;
}

.lre-container {
  max-width: var(--lre-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--lre-orange);
  color: #fff;
  padding: .75rem 1rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- */
/* Buttons                                                             */
/* ---------------------------------------------------------------- */
.lre-button-primary,
.lre-button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.lre-button-primary {
  background: linear-gradient(135deg, var(--lre-orange), var(--lre-orange-2));
  color: #fff;
  border-radius: 12px;
  padding: 1rem 1.6rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(255, 107, 44, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.lre-button-primary:hover, .lre-button-primary:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(255, 107, 44, 0.4);
}
.lre-button-primary span { transition: transform var(--transition-fast); }
.lre-button-primary:hover span { transform: translateX(3px); }
.lre-button-primary--sm { padding: 0.7rem 1.2rem; font-size: 0.85rem; }

.lre-button-secondary {
  border: 2px solid rgba(84, 184, 224, 0.55);
  color: var(--lre-white);
  border-radius: 12px;
  padding: 0.95rem 1.5rem;
  font-weight: 800;
  background: rgba(84, 184, 224, 0.05);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.lre-button-secondary:hover, .lre-button-secondary:focus-visible {
  background: var(--lre-cyan);
  border-color: var(--lre-cyan);
  color: var(--lre-navy);
}

/* ---------------------------------------------------------------- */
/* Cards (shared across homepage, schedule, exhibitors, map pages)   */
/* ---------------------------------------------------------------- */
.lre-card {
  border-radius: var(--lre-radius-lg);
}

.event-card,
.vendor-card {
  background: linear-gradient(160deg, rgba(12, 38, 50, 0.9), rgba(7, 27, 36, 0.94));
  border: 1px solid rgba(84, 184, 224, 0.16);
  border-radius: var(--lre-radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
  overflow: hidden;
}
.event-card:hover,
.vendor-card:hover {
  transform: translateY(-4px);
  border-color: rgba(84, 184, 224, 0.4);
  box-shadow: var(--lre-glow-cyan);
}

.event-card__thumb {
  height: 108px;
  background: linear-gradient(135deg, rgba(84, 184, 224, 0.35), rgba(255, 107, 44, 0.25)),
    url("../letsride/patterns/topographic-real-dark.ef2475a9629b.svg");
  background-size: cover, 700px auto;
  background-position: center;
  background-repeat: no-repeat, repeat;
}
.event-card__body { padding: 1.35rem 1.5rem 1.6rem; }
.event-card__badge {
  display: inline-block;
  background: var(--lre-orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.7rem;
}
.event-card__badge--upcoming { background: var(--lre-cyan-2); }
.event-card h3 { margin-bottom: 0.35rem; font-size: 1.1rem; }
.event-card__meta { color: var(--lre-muted); margin: 0.2rem 0; font-size: 0.85rem; }
.event-card__time { color: var(--lre-cyan); font-weight: 700; margin: 0; }
.event-card__summary { color: var(--lre-muted); font-size: 0.88rem; margin: 0.6rem 0 0; }

.vendor-card { padding: 2rem 1.5rem; text-align: center; }
.vendor-card__logo {
  max-height: 72px;
  margin: 0 auto 1.1rem;
  object-fit: contain;
}
.vendor-card__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: rgba(84, 184, 224, 0.14);
  color: var(--lre-cyan);
  font-weight: 800;
  font-size: 1.4rem;
}
.vendor-card__type { color: var(--lre-muted); font-size: 0.85rem; margin: 0; }

.featured-vendors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
  margin-top: 1.75rem;
}

.happening-now__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Empty states */
.empty-state {
  padding: 2.75rem 2rem;
  text-align: center;
  margin-top: 1.75rem;
  background: rgba(12, 38, 50, 0.6);
  border: 1px dashed rgba(84, 184, 224, 0.3);
}
.empty-state p { color: var(--lre-muted); margin-bottom: 1.1rem; font-size: 1.02rem; }

/* ---------------------------------------------------------------- */
/* Generic section rhythm                                             */
/* ---------------------------------------------------------------- */
/* :where() keeps this exclusion at zero specificity so page-specific rules
   like .page-header can still override the default padding below. */
section:where(:not(.hero):not(.countdown-band)) { padding: 5.5rem 0; }

.page-header { padding: 4.5rem 0 2rem; }
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3rem); }

/* ---------------------------------------------------------------- */
/* Header                                                             */
/* ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 22, 32, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(84, 184, 224, 0.14);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--lre-header-height);
  gap: 1.5rem;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-header__logo img { height: 56px; width: auto; }
.site-header__wordmark {
  display: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  font-size: 0.95rem;
  color: var(--lre-white);
}

.site-header__nav { justify-self: center; min-width: 0; }
.site-header__nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.site-header__nav a {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--lre-white);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.4rem 0;
}
.site-header__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--lre-orange);
  transition: right var(--transition-fast);
}
.site-header__nav a:hover::after,
.site-header__nav a:focus-visible::after { right: 0; }

.site-header__actions { display: flex; align-items: center; gap: 0.85rem; justify-self: end; }

.site-header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.site-header__bar {
  width: 26px; height: 2px;
  background: var(--lre-white);
  border-radius: 2px;
  transition: background var(--transition-fast);
}
.site-header__menu-toggle:hover .site-header__bar { background: var(--lre-cyan); }

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(5, 22, 32, 0.97);
}
.mobile-nav a {
  color: var(--lre-white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav form { margin: 0; }

.site-header__logout { display: inline-flex; margin: 0; }
.site-header__logout button,
.mobile-nav form button {
  background: none;
  border: 2px solid var(--lre-muted);
  color: var(--lre-white);
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.site-header__logout button:hover,
.mobile-nav form button:hover {
  border-color: var(--lre-cyan);
  color: var(--lre-cyan);
}
.mobile-nav form button { width: 100%; text-align: left; }

@media (min-width: 1340px) {
  .site-header__wordmark { display: block; }
}

@media (max-width: 880px) {
  .site-header__nav { display: none; }
  .site-header__menu-toggle { display: flex; }
  .site-header__actions .lre-button-primary { display: none; }
  .site-header__actions .site-header__logout { display: none; }
  :root { --lre-header-height: 76px; }
  .site-header__logo img { height: 44px; }
}

/* ---------------------------------------------------------------- */
/* Placeholder / error pages                                          */
/* ---------------------------------------------------------------- */
.placeholder-page__inner, .error-page__inner {
  max-width: 620px;
  text-align: center;
  margin: 0 auto;
  padding: 3rem 0 5rem;
}
.placeholder-page__description { color: var(--lre-muted); margin-bottom: 2rem; }

/* ---------------------------------------------------------------- */
/* Footer                                                             */
/* ---------------------------------------------------------------- */
.site-footer {
  background: var(--lre-navy-2);
  padding: 0 0 1.5rem;
  margin-top: 0;
  position: relative;
}

.site-footer__divider {
  height: 90px;
  background-image: url("../letsride/dividers/mountain-forest.ef184b878d07.svg");
  background-repeat: repeat-x;
  background-size: 800px 90px;
  background-position: bottom;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 1rem 1.5rem 2.5rem;
}
.site-footer__brand img { height: 40px; margin-bottom: 0.6rem; }
.site-footer__brand p { color: var(--lre-muted); }
.site-footer__links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}
.site-footer__links a, .site-footer__social a {
  color: var(--lre-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.site-footer__links a:hover, .site-footer__social a:hover { color: var(--lre-cyan); }
.site-footer__social { display: flex; gap: 1.1rem; }

.site-footer__bottom {
  border-top: 1px solid rgba(84, 184, 224, 0.14);
  padding: 1.25rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.site-footer__legal,
.site-footer__tagline {
  color: var(--lre-muted);
  font-size: 0.8rem;
  margin: 0;
}
.site-footer__tagline { text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------------------------------------------------------------- */
/* Bottom mobile nav                                                  */
/* ---------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--lre-bottom-nav-height);
  background: rgba(5, 22, 32, 0.97);
  border-top: 1px solid rgba(84, 184, 224, 0.2);
  display: none;
  z-index: 200;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--lre-muted);
  font-size: 0.68rem;
  font-weight: 700;
}
.bottom-nav a:hover, .bottom-nav a:focus-visible { color: var(--lre-cyan); }
.bottom-nav__icon { font-size: 1.2rem; }

@media (max-width: 640px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: var(--lre-bottom-nav-height); }
}

/* Map page */
.map-page__canvas {
  position: relative;
  min-height: 420px;
  background-color: #071B24;
  background-image: url("../letsride/patterns/topographic-real-dark.ef2475a9629b.svg");
  background-size: 1200px auto;
  background-position: center;
  background-repeat: repeat;
  border-radius: var(--lre-radius-lg);
}
.map-pin { position: absolute; transform: translate(-50%, -100%); text-align: center; }
.map-pin img { width: 36px; margin: 0 auto; }
.map-pin__label {
  display: block;
  font-size: 0.7rem;
  color: var(--lre-white);
  background: rgba(7,27,36,.85);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  margin-top: 2px;
  white-space: nowrap;
}

/* Login page */
.login-page__inner {
  display: flex;
  justify-content: center;
  padding: 3rem 0 5rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(12, 38, 50, 0.9), rgba(7, 27, 36, 0.94));
  border: 1px solid rgba(84, 184, 224, 0.16);
}
.login-card h1 { margin-bottom: 1.5rem; }
.login-card__error {
  color: var(--lre-orange);
  font-weight: 700;
  margin-bottom: 1rem;
}
.login-form .form-field { margin-bottom: 1.25rem; }
.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lre-muted);
  margin-bottom: 0.4rem;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(84, 184, 224, 0.3);
  background: rgba(247, 248, 247, 0.06);
  color: var(--lre-white);
  font-size: 1rem;
}
.login-form input:focus-visible {
  outline: 2px solid var(--lre-cyan);
  outline-offset: 1px;
}
.login-form__submit {
  width: 100%;
  border: none;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
