/* ─── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #05080f;
  --surface:      #0a101c;
  --surface-2:    #101828;
  --border:       #182438;
  --border-hover: #253a58;
  --glass-bg:     rgba(8, 13, 26, 0.52);
  --glass-border: rgba(255, 255, 255, 0.07);
  --text:         #fafafa;
  --text-muted:   #71717a;
  --text-subtle:  #3f3f46;
  --accent:       #fafafa;
  --red:          #ed5353;
  --red-dim:      rgba(237, 83, 83, 0.12);
  --danger:       #f87171;
  --danger-bg:    #1a0808;
  --radius:       3px;
  --ease:         0.18s ease;
  --grain:        url('/assets/noise.svg');
}

/* ─── BASE ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 0%,   rgba(80, 100, 220, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 55% 45% at 85% 100%,  rgba(140, 60, 200, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 75% 20%,   rgba(237, 83, 83, 0.07) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  transition: opacity 0.22s ease;
}

a {
  color: var(--text);
  transition: opacity var(--ease);
}
a:hover {
  color: var(--text);
  opacity: 0.6;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

p { color: var(--text-muted); }

/* ─── LAYOUT WRAPPER ────────────────────────────────────────────────────────── */
.overlay {
  background: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── NAV ───────────────────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Thicker, closer glass — higher blur + brightness lift */
  background: var(--grain) repeat, rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(14px) saturate(190%) brightness(108%);
  -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(108%);
  border-bottom: none;
  box-shadow:
    /* Top edge — ambient light catch */
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    /* Bottom edge — glass thickness catch */
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    /* Hard depth shadow immediately below */
    0 2px 0 rgba(0, 0, 0, 0.55),
    /* Soft blue ambient glow radiating downward */
    0 6px 48px rgba(80, 120, 255, 0.13),
    0 2px 16px rgba(80, 120, 255, 0.08);
  padding: 0;
}

.masthead .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.masthead-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}

.nav-masthead {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-masthead .nav-link {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
  opacity: 1;
}

.nav-masthead .nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
  opacity: 1;
}

/* ─── PAGE HEADER / JUMBOTRON ───────────────────────────────────────────────── */
.jumbotron {
  /* Thinner, further glass panel — less blur than nav, more transparent */
  background: var(--grain) repeat, rgba(5, 8, 20, 0.56);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border-bottom: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 4rem 0 3.5rem;
  z-index: 10 !important; /* must clear subsequent main sections so suggest-dropdown is clickable */
  overflow: visible !important;
  position: relative;
  /* Catches the nav's glow on its top surface + inner luminosity */
  box-shadow:
    inset 0 1px 0 rgba(100, 140, 255, 0.10),
    inset 0 0 80px rgba(60, 100, 220, 0.04);
}

/* Nav glow bleeding down onto the top of the jumbotron */
.jumbotron::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(
    to bottom,
    rgba(80, 120, 255, 0.07),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

/* Bottom glass seam — two edges meeting */
.jumbotron::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.20) 0px,
    rgba(255, 255, 255, 0.20) 1px,
    rgba(0, 0, 0, 0.50) 1px,
    transparent 3px
  );
  /* Glow along the seam */
  box-shadow:
    0 0 16px rgba(80, 120, 255, 0.10),
    0 0  4px rgba(255, 255, 255, 0.06);
}

/* Ensure jumbotron content sits above the ::before glow layer */
.jumbotron .container { position: relative; z-index: 1; }

.jumbotron .container {
  max-width: 1200px;
  padding: 0 2rem;
}

.jumbotron-heading {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.jumbotron .lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
  margin-bottom: 0;
}

/* ─── HOME HERO ─────────────────────────────────────────────────────────────── */
.custom-wrap {
  max-width: 720px;
  margin: 0;
  padding: 130px 2rem 130px;
  text-align: left;
}

.custom-wrap h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.custom-wrap .lead {
  font-size: 1rem;
  color: rgba(250,250,250,0.65);
  max-width: 480px;
  margin-bottom: 2rem;
}

.cover-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* ─── GLOBAL CONTAINER ALIGNMENT ────────────────────────────────────────────── */
/* Match all containers to the nav's 1200px / 2rem rhythm */
.container,
.container-fluid {
  max-width: 1200px !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* ─── ALBUM / GRID ──────────────────────────────────────────────────────────── */
.album {
  background: transparent !important;
  padding: 3rem 0 4rem;
}

.album .container {
  max-width: 1200px;
}

/* ─── CARDS ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--grain) repeat, var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text);
  backdrop-filter: blur(6px) saturate(148%);
  -webkit-backdrop-filter: blur(6px) saturate(148%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.22s ease;
  overflow: hidden;
  will-change: transform;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  position: relative;
  z-index: 1;
}

/* Cursor-follow glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(280px circle at var(--cx, 50%) var(--cy, 50%), rgba(255,255,255,0.06), transparent 70%);
  transition: opacity 0.35s ease;
  z-index: 0;
  border-radius: inherit;
}

/* Red left border accent on hover */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(to right, var(--red) 3px, transparent 3px);
  z-index: 2;
  border-radius: var(--radius);
}

.card:hover::before { opacity: 1; }
.card:hover::after  { opacity: 1; }

.card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  z-index: 2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px var(--border-hover),
    0 8px 24px rgba(0, 0, 0, 0.55);
}

/* Ensure card content sits above pseudo-element overlays */
.card-body,
.card a { position: relative; z-index: 1; }

/* Remove hover dim on card title links */
.card-body .card-text a:hover {
  opacity: 1;
  color: var(--text) !important;
}

/* Full-card cover link — stretches the title link to fill the whole card */
.card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Card actions row sits above the cover link */
.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: 0.65rem;
}

/* Heart / fav count button */
.heart-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  text-decoration: none;
  transition: color var(--ease);
}
.heart-btn:hover { color: var(--red); opacity: 1; }

/* Jumbotron subheadings centered — !important beats body { text-align: left } */
.jumbotron p, .jumbotron .lead {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* ── Card column glow — lives on the wrapper so overflow:hidden doesn't clip it */
.card-col {
  position: relative;
}
.card-col::before {
  content: '';
  position: absolute;
  top: 10%;
  bottom: -8px;
  left: 22px;
  right: 22px;
  border-radius: var(--radius);
  background: rgba(80, 120, 255, 1);
  filter: blur(28px);
  opacity: 0.10;
  pointer-events: none;
  transition: opacity 0.22s ease, filter 0.22s ease;
}
.card-col:hover::before {
  opacity: 0.40;
  filter: blur(34px);
}
.card-col .card {
  position: relative;
  z-index: 1;
}

.box-shadow { box-shadow: none; }

.card-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  pointer-events: none;
}
.card-badge--garage {
  background: rgba(237, 83, 83, 0.18);
  color: var(--red);
  border: 1px solid rgba(237, 83, 83, 0.35);
}
.card-badge--favorite {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card-body { padding: 1rem 1.1rem 1.25rem; }

.card-text {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.imgresp {
  height: 200px;
  width: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  transition: all var(--ease);
  border-width: 1px;
}
/* Prevent global a:hover opacity from bleeding onto button links */
.btn:hover { opacity: 1; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
  color: var(--bg);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-outline-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hover);
}
/* Favorite / login buttons get accent on hover */
.card-body .btn-outline-secondary:hover,
.detail-actions .btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-outline-primary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline-primary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: #3f1515;
}
.btn-outline-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #7f1d1d;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-warning {
  background: transparent;
  color: #fbbf24;
  border-color: #3d3218;
}
.btn-warning:hover {
  background: #1f1a0a;
  color: #fcd34d;
}

.btn-block { width: 100%; display: block; }

/* ─── FORMS ─────────────────────────────────────────────────────────────────── */
.form-control {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 0.9rem;
  height: auto;
  padding: 0.6rem 0.85rem;
}

.form-control:focus {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(250,250,250,0.07);
}

.form-control::placeholder { color: var(--text-subtle); }

select.form-control option {
  background: var(--surface);
  color: var(--text);
}

.form-control-file { color: var(--text-muted); font-size: 0.85rem; }

label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* ─── LIST GROUP ────────────────────────────────────────────────────────────── */
.list-group-item {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  font-size: 0.88rem;
}

.list-group-item-action:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  opacity: 1;
}

/* ─── MODALS ────────────────────────────────────────────────────────────────── */
.modal-content {
  background: var(--grain) repeat, var(--glass-bg);
  backdrop-filter: blur(9px) saturate(148%);
  -webkit-backdrop-filter: blur(9px) saturate(148%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 24px 60px rgba(0,0,0,0.6);
  border-radius: var(--radius);
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    320px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(255, 255, 255, 0.06),
    transparent 70%
  );
  transition: opacity 0.35s ease;
  z-index: 0;
  border-radius: inherit;
}
.modal-content:hover::before { opacity: 1; }
.modal-header, .modal-body, .modal-footer { position: relative; z-index: 1; }

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.modal-body { padding: 1.5rem; }

.modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.close {
  color: var(--text-muted);
  text-shadow: none;
  opacity: 1;
  font-weight: 300;
  font-size: 1.5rem;
}
.close:hover { color: var(--text); }

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* Image source tabs inside modal */
.img-source-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.img-tab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.img-tab-btn.active {
  border-color: var(--red);
  color: var(--text);
  background: var(--red-dim);
}
.img-tab-pane { margin-top: 0.25rem; }
.form-control-file {
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 100%;
  padding: 0.5rem 0;
}

/* ─── ALERTS (flash messages) ───────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  font-size: 0.85rem;
  border-width: 1px;
}

.alert-success {
  background: #071a0e;
  border-color: #14532d;
  color: #86efac;
}

.alert-danger, .alert-error {
  background: var(--danger-bg);
  border-color: #7f1d1d;
  color: #fca5a5;
}

.alert-info {
  background: #0a1020;
  border-color: #1e3a5f;
  color: #93c5fd;
}

/* ─── HR / DIVIDERS ─────────────────────────────────────────────────────────── */
hr {
  border-color: var(--border);
  margin: 2.5rem 0;
}

/* ─── TEXT UTILITIES ────────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted)  !important; }
.text-dark   { color: var(--text)        !important; }
.text-white  { color: var(--text)        !important; }

.lead {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

small, .small { font-size: 0.78rem; }

/* ─── GARAGE / PROFILE ──────────────────────────────────────────────────────── */
.bg-light {
  background: transparent !important;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.mastfoot {
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem 0;
  background: rgba(6, 10, 22, 0.60);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.mastfoot .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mastfoot p, .mastfoot a {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 0;
}

.mastfoot a {
  text-decoration: none;
  border-bottom: 1px solid rgba(237, 83, 83, 0.5);
  padding-bottom: 1px;
  transition: color var(--ease), border-color var(--ease);
}

.mastfoot a:hover {
  color: var(--red);
  border-color: var(--red);
  opacity: 1;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
/* ─── MOBILE NAV ─────────────────────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius);
  transition: background var(--ease);
}
.nav-hamburger:hover { background: var(--surface-2); }
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease, background 0.22s ease;
  transform-origin: center;
}
/* Open state — morph to X */
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--text); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--text); }

/* Mobile menu panel */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  z-index: 195;
  background: rgba(6, 10, 22, 0.96);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0 0.75rem;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.nav-mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.nav-mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color var(--ease), background var(--ease);
}
.nav-mobile-menu .nav-link:last-child { border-bottom: none; }
.nav-mobile-menu .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

@media (max-width: 768px) {
  .masthead .inner { padding: 0 1rem; }
  .nav-masthead { display: none; }      /* hide desktop nav */
  .nav-hamburger { display: flex; }     /* show burger */
  .nav-mobile-menu { display: block; }  /* panel exists in DOM, toggled via .open */
  .custom-wrap { padding: 80px 1.5rem; }
  .jumbotron { padding: 2.5rem 0; }
  .jumbotron .container { padding: 0 1.5rem; }
}


/* ─── SCROLL PROGRESS BAR ───────────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(237, 83, 83, 0.7), 0 0 2px rgba(237, 83, 83, 0.9);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}


/* ─── PAGE TRANSITIONS ───────────────────────────────────────────────────────── */
body.page-entering {
  opacity: 0;
}
body.page-exit {
  opacity: 0;
}


/* ─── CURSOR / BACKGROUND ───────────────────────────────────────────────────── */

/* Canvas — fixed, above page-specific overlays, below nav and content */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Soft radial glow that follows cursor — layered on top of canvas */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    550px circle at var(--mx, -200%) var(--my, -200%),
    rgba(237, 83, 83, 0.055),
    transparent 70%
  );
}

/* Content must sit above canvas and glow — NO z-index so Bootstrap modal backdrop
   (injected into <body> at z-index:1040) resolves in root stacking context above the modal */
.overlay {
  position: relative;
}

main[role="main"] { flex: 1; }

/* Nav and main content above canvas */
.masthead { z-index: 200; }
.mastfoot { position: relative; z-index: 10; }
main > *:not(#bg-canvas) { position: relative; z-index: 2; }
/* Albums/content sections must NOT create a stacking context so Bootstrap modals (z-index:1050) escape above the jumbotron (z-index:10) */
.album { z-index: auto !important; }


/* ─── ACCENT COLOR ──────────────────────────────────────────────────────────── */

/* Brand name */
.masthead-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--red) 0%, var(--red) 28%,
    rgba(255, 160, 160, 0.8) 39%,
    rgba(255, 255, 255, 1.0) 48%,
    rgba(255, 255, 255, 1.0) 52%,
    rgba(255, 160, 160, 0.8) 61%,
    var(--red) 72%, var(--red) 100%
  );
  background-size: 300% 100%;
  background-position: 100% center;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--red);
}
.masthead-brand:hover { text-decoration: none; animation: brand-shimmer 0.5s ease forwards; }
@keyframes brand-shimmer {
  from { background-position: 100% center; }
  to   { background-position:   0% center; }
}

/* Nav link active indicator */
.nav-masthead .nav-link.active,
.nav-masthead .nav-link:focus-visible {
  color: var(--text);
}

/* Eyebrow / label text (the small ALL-CAPS labels) */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

/* Card accent on hover handled via box-shadow in base .card rule above */

/* Primary button accent strip */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(237,83,83,0);
  transition: box-shadow 0.2s ease;
}
.btn { position: relative; }
.btn-primary:hover::after {
  box-shadow: inset 0 0 0 1px rgba(237,83,83,0.25);
}

/* Form focus ring */
.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-dim);
}

/* Favorites count & small accent spans */
.fav-count { color: var(--red); }

/* Section divider accent line */
.accent-line {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}


/* ─── ANIMATIONS ────────────────────────────────────────────────────────────── */

/* ── Hero word reveal (page load) ── */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.word {
  display: inline-block;
  animation: wordReveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--wi) * 0.1s + 0.15s);
}

@keyframes wordReveal {
  from { opacity: 0; transform: translateY(110%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero sub-elements staggered in */
.hero-sub {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}
.hero-form {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* ── Scroll reveal ── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s);
}

.fade-up.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ── Nav search ── */
.nav-search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  transition: color var(--ease), background var(--ease);
  margin-left: 0.25rem;
}
.nav-search-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-search-btn svg { display: block; }

.nav-search-overlay {
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  z-index: 250;
  background: rgba(6, 10, 22, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 2rem 1.3rem;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-search-overlay.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.nav-search-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.nav-search-input-wrap {
  flex: 1;
  position: relative;
}
.nav-search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  padding: 0.3rem 0;
  outline: none;
}
.nav-search-input::placeholder { color: var(--text-subtle); }
.nav-search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.3rem;
  flex-shrink: 0;
  transition: color var(--ease);
}
.nav-search-close:hover { color: var(--text); }

/* ── Nav scrolled state ── */
.masthead.scrolled {
  background: rgba(5, 8, 18, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 2px 0 rgba(0, 0, 0, 0.6),
    0 6px 36px rgba(80, 120, 255, 0.10);
}

/* ── Image hover zoom (cards) ── */
.card a { display: block; overflow: hidden; }
.card a .imgresp {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover a .imgresp {
  transform: scale(1.04);
}

/* ── Button hover lift ── */
.btn {
  transition: all var(--ease), transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.btn:active { transform: translateY(0); }

/* ── Nav link underline slide ── */
.nav-masthead .nav-link {
  position: relative;
}
.nav-masthead .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0.85rem;
  right: 0.85rem;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-masthead .nav-link:hover::after { transform: scaleX(1); }

/* ── Detail page section fade ── */
/* .detail-section fade handled by scroll-reveal (fade-up/is-visible transitions)
   — no CSS animation here, which would create a persistent compositing layer
     that traps backdrop-filter on children (spec boxes, media card, cards) */


/* ─── PAGINATION ────────────────────────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  padding: 2.5rem 0 1rem;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pg-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text);
  opacity: 1;
  text-decoration: none;
}

.pg-btn.active {
  background: transparent;
  border-color: var(--red);
  color: var(--text);
  box-shadow: 0 0 12px rgba(237, 83, 83, 0.18), inset 0 1px 0 rgba(237, 83, 83, 0.15);
}

.pg-btn.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.pg-ellipsis {
  color: var(--text-subtle);
  font-size: 0.75rem;
  padding: 0 0.3rem;
  user-select: none;
}


/* ─── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  width: 100%;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}
.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.88rem;
  color: var(--text-subtle);
}

/* ─── TOAST ─────────────────────────────────────────────────────────────────── */
/* ─── SEARCH AUTOCOMPLETE DROPDOWN ─────────────────────────────────────────── */
.search-input-wrap {
  position: relative;
}
.suggest-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(8, 13, 26, 0.97);
  backdrop-filter: blur(9px) saturate(148%);
  -webkit-backdrop-filter: blur(9px) saturate(148%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 500;
  overflow: hidden;
}
.suggest-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 0.55rem 0.9rem 0.2rem;
}
.suggest-item {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  opacity: 1;
}
.suggest-make {
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-right: 0.4rem;
}

.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--grain) repeat, rgba(12, 20, 38, 0.92);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.4rem;
  border-radius: 100px;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast-notification.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── SKELETON SHIMMER ───────────────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  to { background-position: -200% 0; }
}
.card-img-top {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* ─── MAKES GRID ─────────────────────────────────────────────────────────────── */
.makes-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.makes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
@media (max-width: 768px) {
  .makes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .makes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Underglow wrapper — same pattern as .card-col */
.make-tile-wrap {
  position: relative;
  display: flex;
  width: 100%;
}
.make-tile-wrap::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 12px;
  right: 12px;
  height: 40px;
  background: rgba(80, 120, 255, 1);
  filter: blur(22px);
  opacity: 0.08;
  pointer-events: none;
  transition: opacity 0.22s ease, filter 0.22s ease;
  border-radius: var(--radius);
}
.make-tile-wrap:hover::before {
  opacity: 0.38;
  filter: blur(28px);
}

.make-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.4rem 1rem 1.2rem;
  width: 100%;
  min-height: 140px;
  background: var(--grain) repeat, rgba(8, 13, 26, 0.52);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  backdrop-filter: blur(6px) saturate(148%);
  -webkit-backdrop-filter: blur(6px) saturate(148%);
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease), transform 0.12s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
  will-change: transform;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
}
.make-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(255, 255, 255, 0.07),
    transparent 70%
  );
  transition: opacity 0.35s ease;
  z-index: 0;
  border-radius: inherit;
}
.make-tile:hover::before { opacity: 1; }

.make-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background:
    linear-gradient(to right, var(--red) 3px, transparent 3px),
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,255,0.08), transparent 70%);
  border-radius: var(--radius);
  z-index: 0;
}
.make-tile:hover {
  border-color: var(--border-hover);
  background: var(--grain) repeat, rgba(12, 20, 40, 0.62);
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 0 1px var(--border-hover),
    0 8px 24px rgba(0,0,0,0.45);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
.make-tile:hover::after {
  opacity: 1;
}
.make-tile > * { position: relative; z-index: 1; }

.make-logo-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.make-logo-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.make-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  padding: 6px;
  background: rgba(255,255,255,0.92);
}
.make-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.make-count {
  font-size: 0.67rem;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}

/* ─── SPECS PANEL ────────────────────────────────────────────────────────────── */
.specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--grain) repeat, rgba(10, 16, 30, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  min-width: 90px;
  backdrop-filter: blur(6px) saturate(148%);
  -webkit-backdrop-filter: blur(6px) saturate(148%);
  position: relative;
  overflow: hidden;
}
.spec-item::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    160px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(255, 255, 255, 0.09),
    transparent 70%
  );
  transition: opacity 0.3s ease;
  z-index: 0;
  border-radius: inherit;
}
.spec-item:hover::before { opacity: 1; }
.spec-label, .spec-value { position: relative; z-index: 1; }
.spec-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
