/* Audi tribute site — premium dark theme */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --bg-card: #1a1a1e;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #c41e3a;
  --accent-soft: rgba(196, 30, 58, 0.15);
  --accent-glow: rgba(196, 30, 58, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --container: min(1200px, 92vw);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

.header.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-rings {
  width: 72px;
  height: 24px;
  color: var(--text);
}

.logo-text {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0d0d0f 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  opacity: 0.5;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: center;
  padding-block: 4rem 6rem;
  min-height: calc(100vh - var(--header-h));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-visual {
  position: relative;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.5s forwards;
}

.hero-image-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 8s var(--ease);
}

.hero-image-frame:hover .hero-image {
  transform: scale(1.06);
}

.hero-image-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(196, 30, 58, 0.15) 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
}

.hero-caption {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

.hero-tagline {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1.75rem;
}

.hero-title-line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.35s; }
.hero-title-line:nth-child(2) { animation-delay: 0.5s; }
.hero-title-line:nth-child(3) { animation-delay: 0.65s; }

.hero-title-accent {
  font-style: italic;
  color: var(--accent);
}

.hero-desc {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.85s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1.15s forwards;
}

.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--text);
}

.stat-suffix {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--accent);
}

.stat-label {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* Sections */
.section {
  padding: 7rem 0;
}

.section-header {
  margin-bottom: 4rem;
}

.heritage-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.heritage-feature-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.heritage-feature-img.visible,
.reveal-img.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-desc {
  margin-top: 1rem;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--accent), var(--border) 80%);
}

.timeline-item {
  position: relative;
  padding-bottom: 3.5rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content time {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline-content p {
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* Models */
.models {
  background: var(--bg-elevated);
}

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

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  opacity: 0;
  transform: translateY(30px);
}

.model-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.model-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

.model-card-visual {
  height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  overflow: hidden;
  background: #111114;
}

.model-card-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.model-card:hover .model-card-visual img {
  transform: scale(1.08);
}

.model-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 11, 0.92) 0%,
    rgba(10, 10, 11, 0.2) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.model-card-visual .model-badge {
  position: relative;
  z-index: 1;
}

.model-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.model-card-body {
  padding: 1.5rem;
}

.model-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.model-card-body > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.model-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model-features li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.model-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Gallery */
.gallery {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    border-color 0.35s,
    box-shadow 0.35s;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  border-color: rgba(196, 30, 58, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: linear-gradient(to top, rgba(10, 10, 11, 0.9), transparent);
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--tall {
  grid-row: span 2;
}

/* Innovation */
.innovation-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.innovation-text p {
  margin-top: 1.5rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.7;
}

.innovation-showcase {
  margin-top: 2rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.innovation-showcase img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.innovation-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.innovation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.3s, background 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.innovation-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.innovation-card:hover {
  border-color: rgba(196, 30, 58, 0.25);
  background: #1e1e22;
}

.innovation-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.innovation-icon svg {
  width: 100%;
  height: 100%;
}

.innovation-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.innovation-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Sustainability */
.sustainability-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem;
  overflow: hidden;
  position: relative;
}

.sustainability-content p {
  margin-top: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}

.sustainability-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
}

.goal {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.goal strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.goal span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sustainability-visual {
  position: relative;
  min-height: 320px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sustainability-visual img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.sustainability-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(196, 30, 58, 0.12) 0%,
    transparent 50%,
    rgba(10, 10, 11, 0.4) 100%
  );
  pointer-events: none;
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-rings {
  width: 96px;
  height: 32px;
  color: var(--text-muted);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-note,
.footer-photo-credit,
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.footer-photo-credit a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-photo-credit a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 3rem 5rem;
  }

  .hero-visual {
    order: -1;
  }

  .hero-caption {
    text-align: left;
  }

  .heritage-header {
    grid-template-columns: 1fr;
  }

  .heritage-feature-img {
    max-height: 260px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .gallery-item--tall {
    grid-row: span 1;
  }

  .innovation-layout,
  .sustainability-banner {
    grid-template-columns: 1fr;
  }

  .sustainability-visual {
    min-height: 240px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 11, 0.98);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.4s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .innovation-cards {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
