/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --bg-card: #14141c;
  --bg-card-hover: #1c1c28;
  --bg-surface: #111118;
  --bg-hover: #1a1a24;
  --bg-input: #14141c;
  --text: #e8e8ef;
  --text-muted: #7a7a8e;
  --text-dim: #9a9ab0;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-glow: rgba(249, 115, 22, 0.15);
  --accent-subtle: rgba(249, 115, 22, 0.08);
  --success: #22c55e;
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --info-bg: rgba(59, 130, 246, 0.1);
  --border: #1e1e2a;
  --border-light: #2a2a3a;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

/* ── Header / Nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.nav-brand {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--accent); }
.brand-logo { height: 36px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  flex-wrap: wrap;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.7rem;
  color: var(--text-dim);
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* Auth links in nav */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-auth-link {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-auth-link:hover,
.nav-auth-link:focus-visible {
  color: var(--accent);
  background: var(--accent-subtle);
}

.nav-auth-signup {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.nav-auth-signup:hover,
.nav-auth-signup:focus-visible {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* User avatar/name in nav when logged in */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.nav-user-pic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

/* Cart link & badge */
.cart-link {
  position: relative;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color var(--transition);
}
.cart-link:hover { color: var(--accent); }
.cart-icon { vertical-align: middle; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.site-main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2rem 1rem 1.75rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 250px;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.hero-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  color: var(--text);
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.btn-social:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Home sections ────────────────────────────────────────────────────────── */
.home-section {
  margin-bottom: 2.25rem;
}
.section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.section-more {
  text-align: right;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* ── Card grid ────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Generic cards */
.product-card,
.article-card,
.event-card,
.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text);
  transition: all var(--transition);
}
.product-card:hover,
.article-card:hover,
.event-card:hover,
.listing-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.product-card h3,
.article-card h3,
.event-card h3,
.listing-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.product-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.placeholder-img {
  background: var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  aspect-ratio: 4/3;
}

.product-brand,
.article-meta,
.event-date,
.event-location {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.product-price,
.listing-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Badges */
.rating-badge,
.skill-badge,
.region-badge,
.condition-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--bg-hover);
  color: var(--text-dim);
  margin-top: 0.3rem;
}
.rating-badge { background: var(--accent); color: #fff; }

.empty-state {
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 0;
}

/* Strava CTA on home */
.home-strava {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.home-strava p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Feature strip (guest highlights) */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  transition: all var(--transition);
}
.feature-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}
.feature-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.feature-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* CTA banner (bottom of homepage) */
.home-cta-banner {
  margin-bottom: 0;
}
.cta-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249, 115, 22, 0.06) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
}
.cta-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.cta-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.cta-content > div { flex: 1; }
.cta-icon {
  font-size: 2.25rem;
  flex-shrink: 0;
  line-height: 1;
}
.cta-content .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Content sections (articles, detail pages) ───────────────────────────── */
.content-section {
  max-width: 720px;
  margin: 0 auto;
}
.content-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* ── Auth pages (login, register, profile, OTP) ──────────────────────────── */
.auth-container {
  max-width: 440px;
  margin: 2rem auto;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.5rem;
}
.form-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.alert ul { margin: 0; padding-left: 1.25rem; }
.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.alert-info {
  background: var(--info-bg);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

/* ── Profile page ─────────────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.4rem;
  margin-bottom: 0.15rem;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-since {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.profile-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.settings-list {
  list-style: none;
}
.settings-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.settings-list li:last-child { border-bottom: none; }
.settings-list a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.settings-list a:hover { color: var(--accent); }

/* Orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.orders-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
}
.orders-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.orders-table tr:hover td {
  background: var(--bg-hover);
}

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  text-transform: capitalize;
}
.status-paid, .status-completed { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.status-pending { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.status-failed, .status-cancelled { background: var(--error-bg); color: #fca5a5; }

/* Password reset details */
.password-reset-section {
  margin-top: 1rem;
}
.password-reset-section summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition);
}
.password-reset-section summary:hover { color: var(--accent); }
.password-reset-form {
  margin-top: 1rem;
}

/* ── Verified badge ───────────────────────────────────────────────────────── */
.verified-badge {
  display: inline-block;
  font-size: 0.85em;
  vertical-align: middle;
  cursor: help;
}

/* ── Resale column list ──────────────────────────────────────────────────── */
.resale-filter-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.resale-filter-bar select,
.resale-filter-bar input {
  padding: 0.45rem 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.82rem;
  min-width: 0;
}

.resale-column-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.resale-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  transition: all var(--transition);
  color: var(--text);
  text-decoration: none;
}
.resale-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateX(3px);
  color: var(--text);
}
.resale-row-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.resale-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resale-row-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
}
.resale-row-info {
  flex: 1;
  min-width: 0;
}
.resale-row-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resale-row-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.resale-row-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Message thread (inline on listing) ──────────────────────────────────── */
.listing-thread {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.thread-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.message {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
}
.message-sent {
  align-self: flex-end;
  background: var(--accent-subtle);
  border: 1px solid rgba(249,115,22,0.2);
}
.message-received {
  align-self: flex-start;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}
.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}
.message-sender {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.message-body {
  color: var(--text);
}

.category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--bg-hover);
  color: var(--text-dim);
}

/* ── Rider profile (bragging page) ─────────────────────────────────────────── */
.rider-cover {
  position: relative;
  background: linear-gradient(135deg, #1a1028 0%, #0f1923 50%, #0a1a12 100%);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  min-height: 200px;
}
.rider-cover-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(249,115,22,0.15), transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.1), transparent 50%);
  pointer-events: none;
}
.rider-cover-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 2.5rem 2rem;
}
.rider-pic-lg {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(249,115,22,0.3), 0 8px 32px rgba(0,0,0,0.5);
}
.rider-pic-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rider-pic-letter {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}
.rider-identity h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.rider-location {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.rider-member {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.rider-bio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.rider-bio-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

.rider-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.stat-highlight {
  border-color: rgba(249,115,22,0.25);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249,115,22,0.05) 100%);
  grid-column: span 2;
}
.stat-icon { font-size: 1.4rem; }
.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.profile-edit-section {
  margin-bottom: 1.5rem;
}
.profile-edit-section[open] summary {
  margin-bottom: 1.25rem;
}
.rider-edit-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.edit-row { margin-bottom: 0.75rem; }
.edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 2.5rem 1.5rem 1rem;
  background: var(--bg-surface);
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo { height: 28px; margin-bottom: 0.5rem; }
.footer-tagline { color: var(--text-muted); font-size: 0.85rem; }

.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--accent); }

.footer-strava img { height: 28px; }

.footer-copy {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Responsive: Tablet (≤ 768px) ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    gap: 0;
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; }

  .nav-auth { order: -1; }
  .nav-auth-link { font-size: 0.8rem; padding: 0.3rem 0.6rem; }

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

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

  .auth-card { padding: 1.5rem; }

  .profile-header { flex-direction: column; text-align: center; }

  .rider-hero { flex-direction: column; text-align: center; }
  .rider-cover-content { flex-direction: column; text-align: center; padding: 2rem 1.25rem; }
  .rider-pic-lg { width: 100px; height: 100px; }
  .stat-highlight { grid-column: span 1; }
  .edit-grid { grid-template-columns: 1fr; }
  .rider-stats { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  .cta-content { flex-direction: column; text-align: center; gap: 1rem; }
  .cta-content .btn { width: 100%; }

  .feature-strip { grid-template-columns: 1fr 1fr; }

  .promo-banner { flex-direction: column; padding: 1.75rem; text-align: center; }
  .promo-features { grid-template-columns: 1fr; }
  .promo-content p { max-width: none; }

  .featured-card { padding: 1.75rem 1.25rem; }
  .featured-card h2 { font-size: 1.25rem; }

  .category-strip { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
  .cat-pill { flex-shrink: 0; }

  .footer-container { flex-direction: column; align-items: center; text-align: center; }
  .footer-nav ul { justify-content: center; }
}

/* ── Responsive: Small mobile (≤ 480px) ──────────────────────────────────── */
@media (max-width: 480px) {
  .nav-container { padding: 0.5rem 1rem; }
  .brand-logo { height: 28px; }
  .site-main { padding: 1.25rem 1rem; }

  .hero { padding: 1.5rem 0.5rem 1.25rem; }
  .hero h1 { font-size: 1.5rem; }

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

  .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

  .feature-strip { grid-template-columns: 1fr; }

  .auth-container { margin: 1rem auto; }
  .auth-card { padding: 1.25rem; border-radius: var(--radius-sm); }
}

/* ── Responsive: Small mobile (≤ 320px) ──────────────────────────────────── */
@media (max-width: 320px) {
  html { font-size: 14px; }
  .nav-container { padding: 0.4rem 0.75rem; gap: 0.75rem; }
  .brand-logo { height: 24px; }
}

/* ── Responsive: Large desktop (≥ 1440px) ────────────────────────────────── */
@media (min-width: 1440px) {
  :root { --max-width: 1400px; }
  .hero h1 { font-size: 2.75rem; }
}

/* ── Responsive: Ultra-wide (≥ 2560px) ───────────────────────────────────── */
@media (min-width: 2560px) {
  :root { --max-width: 1800px; }
  html { font-size: 18px; }
}

/* ── Category pill strip ──────────────────────────────────────────────────── */
.category-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text);
  transform: translateY(-1px);
}
.cat-pill-accent {
  background: var(--accent-subtle);
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--accent);
}
.cat-pill-accent:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Section header with link ────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header .section-heading { margin-bottom: 0; }
.section-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.section-link:hover { color: var(--accent-hover); }

/* ── Featured hero card ──────────────────────────────────────────────────── */
.featured-card {
  display: block;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249, 115, 22, 0.05) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.featured-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: var(--text);
}
.featured-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
}
.featured-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.featured-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Card tags ───────────────────────────────────────────────────────────── */
.card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.5rem;
  background: var(--bg-hover);
  color: var(--text-muted);
}
.tag-review { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.tag-learn { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.tag-touring { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.tag-event { background: rgba(168, 85, 247, 0.15); color: #c4b5fd; }
.tag-resale { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; }

/* ── Promo banner ────────────────────────────────────────────────────────── */
.promo-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.promo-content { flex: 1; }
.promo-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.promo-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 500px;
}
.promo-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
}
.promo-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  flex-shrink: 0;
}
.promo-feat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--bg-hover);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
}
.promo-feat span { font-size: 1.1rem; }

.promo-signup {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249, 115, 22, 0.06) 100%);
  border-color: var(--border-light);
  text-align: center;
  justify-content: center;
}
.promo-signup .promo-content { max-width: 500px; }
.promo-signup p { max-width: none; }

.promo-strava {
  text-align: center;
  justify-content: center;
}
.promo-strava .promo-content { max-width: 500px; }
.promo-strava p { max-width: none; }

/* ── Skip link (accessibility) ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { top: 0; }
