/* ============================================================
   SOWAK VOLVO — Hauptstylesheet
   Farben: #003057 (Volvo Blau) | #CA2E37 (Gustaf Rot) | #F5F4F0 (Warm Off-White)
   Font: Inter Variable (lokal)
   ============================================================ */

/* --- Fonts ----------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* --- Custom Properties ----------------------------------- */
:root {
  --blue:       #003057;
  --blue-dark:  #001f3a;
  --blue-mid:   #004f8b;
  --red:        #CA2E37;
  --red-dark:   #a8242c;
  --white:      #ffffff;
  --off-white:  #F5F4F0;
  --gray-light: #e8e6e1;
  --gray:       #999690;
  --dark:       #111111;
  --text:       #1a1a1a;

  --nav-h:      72px;
  --max-w:      1440px;
  --gap:        clamp(1.5rem, 4vw, 3rem);

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- Typography ----------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.8rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.75; color: #333; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.75rem;
}

/* --- Layout Helpers ------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
}

.section { padding: clamp(4rem, 10vw, 9rem) 0; }
.section--dark  { background: var(--blue-dark); color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.8); }
.section--off   { background: var(--off-white); }
.section--blue  { background: var(--blue); color: var(--white); }

/* --- Navigation ----------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(0, 30, 60, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--white);
}
.nav__logo-name  {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.nav__logo-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-top: 2px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__item { position: relative; }

.nav__link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link.active { color: var(--white); background: rgba(255,255,255,0.1); }
.nav__link svg { width: 12px; height: 12px; transition: transform 0.2s; }
.nav__item:hover .nav__link svg { transform: rotate(180deg); }

/* Dropdown */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--blue-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  min-width: 180px;
  padding: 0.75rem 0 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
/* invisible bridge between nav link and dropdown to prevent hover gap */
.nav__dropdown::before {
  content: '';
  position: absolute;
  top: -0.75rem;
  left: 0; right: 0;
  height: 0.75rem;
}
.nav__item:hover .nav__dropdown,
.nav__item.open .nav__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  transition: color 0.15s, background 0.15s;
}
.nav__dropdown a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  color: white;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__menu { display: none; }
  .nav__burger { display: flex; }

  .nav__menu.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(0, 30, 60, 0.98);
    padding: 1rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav__item { width: 100%; }
  .nav__link { width: 100%; padding: 0.9rem 1.5rem; border-radius: 0; }
  .nav__dropdown {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.04);
    border-radius: 0;
    padding: 0;
  }
  .nav__dropdown a { padding: 0.7rem 2.5rem; }
}

/* --- Hero ----------------------------------------------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  will-change: transform;
  animation: heroZoom 12s var(--ease-out) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 20, 45, 0.85) 0%,
    rgba(0, 20, 45, 0.4)  50%,
    rgba(0, 20, 45, 0.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s var(--ease-out) forwards;
}

.hero__title {
  color: var(--white);
  margin: 0.5rem 0 1.5rem;
  max-width: 16ch;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s var(--ease-out) forwards;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  max-width: 44ch;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.9s 0.7s var(--ease-out) forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.25rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}
.hero__scroll::after {
  content: '';
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 1.5s 1.5s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

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

/* Subpage-Hero (kleiner) */
.hero--sub {
  height: 55vh;
  min-height: 380px;
  align-items: center;
  padding-bottom: 0;
}
.hero--sub .hero__title { font-size: clamp(2.4rem, 6vw, 5rem); }

/* --- Section Header ------------------------------------- */
.section-header { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header--center { text-align: center; }

/* --- Cards (Teaser) ------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.card:hover img { transform: scale(1.05); }

.card__body {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,20,40,0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  transition: background 0.3s;
}
.card:hover .card__body {
  background: linear-gradient(to top, rgba(0,20,40,0.9) 0%, rgba(0,20,40,0.1) 60%);
}
.card__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.4rem;
}
.card__title { font-size: 1.5rem; color: var(--white); }
.card__arrow {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transform: translateX(-4px);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.card:hover .card__arrow { transform: translateX(0); opacity: 1; }
.card__arrow::after {
  content: '→';
  font-size: 1rem;
}

/* --- Text + Image Split --------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; direction: ltr; }
}

.split__img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.split__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.split__img:hover img { transform: scale(1.03); }

.split__text { display: flex; flex-direction: column; gap: 1.25rem; }
.split__text h2 { margin-bottom: 0.25rem; }

/* --- Quote / Highlight Block ---------------------------- */
.quote-block {
  border-left: 4px solid var(--red);
  padding: 1.5rem 2rem;
  background: var(--off-white);
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
}
.quote-block p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  font-weight: 500;
  color: var(--blue);
  line-height: 1.6;
}

/* --- Model Cars List (Fliessentext) --------------------- */
.car-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.5rem 0;
}
.car-list li {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.car-list li:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

/* --- Gallery Grid --------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.gallery--masonry {
  columns: 4;
  column-gap: 0.75rem;
}
.gallery--masonry .gallery__item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
}

@media (max-width: 1100px) { .gallery--masonry { columns: 3; } }
@media (max-width: 700px)  { .gallery--masonry { columns: 2; } }
@media (max-width: 440px)  { .gallery--masonry { columns: 1; } }

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
  background: var(--gray-light);
}
.gallery--grid .gallery__item { aspect-ratio: 1; }

.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.3s;
}
.gallery__item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* --- Gallery Filter ------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 2px solid var(--gray-light);
  color: var(--gray);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* --- Lightbox ------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.open {
  display: flex;
  animation: fadeIn 0.2s forwards;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 90svh;
  object-fit: contain;
  border-radius: 4px;
  animation: lightboxIn 0.3s var(--ease-out);
}
@keyframes lightboxIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.lightbox__close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  transition: color 0.2s;
}
.lightbox__close:hover { color: white; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 2.5rem;
  padding: 1rem;
  transition: color 0.2s;
  user-select: none;
}
.lightbox__nav:hover { color: white; }
.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }
.lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

/* --- Timeline (Restaurierung) --------------------------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--red), var(--blue));
}
.timeline__item {
  position: relative;
  padding: 0 0 3rem 2rem;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: 0.3rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--red);
}
.timeline__year {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.35rem;
}
.timeline__title { font-size: 1.3rem; font-weight: 700; color: var(--blue); margin-bottom: 0.5rem; }
.timeline__text { font-size: 0.97rem; line-height: 1.7; }

/* --- Stats / Zahlen -------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--red);
  line-height: 1;
  min-height: clamp(4.5rem, 9vw, 7rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* --- Buttons -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 6px;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(202, 46, 55, 0.35);
}
.btn--outline {
  border: 2px solid var(--white);
  color: var(--white);
}
.btn--outline:hover {
  background: var(--white);
  color: var(--blue);
  transform: translateY(-2px);
}
.btn--ghost {
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn--ghost:hover {
  background: var(--blue);
  color: var(--white);
}

/* --- Footer --------------------------------------------- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer__brand { color: var(--white); font-weight: 700; font-size: 1rem; }
.footer__brand span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.footer__links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}
.footer__links a { transition: color 0.2s; }
.footer__links a:hover { color: var(--white); }
.footer__copy { font-size: 0.8rem; width: 100%; text-align: center; opacity: 0.4; }

/* --- Scroll Reveal -------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* --- Page-Specific -------------------------------------- */

/* Museum Modelle: Grid */
.modelle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.modelle-grid .gallery__item {
  aspect-ratio: 4/3;
}
.modelle-grid .gallery__item--feature {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: unset;
}

/* Vitrine overview row */
.vitrine-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.vitrine-row .gallery__item { aspect-ratio: 3/4; }

/* --- Impressum / Datenschutz --------------------------- */
.prose {
  max-width: 720px;
}
.prose h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  color: var(--blue);
}
.prose p { margin-bottom: 1rem; }
.prose a { color: var(--blue); text-decoration: underline; }

/* --- Utility -------------------------------------------- */
.text-center { text-align: center; }
.text-blue   { color: var(--blue); }
.text-red    { color: var(--red); }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }
.gap-text > * + * { margin-top: 1rem; }

/* --- Responsive ----------------------------------------- */
@media (max-width: 600px) {
  .hero__title { font-size: 2.6rem; }
  .section { padding: 3.5rem 0; }
  .cards { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}
