:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-soft: #111111;
  --ink: #f5f5f5;
  --muted: #cfcfcf;
  --subtle: #8d8d8d;
  --line: rgba(245, 245, 245, 0.12);
  --accent: #5c6bc0;
  --accent-2: #7c8ceb;
  --accent-soft: rgba(92, 107, 192, 0.16);
  --accent-glow: rgba(92, 107, 192, 0.35);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --error: #e57373;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(92, 107, 192, 0.12), transparent 360px),
    radial-gradient(circle at top left, rgba(92, 107, 192, 0.16), transparent 300px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.intro-active {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 3rem;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.015;
  mix-blend-mode: overlay;
}

/* Hero-specific grain animation */
main::before {
  position: absolute;
  top: 0;
  left: -50%;
  z-index: 0;
  width: 200%;
  height: 100%;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
  animation: grainMove 45s steps(10) infinite;
  pointer-events: none;
  mask-image: linear-gradient(180deg, black 0%, black 60%, transparent 100%);
}

.landing-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background: #050505;
  opacity: 1;
  transition: opacity 720ms ease, visibility 720ms ease;
}

html[data-intro-viewed="true"] .landing-intro,
.landing-intro.is-leaving {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.landing-intro::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 44%, var(--accent-glow), transparent 24rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
  opacity: 0;
  animation: introAtmosphere 2500ms ease forwards;
}

.landing-intro::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4rem;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, transparent 4%, black 32%, transparent 86%);
}

.intro-glow {
  position: absolute;
  width: min(68vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(124, 140, 235, 0.28), transparent 38%),
    radial-gradient(circle, var(--accent-glow), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  animation: introGlow 2500ms ease forwards;
}

.intro-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(78vw, 340px);
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  animation: introReveal 2500ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.intro-logo {
  width: min(58vw, 230px);
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 0 42px var(--accent-glow)) drop-shadow(0 24px 60px rgba(0, 0, 0, 0.72));
  animation: introBreathe 2200ms ease-in-out 420ms infinite;
}

.intro-tagline {
  margin: 0;
  color: rgba(245, 245, 245, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  opacity: 0;
  animation: introTagline 1800ms ease 620ms forwards;
}

.intro-dots {
  display: inline-flex;
  gap: 8px;
  opacity: 0;
  animation: introTagline 1600ms ease 840ms forwards;
}

.intro-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 18px var(--accent-glow);
  animation: introDot 1200ms ease-in-out infinite;
}

.intro-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.intro-dots span:nth-child(3) {
  animation-delay: 280ms;
}

.landing-intro.is-leaving ~ .site-header,
.landing-intro.is-leaving ~ main,
.landing-intro.is-leaving ~ .site-footer {
  animation: pageReveal 820ms ease both;
}

@keyframes introReveal {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  30%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introTagline {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  42%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introGlow {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  34%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introAtmosphere {
  0% {
    opacity: 0;
  }

  35%,
  100% {
    opacity: 1;
  }
}

@keyframes introBreathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes introDot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes pageReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .landing-intro,
  .landing-intro::before,
  .intro-glow,
  .intro-content,
  .intro-logo,
  .intro-tagline,
  .intro-dots,
  .intro-dots span {
    animation: none;
  }

  .intro-content,
  .intro-tagline,
  .intro-dots,
  .intro-glow,
  .landing-intro::before {
    opacity: 1;
  }

  /* Disable hero animations */
  .compact-hero::before,
  .compact-hero::after {
    animation: heroGlowFadeIn 0.5s ease forwards;
  }

  .hero-copy,
  .hero-panel {
    animation: none;
    opacity: 1;
  }

  main::before {
    animation: none;
  }
}

/* Why page styles */
.why-intro {
  max-width: 720px;
}

.intro-lead {
  margin-top: 24px;
  color: var(--accent-2);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
}

.why-content {
  display: grid;
  gap: 64px;
  margin-top: 48px;
}

.why-statement {
  max-width: 760px;
  padding: 32px;
  border: 1px solid rgba(92, 107, 192, 0.2);
  border-radius: 12px;
  background: 
    linear-gradient(135deg, rgba(92, 107, 192, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(11, 11, 11, 0.6);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 0 40px rgba(92, 107, 192, 0.1),
    0 0 12px rgba(92, 107, 192, 0.05) inset;
}

.why-statement p {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.7;
}

.why-statement strong {
  color: var(--accent-2);
  font-weight: 800;
}

.why-principles h2 {
  margin-bottom: 16px;
}

.why-principles > p {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.05rem;
}

.principles-grid {
  display: grid;
  gap: 16px;
}

.principle-card {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 11, 11, 0.6);
  backdrop-filter: blur(12px);
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    box-shadow 350ms ease;
}

.principle-card::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(92, 107, 192, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.principle-card:hover {
  border-color: rgba(92, 107, 192, 0.4);
  box-shadow: 
    0 0 32px rgba(92, 107, 192, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.principle-card:hover::before {
  opacity: 1;
}

.principle-icon {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.principle-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.principle-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.why-process {
  max-width: 760px;
}

.process-content h2 {
  margin-bottom: 20px;
}

.process-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.process-content p:last-child {
  margin-top: 24px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}

.why-philosophy {
  display: grid;
  gap: 32px;
  padding: 40px 32px;
  border: 1px solid rgba(92, 107, 192, 0.25);
  border-radius: 12px;
  background: 
    linear-gradient(135deg, rgba(92, 107, 192, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(11, 11, 11, 0.7);
  backdrop-filter: blur(24px);
  box-shadow: 
    0 0 50px rgba(92, 107, 192, 0.12),
    0 0 16px rgba(92, 107, 192, 0.08) inset;
}

.philosophy-highlight h2 {
  margin: 0;
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.philosophy-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.philosophy-content p strong {
  color: var(--accent-2);
  font-weight: 800;
}

.why-moments h2 {
  margin-bottom: 28px;
}

.moments-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.moment-card {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    background 300ms ease,
    box-shadow 350ms ease;
}

.moment-card:hover {
  border-color: rgba(92, 107, 192, 0.35);
  background: rgba(92, 107, 192, 0.08);
  box-shadow: 
    0 0 24px rgba(92, 107, 192, 0.12),
    0 0 8px rgba(92, 107, 192, 0.06) inset;
  transform: translateX(4px);
}

.moment-label {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.moments-conclusion {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

.why-mission {
  padding: 48px 0;
}

.mission-statement {
  max-width: 820px;
  margin-inline: auto;
  padding: 48px 40px;
  border: 1px solid rgba(92, 107, 192, 0.3);
  border-radius: 12px;
  background: 
    radial-gradient(ellipse at center, rgba(92, 107, 192, 0.15), transparent 70%),
    rgba(11, 11, 11, 0.8);
  backdrop-filter: blur(28px);
  box-shadow: 
    0 0 60px rgba(92, 107, 192, 0.18),
    0 0 20px rgba(92, 107, 192, 0.1) inset;
  text-align: center;
}

.mission-statement .eyebrow {
  margin-bottom: 20px;
}

.mission-statement h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (min-width: 700px) {
  .intro-lead {
    font-size: 1.6rem;
  }

  .why-statement {
    padding: 40px 48px;
  }

  .why-statement p {
    font-size: 1.3rem;
  }

  .principles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-philosophy {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    padding: 48px 40px;
  }

  .philosophy-highlight h2 {
    font-size: 2.2rem;
  }

  .moments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-statement h2 {
    font-size: 2.4rem;
  }
}

@media (min-width: 980px) {
  .intro-lead {
    font-size: 1.8rem;
  }

  .philosophy-highlight h2 {
    font-size: 2.5rem;
  }

  .moments-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mission-statement h2 {
    font-size: 2.65rem;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input,
select {
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 136px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-2);
  outline: 2px solid rgba(92, 107, 192, 0.32);
  outline-offset: 0;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  margin-inline: 0;
  width: 100%;
  background: rgba(5, 5, 5, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(92, 107, 192, 0.15);
  box-shadow: 
    0 0 40px rgba(92, 107, 192, 0.08),
    0 1px 0 rgba(92, 107, 192, 0.1) inset,
    0 4px 20px rgba(0, 0, 0, 0.15);
  transition: 
    padding 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease,
    backdrop-filter 250ms ease;
}

.site-header::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(92, 107, 192, 0.1), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.site-header::after {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(92, 107, 192, 0.4) 50%, transparent);
  opacity: 0;
  transition: opacity 250ms ease;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header.is-scrolled {
  padding: 12px 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(32px) saturate(200%);
  border-bottom-color: rgba(92, 107, 192, 0.25);
  box-shadow: 
    0 0 50px rgba(92, 107, 192, 0.14),
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(92, 107, 192, 0.15) inset;
}

.site-header.is-scrolled::before {
  opacity: 0.8;
}

.site-header.is-scrolled::after {
  opacity: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms ease;
}

.brand:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(92, 107, 192, 0.34);
  border-radius: 50%;
  background: #f5f5f5;
  object-fit: contain;
  box-shadow: 0 0 24px rgba(92, 107, 192, 0.18), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.94rem;
}

.brand small {
  color: var(--subtle);
  font-size: 0.72rem;
}

.site-nav {
  display: none;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(92, 107, 192, 0.18);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 
    0 0 20px rgba(92, 107, 192, 0.08),
    0 0 8px rgba(92, 107, 192, 0.05) inset;
}

.site-nav a {
  position: relative;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  overflow: hidden;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    color 300ms ease,
    box-shadow 350ms ease;
}

.site-nav a::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at center, rgba(92, 107, 192, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.site-nav a::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 300ms ease;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  background: rgba(92, 107, 192, 0.18);
  color: var(--ink);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.22),
    0 0 12px rgba(92, 107, 192, 0.12) inset,
    0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.site-nav a[aria-current="page"]::before,
.site-nav a:hover::before {
  opacity: 1;
}

.site-nav a[aria-current="page"]::after,
.site-nav a:hover::after {
  opacity: 1;
}

.site-nav a[aria-current="page"] {
  background: rgba(92, 107, 192, 0.22);
  box-shadow: 
    0 0 32px rgba(92, 107, 192, 0.28),
    0 0 14px rgba(92, 107, 192, 0.15) inset,
    0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(92, 107, 192, 0.18);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  overflow: hidden;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    border-color 300ms ease,
    box-shadow 350ms ease;
}

.mobile-menu-toggle::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at center, rgba(92, 107, 192, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.mobile-menu-toggle:hover {
  border-color: rgba(92, 107, 192, 0.4);
  background: rgba(92, 107, 192, 0.18);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.22),
    0 0 12px rgba(92, 107, 192, 0.1) inset,
    0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.mobile-menu-toggle:hover::before {
  opacity: 1;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 250ms ease, opacity 250ms ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  width: min(320px, 85vw);
  height: 100vh;
  padding: 88px 24px 24px;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(32px) saturate(180%);
  border-left: 1px solid rgba(92, 107, 192, 0.28);
  box-shadow: 
    -8px 0 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(92, 107, 192, 0.15),
    1px 0 0 rgba(92, 107, 192, 0.12) inset;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(92, 107, 192, 0.08), transparent 40%);
  pointer-events: none;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu a {
  position: relative;
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(92, 107, 192, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  overflow: hidden;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    border-color 300ms ease,
    color 300ms ease,
    box-shadow 350ms ease;
}

.mobile-menu a::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 50%, rgba(92, 107, 192, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.mobile-menu a::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 300ms ease;
}

.mobile-menu a[aria-current="page"],
.mobile-menu a:hover {
  border-color: rgba(92, 107, 192, 0.5);
  background: rgba(92, 107, 192, 0.18);
  color: var(--ink);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.24),
    0 0 12px rgba(92, 107, 192, 0.12) inset;
  transform: translateX(-4px);
}

.mobile-menu a[aria-current="page"]::before,
.mobile-menu a:hover::before {
  opacity: 1;
}

.mobile-menu a[aria-current="page"]::after,
.mobile-menu a:hover::after {
  opacity: 1;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 139;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

main {
  position: relative;
  padding-bottom: 48px;
}

main::after {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 100%;
  height: 600px;
  content: "";
  background: radial-gradient(ellipse at center, rgba(92, 107, 192, 0.08), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero,
.page-intro,
.detail-hero {
  border-top: 1px solid var(--line);
}

.compact-hero {
  position: relative;
  display: grid;
  gap: 20px;
  min-height: 420px;
  padding: 54px 0 34px;
  overflow: hidden;
}

/* Vignette effect for cinematic depth */
.compact-hero > *:first-child::before {
  position: absolute;
  inset: -100px;
  z-index: -1;
  content: "";
  background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(5, 5, 5, 0.4) 80%);
  pointer-events: none;
}

/* Ambient blue glow layers */
.compact-hero::before {
  position: absolute;
  top: -30%;
  left: -5%;
  width: 700px;
  height: 700px;
  content: "";
  background: radial-gradient(circle, rgba(92, 107, 192, 0.22), rgba(92, 107, 192, 0.08) 40%, transparent 70%);
  filter: blur(100px);
  opacity: 0;
  animation: heroGlowPulse 12s ease-in-out infinite, heroGlowFadeIn 1.4s ease forwards;
  pointer-events: none;
}

.compact-hero::after {
  position: absolute;
  top: 20%;
  right: -15%;
  width: 600px;
  height: 600px;
  content: "";
  background: radial-gradient(circle, rgba(124, 140, 235, 0.16), rgba(92, 107, 192, 0.06) 45%, transparent 75%);
  filter: blur(110px);
  opacity: 0;
  animation: heroGlowPulse 14s ease-in-out 2s infinite, heroGlowFadeIn 1.6s ease 0.4s forwards;
  pointer-events: none;
}

/* Radial gradient lighting */
.compact-hero > * {
  position: relative;
  z-index: 2;
}

/* Subtle grain texture overlay */
@keyframes grainMove {
  0%, 100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -5%);
  }
  20% {
    transform: translate(-10%, 5%);
  }
  30% {
    transform: translate(5%, -10%);
  }
  40% {
    transform: translate(-5%, 15%);
  }
  50% {
    transform: translate(-10%, 5%);
  }
  60% {
    transform: translate(15%, 0);
  }
  70% {
    transform: translate(0, 10%);
  }
  80% {
    transform: translate(-15%, 0);
  }
  90% {
    transform: translate(10%, 5%);
  }
}

@keyframes heroGlowPulse {
  0%, 100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  50% {
    transform: scale(1.15) translateY(-15px);
    opacity: 0.85;
  }
}

@keyframes heroGlowFadeIn {
  to {
    opacity: 1;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
  opacity: 0;
  animation: heroContentSlideIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes heroContentSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow,
.chapter-label {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.05;
}

h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.65rem;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.hero-copy > p:not(.eyebrow),
.page-intro > p:not(.eyebrow),
.contact-band p,
.detail-summary p,
.vehicle-content p,
.detail-columns p {
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  overflow: hidden;
  transition:
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    border-color 300ms ease,
    box-shadow 350ms ease,
    color 300ms ease;
}

.button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 300ms ease;
}

.button.primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #f5f5f5;
  box-shadow: 
    0 0 16px rgba(92, 107, 192, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

.button.primary::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.button.whatsapp {
  border-color: rgba(92, 107, 192, 0.62);
  background: rgba(92, 107, 192, 0.14);
  color: #f5f5f5;
  box-shadow: 0 0 12px rgba(92, 107, 192, 0.1);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(245, 245, 245, 0.12);
}

.button:hover {
  border-color: var(--accent-2);
  box-shadow: 
    0 0 24px rgba(92, 107, 192, 0.28),
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(92, 107, 192, 0.15) inset;
  transform: translateY(-2px);
}

.button:hover::before {
  opacity: 1;
}

.button.primary:hover {
  background: linear-gradient(135deg, #6574c4, #8694ef);
  box-shadow: 
    0 0 32px rgba(92, 107, 192, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(255, 255, 255, 0.12) inset;
}

.button.primary:hover::after {
  opacity: 1;
}

.button.whatsapp:hover {
  background: rgba(92, 107, 192, 0.22);
  border-color: rgba(124, 140, 235, 0.75);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.32),
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 0 10px rgba(92, 107, 192, 0.18) inset;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(92, 107, 192, 0.5);
}

.button:active {
  transform: translateY(0);
  transition-duration: 100ms;
}

.hero-panel {
  position: relative;
  z-index: 1;
  align-self: end;
  max-width: 360px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(5, 5, 5, 0.16), rgba(5, 5, 5, 0.84)),
    url("https://stockportmotors.netlify.app/logo.png") center / cover;
  box-shadow: var(--shadow);
  opacity: 0;
  animation: heroContentSlideIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-panel span,
.hero-panel strong,
.hero-panel p {
  display: block;
}

.hero-panel span {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel strong {
  margin-top: 72px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.hero-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section,
.contact-band,
.detail-columns,
.enquiry-section {
  margin-top: 48px;
}

.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading > a {
  width: fit-content;
  color: var(--accent-2);
  font-weight: 800;
}

.vehicle-grid {
  display: grid;
  align-items: start;
  gap: 16px;
}

.vehicle-card {
  position: relative;
  overflow: clip;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(11, 11, 11, 0.84);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    box-shadow 350ms ease;
}

.vehicle-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: 8px;
  background: radial-gradient(circle at 50% 0%, rgba(92, 107, 192, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.vehicle-card:hover {
  border-color: rgba(124, 140, 235, 0.52);
  box-shadow: 
    0 0 42px rgba(92, 107, 192, 0.24),
    0 20px 60px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(92, 107, 192, 0.18) inset;
  transform: translateY(-4px) scale(1.01);
}

.vehicle-card:hover::before {
  opacity: 1;
}

.vehicle-card a,
.vehicle-card-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.vehicle-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.vehicle-content .chapter-label,
.vehicle-content h3,
.vehicle-content p {
  margin: 0;
}

.vehicle-content h3 {
  overflow-wrap: anywhere;
}

.vehicle-image,
.detail-image {
  position: relative;
  overflow: clip;
  background: var(--panel-soft);
}

.vehicle-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: clip;
}

.vehicle-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-grid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vehicle-card:hover .vehicle-image img {
  transform: scale(1.05);
}

.vehicle-image::after,
.detail-image::after {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  transition: background 350ms ease;
}

.vehicle-card:hover .vehicle-image::after {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.status-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-tag.large {
  top: 16px;
  right: 16px;
  padding: 9px 13px;
}

.status-tag.status-available {
  border-color: rgba(124, 140, 235, 0.62);
  background: rgba(92, 107, 192, 0.22);
  color: #f5f5f5;
}

.status-tag.status-reserved {
  border-color: rgba(124, 140, 235, 0.5);
  background: rgba(124, 140, 235, 0.16);
  color: #f5f5f5;
}

.status-tag.status-sold {
  border-color: rgba(245, 245, 245, 0.22);
  background: rgba(17, 17, 17, 0.82);
  color: #cfcfcf;
}

.vehicle-content p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.35rem;
  line-height: 1.45;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.spec-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  margin-top: 2px;
}

.spec-list div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.spec-list dt {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.spec-list dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: normal;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.card-footer strong {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}

.card-footer span {
  color: var(--accent-2);
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.vehicle-card.status-sold img {
  filter: grayscale(0.85) brightness(0.72);
}

.vehicle-card.status-reserved img {
  filter: saturate(0.85) brightness(0.86);
}

.contact-band {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 107, 192, 0.18), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: 0 0 36px rgba(92, 107, 192, 0.08);
}

.contact-band h2 {
  margin-bottom: 12px;
}

.contact-band p:last-child {
  margin-bottom: 0;
}

.visit-section {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

.visit-content,
.map-container {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  overflow: clip;
}

.visit-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.visit-content h2,
.visit-content p,
.business-address {
  margin: 0;
}

.business-address,
.contact-details p {
  color: var(--muted);
}

.contact-details p {
  margin: 0;
}

.visit-content a {
  overflow-wrap: anywhere;
}

.map-container {
  min-height: 360px;
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.8rem;
}

.page-intro {
  padding: 54px 0 22px;
}

.page-intro h1 {
  max-width: 10ch;
}

.stock-section {
  margin-top: 26px;
}

.inventory-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 2px;
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field span,
.enquiry-form span {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    border-color 300ms ease,
    box-shadow 350ms ease,
    color 300ms ease;
}

.reset-button {
  width: fit-content;
}

.filter-button.is-active,
.filter-button:hover {
  border-color: var(--accent-2);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.2),
    0 0 10px rgba(92, 107, 192, 0.1) inset;
  transform: translateY(-2px);
}

.inventory-count {
  margin: 0 0 16px;
  color: var(--subtle);
  font-size: 0.86rem;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  gap: 22px;
  padding-top: 20px;
}

.back-link {
  width: fit-content;
}

.detail-image {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}

.detail-summary {
  display: grid;
  gap: 16px;
}

.detail-summary h1 {
  max-width: 12ch;
  margin-bottom: 0;
}

.detail-summary > p {
  margin-bottom: 0;
}

.detail-price {
  color: var(--accent-2);
  font-size: 2rem;
}

.gallery-grid {
  display: grid;
  gap: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    box-shadow 350ms ease;
}

.gallery-item.is-active,
.gallery-item:hover {
  border-color: var(--accent-2);
  box-shadow: 
    0 0 32px rgba(92, 107, 192, 0.24),
    0 0 12px rgba(92, 107, 192, 0.12) inset;
  transform: translateY(-2px) scale(1.02);
}

.gallery-item img {
  border: 0;
}

.detail-columns {
  display: grid;
  gap: 16px;
}

.detail-columns article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.78);
}

.detail-columns h2 {
  margin-bottom: 14px;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.feature-list li::before {
  margin-right: 9px;
  color: var(--accent-2);
  content: "+";
  font-weight: 900;
}

.empty-state {
  padding: 20px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.enquiry-section {
  display: grid;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 107, 192, 0.15), rgba(255, 255, 255, 0.025)),
    rgba(11, 11, 11, 0.82);
  box-shadow: 0 0 36px rgba(92, 107, 192, 0.08);
}

.enquiry-section h2 {
  margin-bottom: 14px;
}

.enquiry-section p {
  color: var(--muted);
}

.enquiry-form {
  display: grid;
  gap: 14px;
}

.enquiry-form label {
  display: grid;
  gap: 7px;
}

.enquiry-form .button-row {
  margin-top: 4px;
}

@media (min-width: 700px) {
  main,
  .site-footer {
    width: min(1120px, calc(100% - 56px));
  }

  .site-header {
    width: 100%;
    padding: 18px 0;
    margin-inline: 0;
  }

  .site-header-inner {
    width: min(1120px, calc(100% - 56px));
  }

  .site-header.is-scrolled {
    padding: 14px 0;
  }

  .site-nav {
    display: inline-flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .compact-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: end;
    min-height: 520px;
    padding-top: 76px;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  .section-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .inventory-controls {
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.45fr) minmax(180px, 0.5fr) auto;
    align-items: end;
  }

  .vehicle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-band {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .visit-section {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    align-items: stretch;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: center;
    padding-top: 34px;
  }

  .back-link {
    grid-column: 1 / -1;
  }

  .gallery-grid,
  .detail-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enquiry-section {
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  }
}

@media (min-width: 980px) {
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 2.65rem;
  }

  .vehicle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-image {
    aspect-ratio: 16 / 11;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Quick-view drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.vehicle-drawer {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 85vh;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, rgba(11, 11, 11, 0.98), rgba(5, 5, 5, 0.98));
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 
    0 -8px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(92, 107, 192, 0.16),
    0 -1px 0 rgba(92, 107, 192, 0.24) inset;
  transform: translateY(100%);
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.vehicle-drawer::before {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 10;
  width: 40px;
  height: 4px;
  content: "";
  border-radius: 2px;
  background: rgba(245, 245, 245, 0.3);
  transform: translateX(-50%);
  transition: background 300ms ease;
}

.vehicle-drawer:hover::before {
  background: rgba(92, 107, 192, 0.6);
}

.vehicle-drawer.is-open {
  transform: translateY(0);
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 16px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 245, 245, 0.22);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease,
    border-color 300ms ease,
    box-shadow 350ms ease;
}

.drawer-close:hover {
  border-color: var(--accent-2);
  background: rgba(92, 107, 192, 0.22);
  box-shadow: 
    0 0 28px rgba(92, 107, 192, 0.3),
    0 0 12px rgba(92, 107, 192, 0.15) inset;
  transform: scale(1.08) rotate(90deg);
}

.drawer-image {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  overflow: clip;
  background: var(--panel-soft);
}

.drawer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: drawerImageFade 400ms ease 120ms forwards;
}

.drawer-image::after {
  position: absolute;
  inset: auto 0 0;
  height: 60%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.drawer-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
  animation: drawerBadgeFade 400ms ease 240ms forwards;
}

.drawer-badge {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.76);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-badge.badge-status {
  border-color: rgba(124, 140, 235, 0.62);
  background: rgba(92, 107, 192, 0.28);
  box-shadow: 0 0 18px rgba(92, 107, 192, 0.24);
}

.drawer-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px;
  overscroll-behavior: contain;
}

.drawer-content::-webkit-scrollbar {
  width: 8px;
}

.drawer-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.drawer-content::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(92, 107, 192, 0.32);
}

.drawer-content::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 107, 192, 0.48);
}

.drawer-header {
  margin-bottom: 20px;
}

.drawer-header h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
}

.drawer-subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.drawer-price {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 2rem;
  font-weight: 800;
}

.drawer-finance {
  display: block;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.drawer-description {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.drawer-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.drawer-spec-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  transition: 
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    background 300ms ease,
    box-shadow 350ms ease;
}

.drawer-spec-chip:hover {
  border-color: rgba(124, 140, 235, 0.42);
  background: rgba(92, 107, 192, 0.1);
  box-shadow: 
    0 0 20px rgba(92, 107, 192, 0.12),
    0 0 8px rgba(92, 107, 192, 0.08) inset;
  transform: translateY(-2px);
}

.drawer-spec-label {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-spec-value {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.drawer-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 5, 0.95) 20%);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(92, 107, 192, 0.12);
}

.drawer-actions .button {
  width: 100%;
  justify-content: center;
}

.drawer-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@keyframes drawerImageFade {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drawerBadgeFade {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .vehicle-drawer {
    top: 0;
    bottom: auto;
    width: 500px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border-left: 1px solid rgba(92, 107, 192, 0.28);
    transform: translateX(100%);
  }

  .vehicle-drawer::before {
    display: none;
  }

  .vehicle-drawer.is-open {
    transform: translateX(0);
  }

  .drawer-close {
    top: 16px;
  }

  .drawer-close:hover {
    transform: scale(1.08);
  }

  .drawer-image {
    aspect-ratio: 16 / 11;
  }

  .drawer-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .drawer-secondary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .drawer-actions {
    position: relative;
    padding: 20px 0 0;
    background: transparent;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-overlay,
  .vehicle-drawer {
    transition: none;
  }

  .drawer-image img,
  .drawer-badges {
    animation: none;
    opacity: 1;
  }
}

/* =============================================
   Admin page
   ============================================= */

/* Layout */
.admin-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

/* Error banner */
.admin-error {
  padding: 14px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table th {
  padding: 12px 14px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table .action-cell {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

/* Status badge inside the admin table — override the absolute positioning
   used on vehicle cards so the badge sits inline in the table cell */
.admin-table .status-tag {
  position: static;
  display: inline-block;
}

/* Modal overlay — hidden by default via aria-hidden */
[aria-hidden="true"].admin-modal-overlay {
  display: none;
}

.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal dialog card */
.admin-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 201;
  transform: translate(-50%, -50%);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* Modal header */
.admin-modal-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

/* Modal close button — reset */
.admin-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition:
    color 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.admin-modal-close:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

/* Vehicle form */
.admin-vehicle-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.admin-vehicle-form label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

/* Inline field validation message */
.field-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 4px;
}

/* Admin toast notification */
#adminToast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  white-space: nowrap;
  transition: opacity 0.4s ease;
}

#adminToast.is-leaving {
  opacity: 0;
}
