/* Endless Rally — Layout */

/* Page containers */
.page-public {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 68px 16px 92px;
}

/* === TOP UTILITY STRIP (dark, above nav) === */
.nav-top {
  background: var(--bg-dark);
  padding: 5px 0;
}

.nav-top-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-top-left {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.nav-top-right {
  display: flex;
  gap: 16px;
}

.nav-top-right a {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-top-right a:hover {
  color: var(--yellow);
}

/* === MAIN NAV (blue, HU-inspired) === */
.nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 4px solid var(--blue-dark);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .mark {
  background: var(--yellow);
  color: var(--text-bright);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  padding: 2px 7px 0;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}

.nav-links a {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 16px 16px 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -4px;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  border-bottom-color: var(--yellow);
  background: rgba(0,0,0,0.15);
}

.nav-cta {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  background: var(--yellow);
  text-decoration: none;
  padding: 8px 18px 7px;
  border-radius: 3px;
  margin-left: 8px;
  transition: background 0.15s;
  border-bottom: none !important;
}

.nav-cta:hover {
  background: var(--yellow-bright);
  border-bottom-color: transparent !important;
}

/* === TOP BAR (app pages - authenticated) === */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--blue);
  border-bottom: 4px solid var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 60px;
}

.topbar-center {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 0.05em;
  text-align: center;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 60px;
  justify-content: flex-end;
}

.topbar a, .topbar button {
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s;
}

.topbar a:hover, .topbar button:hover {
  color: #fff;
}

/* === BOTTOM NAV === */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--bg-dark);
  border-top: 4px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
}

.bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 6px;
  min-width: 56px;
  transition: color 0.15s;
}

.bottomnav a:hover {
  color: var(--white);
}

.bottomnav a.active {
  color: var(--yellow);
}

.bottomnav .nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* === PUBLIC NAV (legacy compat) === */
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.public-nav .brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--text-bright);
  letter-spacing: 0.05em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-nav .brand::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 2px;
}

.public-nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.public-nav .nav-links a {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.public-nav .nav-links a:hover {
  color: var(--blue);
}

/* === HERO (with photo bg) === */
.hero-photo {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
}

.hero-photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 75%;
}

.hero-photo-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,16,10,0.82) 0%, rgba(20,16,10,0.5) 50%, rgba(20,16,10,0.3) 100%);
}

.hero-photo-inner {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 60px 24px;
  width: 100%;
}

.hero-photo-eyebrow {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}

.hero-photo h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  color: #fff;
  letter-spacing: 0.01em;
  max-width: 640px;
}

.hero-photo h1 span {
  color: var(--yellow);
}

.hero-photo-sub {
  font-size: 16px;
  color: rgba(240,232,216,0.75);
  margin-top: 16px;
  max-width: 480px;
  line-height: 1.6;
}

.hero-photo-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn-hero {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 30px 11px;
  border-radius: 3px;
  transition: all 0.15s;
}

.btn-hero-primary {
  background: var(--yellow);
  color: var(--text-bright);
}

.btn-hero-primary:hover {
  background: var(--yellow-bright);
  color: var(--text-bright);
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* === LEGACY HERO (for pages not using photo) === */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  background: var(--bg-dark);
  border-bottom: 4px solid var(--yellow);
  position: relative;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 16px;
  color: #fff;
  line-height: 0.95;
}

.hero h1 span {
  color: var(--yellow);
}

.hero .tagline {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 32px;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === STATS STRIP (dark band under hero) === */
.stats-strip {
  background: var(--bg-dark);
  border-bottom: 3px solid var(--yellow);
}

.stats-strip-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}

.strip-stat {
  flex: 1;
  padding: 18px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.strip-stat:last-child {
  border-right: none;
}

.strip-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 28px;
  color: var(--yellow);
  line-height: 1;
}

.strip-stat-label {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* === SECTION === */
.section {
  padding: 48px 0;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === CONTENT GRID (sidebar layout) === */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* === GRID === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* === STEP CARDS === */
.step-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  text-align: left;
  transition: border-color 0.15s;
}

.step-card:hover {
  border-color: var(--blue);
}

.step-number {
  font-family: 'Share Tech Mono', monospace;
  font-size: 24px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 10px;
}

.step-card h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

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

/* === PHOTO STRIP === */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 32px 0;
}

.photo-strip img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.photo-strip img:hover {
  opacity: 0.85;
}

/* === CTA BANNER === */
.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  margin: 32px 0;
}

.cta-banner-bg {
  position: absolute;
  inset: 0;
}

.cta-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,107,138,0.92) 0%, rgba(26,107,138,0.7) 60%, rgba(26,107,138,0.4) 100%);
}

.cta-banner-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 520px;
}

.cta-banner h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 10px;
}

.cta-banner p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

/* === SIDEBAR === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.side-card-header {
  padding: 12px 18px;
  background: var(--blue);
}

.side-card-header h3 {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.side-card-body {
  padding: 18px;
}

.side-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.side-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.side-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.side-stat-row:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.side-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.side-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  color: var(--yellow);
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.15s;
}

.side-link:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.side-link:hover {
  color: var(--blue);
}

.side-link::after {
  content: '\2192';
  color: var(--text-light);
}

.side-link:hover::after {
  color: var(--blue);
}

.feature-badge {
  display: inline-block;
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.feature-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-list li:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.feature-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}

/* === ACTIVITY FEED === */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  align-items: flex-start;
}

.activity-icon {
  color: var(--yellow);
  font-size: 0.9rem;
  margin-top: 3px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  color: var(--text);
}

.activity-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === BIKE CARD === */
.bike-card {
  display: flex;
  gap: 14px;
  align-items: center;
}

.bike-photo {
  width: 72px;
  height: 72px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.bike-info {
  flex: 1;
  min-width: 0;
}

.bike-info h4 {
  margin-bottom: 2px;
  font-size: 1.25rem;
}

.bike-info .bike-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bike-info .bike-odo {
  font-family: 'Share Tech Mono', monospace;
  color: var(--yellow);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.bike-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.bike-links a {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.bike-links a:hover {
  color: var(--blue);
}

/* === FOOTER === */
.public-footer,
.site-footer {
  margin-top: 56px;
  border-top: 2px solid var(--border);
  background: var(--bg-dark);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--yellow);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* === SPONSOR BANNER === */
.sponsor-banner {
  text-align: center;
  padding: 12px;
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero-photo {
    min-height: 380px;
  }
}

@media (max-width: 550px) {
  .stats-strip-inner {
    flex-direction: column;
  }
  .strip-stat {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
  }
  .strip-stat:last-child {
    border-bottom: none;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .photo-strip {
    grid-template-columns: 1fr 1fr;
  }
  .nav-top {
    display: none;
  }
  .cta-banner {
    min-height: 200px;
  }
  .cta-banner-content {
    padding: 24px;
  }
  .public-nav .nav-links {
    gap: 14px;
  }
  .public-nav .nav-links a:not(.btn) {
    display: none;
  }
}
