@import url('../fonts/local-fonts.css');

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

:root {
  --black:   #00173A;
  --carbon:  #001F52;
  --steel:   #002B7F;
  --red:     #D40000;
  --yellow:  #F5C800;
  --white:   #F4F4F4;
  --grey:    #7A8FAD;
  --lightgrey: #E0E6F0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
}

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

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12,12,12,0.96);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  border-bottom: 2px solid var(--red);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo img { height: 34px; width: 34px; border-radius: 50%; }
.nav-logo span { color: var(--yellow); }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--grey);
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  display: block;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(12,12,12,0.98);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: calc(100vh - 64px); overflow-y: auto; border-bottom: 2px solid var(--red); }
  .nav-links li { border-top: 1px solid rgba(255,255,255,0.08); }
  .nav-links a { display: block; padding: 18px 40px; }
  .nav-toggle { display: flex; }
}

/* ─── PAGE HERO (subpages) ─── */
.page-hero {
  min-height: 42vh;
  background: var(--black);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  padding: 120px 60px 56px;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 20%, var(--black) 90%),
    linear-gradient(120deg, rgba(212,0,0,0.18) 0%, transparent 60%);
}
.page-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.page-hero-content { position: relative; z-index: 2; }
.page-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 10px;
}
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95;
  color: var(--white);
  text-transform: uppercase;
}
.page-sub {
  color: #aaa;
  font-size: 1rem;
  font-weight: 300;
  margin-top: 14px;
  max-width: 560px;
}
.breadcrumb {
  position: relative; z-index: 2;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.breadcrumb a { color: var(--grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--yellow); }

/* ─── HERO (Home) ─── */
.hero {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 80px 0;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 30%, var(--black) 85%),
    linear-gradient(120deg, rgba(212,0,0,0.18) 0%, transparent 60%);
}
.hero-stripe {
  position: absolute;
  top: 0; bottom: 0;
  right: 15%;
  width: 4px;
  background: var(--yellow);
  transform: skewX(-8deg);
  opacity: 0.6;
}
.hero-stripe-2 {
  position: absolute;
  top: 0; bottom: 0;
  right: calc(15% + 20px);
  width: 2px;
  background: var(--red);
  transform: skewX(-8deg);
  opacity: 0.4;
}

.hero-car {
  position: absolute;
  right: 0; bottom: 0;
  width: 58%;
  height: 78%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-car img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%), linear-gradient(to top, transparent 0%, black 18%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, black 55%, transparent 100%), linear-gradient(to top, transparent 0%, black 18%);
  mask-composite: intersect;
  opacity: 0.92;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
  max-width: 620px;
}
.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.92;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.hero-title em {
  font-style: normal;
  color: var(--yellow);
  display: block;
}
.hero-sub {
  color: #aaa;
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 440px;
  line-height: 1.5;
}
.hero-cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  padding: 13px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: #a3000a; }
.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 12px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.25);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--grey);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: 'Barlow Condensed', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--grey), transparent);
}

/* ─── STATS BAR ─── */
.statsbar {
  background: var(--carbon);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid #2a2a2a;
  border-bottom: 3px solid var(--red);
}
.stat-item {
  padding: 24px 48px;
  text-align: center;
  border-right: 1px solid #2a2a2a;
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--yellow);
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── SECTION BASICS ─── */
section { padding: 96px 60px; }
.section-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}
.section-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #444;
  max-width: 640px;
  font-weight: 400;
}

/* ─── ÜBER UNS ─── */
.about {
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.about-visual {
  background: var(--lightgrey);
  aspect-ratio: 4/3;
  overflow: hidden;
  border-left: 4px solid var(--red);
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ─── TEAM ─── */
.team-section {
  background: var(--black);
  color: var(--white);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 56px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.team-card {
  background: var(--carbon);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}
.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.team-card.service::before { background: var(--yellow); }
.team-role {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.team-card.service .team-role { color: var(--yellow); }
.team-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
}
.team-desc {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
  font-weight: 300;
}
.team-number {
  position: absolute;
  bottom: 24px;
  right: 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 5rem;
  color: rgba(255,255,255,0.05);
  line-height: 1;
}
.team-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 24px; }

/* ─── ERGEBNISSE ─── */
.results-section {
  background: var(--white);
  max-width: 1200px;
  margin: 0 auto;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}
.season-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 5rem;
  color: var(--lightgrey);
  line-height: 1;
}
.result-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  gap: 0;
  border-top: 1px solid var(--lightgrey);
  padding: 20px 0;
  align-items: center;
  transition: background 0.15s;
  padding-left: 16px;
  margin-left: -16px;
}
.result-row:hover { background: #f9f9f9; }
.result-row:last-child { border-bottom: 1px solid var(--lightgrey); }
.result-event {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-date {
  font-size: 0.8rem;
  color: var(--grey);
  margin-top: 2px;
  font-weight: 400;
}
.result-position {
  text-align: center;
}
.position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--steel);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
}
.position-badge.gold { background: var(--yellow); color: var(--black); }
.result-class {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
}
.results-subhead {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 48px 0 8px;
  padding-top: 24px;
  border-top: 2px solid var(--lightgrey);
}
.event-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 24px;
}
.event-photos img { width: 100%; height: 260px; object-fit: cover; }

/* ─── ARCHIV ─── */
.archive-section {
  background: var(--carbon);
  color: var(--white);
}
.archive-years {
  display: flex;
  gap: 2px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.year-block {
  background: var(--steel);
  padding: 32px 40px;
  transition: background 0.2s;
  min-width: 160px;
  text-decoration: none;
  display: block;
  color: inherit;
}
.year-block:hover, .year-block.active { background: var(--red); }
.year-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  display: block;
  line-height: 1;
  color: var(--white);
}
.year-count {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  display: block;
}
.archive-placeholder {
  margin-top: 56px;
  padding: 40px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--yellow);
  max-width: 640px;
}
.archive-placeholder p {
  color: var(--grey);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ─── SPONSOREN ─── */
.sponsors-section {
  background: var(--black);
  text-align: center;
  color: var(--white);
}
.sponsors-section .section-title { color: var(--white); }
.sponsors-grid {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
}
.sponsor-slot {
  width: 200px; height: 100px;
  background: var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.sponsor-slot:hover { background: var(--carbon); border: 1px solid var(--red); color: var(--grey); }
.sponsor-cta {
  margin-top: 48px;
  font-size: 0.9rem;
  color: var(--grey);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ─── GALERIE ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
  max-width: 1300px;
  margin: 48px auto 0;
}
.gallery-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}
.gallery-grid img:hover { opacity: 0.8; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,10,30,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  color: var(--white);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
}

/* ─── FAHRZEUG SPECS ─── */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  max-width: 1200px;
  margin: 0 auto;
}
.spec-photo { overflow: hidden; }
.spec-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.spec-table {
  max-width: 640px;
  margin: 48px auto 0;
}
.spec-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 16px 0;
  border-top: 1px solid var(--lightgrey);
  gap: 16px;
}
.spec-row:last-child { border-bottom: 1px solid var(--lightgrey); }
.spec-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.spec-value { font-size: 0.98rem; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 1200px;
  margin: 56px auto 0;
}
.detail-grid figure { margin: 0; }
.detail-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.detail-grid figcaption {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 10px 4px;
}

/* ─── KONTAKT ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-block {
  margin-bottom: 32px;
}
.contact-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.contact-value { font-size: 1.05rem; }
.contact-value a { color: var(--black); }

/* ─── LEGAL PAGES ─── */
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin: 40px 0 12px;
}
.legal h2:first-child { margin-top: 0; }
.legal p { margin-bottom: 14px; color: #333; line-height: 1.75; }
.legal a { color: var(--red); }
.legal ul { margin: 0 0 14px 20px; color: #333; }

/* ─── FOOTER ─── */
footer {
  background: var(--black);
  border-top: 1px solid #1f1f1f;
  padding: 40px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #555;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--grey);
  letter-spacing: 0.06em;
}
.footer-logo span { color: var(--red); }
.footer-links a {
  color: #555;
  text-decoration: none;
  margin-left: 16px;
}
.footer-links a:hover { color: var(--yellow); }

/* ─── GÄSTEBUCH ─── */
.guestbook-form {
  max-width: 640px;
  background: var(--lightgrey);
  padding: 40px;
  border-left: 4px solid var(--red);
}
.form-row { margin-bottom: 20px; }
.form-row:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.98rem;
  border: 1.5px solid var(--grey);
  background: var(--white);
  color: var(--black);
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-textarea { resize: vertical; min-height: 110px; }
.form-hint { font-size: 0.82rem; color: var(--grey); margin-top: 6px; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-btn {
  background: var(--red);
  color: var(--white);
  padding: 13px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}
.form-btn:hover { background: #a3000a; }
.form-notice {
  max-width: 640px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  border-left: 4px solid var(--red);
  background: var(--lightgrey);
}
.form-notice.success { border-left-color: #1a7a3c; }

.guestbook-entries {
  max-width: 800px;
  margin-top: 56px;
}
.guestbook-entry {
  border-top: 1px solid var(--lightgrey);
  padding: 20px 0;
}
.guestbook-entry:last-child { border-bottom: 1px solid var(--lightgrey); }
.guestbook-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}
.guestbook-entry-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}
.guestbook-entry-date {
  font-size: 0.78rem;
  color: var(--grey);
  white-space: nowrap;
}
.guestbook-entry-message {
  font-size: 0.98rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-line;
}
.guestbook-empty { color: var(--grey); font-size: 0.95rem; }

@media (max-width: 900px) {
  section { padding: 72px 24px; }
  .page-hero { padding: 110px 24px 40px; }
  .about, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .team-grid, .spec-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero-content, .hero-cta { padding-left: 0; }
  .hero-content { padding: 0 24px; }
  .hero-car { width: 100%; height: 45%; opacity: 0.5; }
  footer { flex-direction: column; text-align: center; }
  .footer-links a:first-child { margin-left: 0; }
  .guestbook-form { padding: 28px; }
}
