/* Od škodovky po quattro — modern archival motorsport layout */

:root {
  --ink: #14181f;
  --ink-soft: #2a3140;
  --paper: #f3f1ec;
  --paper-deep: #e7e3da;
  --asphalt: #0e1116;
  --asphalt-mid: #1c222c;
  --steel: #8b95a5;
  --rally-red: #c4122f;
  --rally-red-deep: #8e0c22;
  --highlight: #f5c518;
  --max: 1120px;
  --nav-h: 68px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Barlow", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 18, 47, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 197, 24, 0.08), transparent 45%),
    linear-gradient(180deg, #151920 0%, #0e1116 40%, #12161d 100%);
  overflow-wrap: break-word;
}

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

a {
  color: var(--rally-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rally-red-deep);
}

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--highlight);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ——— Header / nav ——— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.site-brand:hover {
  color: #fff;
}

.site-brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.site-brand__tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.dr-navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  color: #f0f2f5;
  font-family: var(--font-ui);
}

.dr-navigation > .dr-menu {
  gap: 0.15rem !important;
}

.dr-navigation .dr-menu > li > a {
  color: #e8ebf0 !important;
  font-family: var(--font-ui) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em;
  border-radius: 4px;
  padding: 0.65rem 0.9rem !important;
  min-height: 44px;
}

.dr-navigation .dr-menu > li > a:hover,
.dr-navigation .dr-menu > li > a[aria-current="page"] {
  background: rgba(196, 18, 47, 0.22) !important;
  color: #fff !important;
}

.dr-mobile-toggle {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px !important;
  font-family: var(--font-ui) !important;
}

@media (max-width: 800px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .dr-navigation {
    width: 100%;
    justify-content: stretch;
  }

  .dr-navigation.dr-open > .dr-menu {
    background: var(--asphalt-mid);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
  }
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 78% 38%, rgba(196, 18, 47, 0.28), transparent 62%),
    radial-gradient(ellipse 45% 35% at 18% 78%, rgba(245, 197, 24, 0.07), transparent 55%),
    repeating-linear-gradient(
      -18deg,
      rgba(255, 255, 255, 0.02) 0 1px,
      transparent 1px 16px
    ),
    linear-gradient(145deg, #171c24 0%, #0e1116 45%, #161014 100%);
  transform: scale(1.02);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero__media::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 10%;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 40px rgba(255, 255, 255, 0.015),
    inset 0 0 0 80px rgba(196, 18, 47, 0.05);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(14, 17, 22, 0.88) 0%, rgba(14, 17, 22, 0.55) 48%, rgba(14, 17, 22, 0.35) 100%),
    linear-gradient(180deg, rgba(14, 17, 22, 0.2) 0%, rgba(14, 17, 22, 0.92) 100%);
}

.hero__content {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.25rem 3.5rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  max-width: 14ch;
  color: #fff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
  animation: rise-in 0.9s ease-out both;
}

.hero__lead {
  font-family: var(--font-ui);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.55;
  color: #d7dbe3;
  max-width: 38rem;
  margin: 0 0 1.75rem;
  animation: rise-in 0.9s ease-out 0.12s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise-in 0.9s ease-out 0.22s both;
}

.page-hero {
  padding: 3.5rem 1.25rem 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(196, 18, 47, 0.18), transparent 55%),
    linear-gradient(180deg, #1a2029, #12161d);
}

.page-hero__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 0.85rem;
  color: #fff;
}

.page-hero p {
  margin: 0;
  max-width: 42rem;
  font-family: var(--font-ui);
  color: #c5ccd8;
  font-size: 1.05rem;
}

/* ——— Buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--primary {
  background: var(--rally-red);
  color: #fff;
}

.btn--primary:hover {
  background: var(--rally-red-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  border-color: #fff;
  color: #fff;
}

/* ——— Layout ——— */

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.section {
  padding: 3.5rem 0;
}

.section--tight {
  padding: 2.5rem 0;
}

.section__label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rally-red);
  margin: 0 0 0.6rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: #fff;
}

.section--paper h2,
.panel h2 {
  color: var(--ink);
}

.section__intro,
.lede {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--steel);
  max-width: 42rem;
  margin: 0 0 1.75rem;
}

.panel .section__intro,
.panel .lede,
.section--paper .section__intro {
  color: var(--ink-soft);
}

.prose {
  max-width: 68ch;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 2rem 0 0.75rem;
}

.prose h2 {
  font-size: 1.85rem;
}

.prose h3 {
  font-size: 1.35rem;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  font-weight: 700;
}

.content-band {
  margin: -2.5rem auto 0;
  position: relative;
  z-index: 2;
}

.content-band .panel {
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .split--reverse > :first-child {
    order: 2;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stat {
  background: var(--asphalt-mid);
  padding: 1.25rem 1.1rem;
  color: #fff;
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--highlight);
  margin: 0 0 0.35rem;
}

.stat__label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--steel);
  margin: 0;
  line-height: 1.35;
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

.feature-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--rally-red);
  transition: background 0.2s ease, transform 0.2s ease;
}

.feature-list a:hover {
  background: rgba(196, 18, 47, 0.12);
  transform: translateX(4px);
  color: inherit;
}

.feature-list h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: #fff;
}

.feature-list p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--steel);
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(196, 18, 47, 0.55);
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.35rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rally-red);
  box-shadow: 0 0 0 3px rgba(196, 18, 47, 0.25);
}

.timeline__year {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rally-red);
  display: block;
  margin-bottom: 0.25rem;
}

.timeline h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.timeline p {
  margin: 0;
  color: var(--ink-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-grid figure {
  margin: 0;
  background: #000;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-grid a:hover img,
.gallery-grid figure:hover img {
  transform: scale(1.05);
}

.gallery-grid figcaption {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--steel);
  padding: 0.55rem 0.65rem 0.7rem;
  background: var(--asphalt-mid);
}

.pullquote {
  margin: 2rem 0;
  padding: 1.25rem 0 1.25rem 1.25rem;
  border-left: 3px solid var(--rally-red);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.aside-box {
  padding: 1.25rem;
  background: var(--paper-deep);
  border-top: 3px solid var(--rally-red);
}

.aside-box h2,
.aside-box h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.aside-box p,
.aside-box ul {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.aside-box ul {
  padding-left: 1.1rem;
}

.aside-box li + li {
  margin-top: 0.35rem;
}

.banner-shot {
  margin: 1.5rem 0 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #111;
}

.banner-shot img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
}

/* ——— Footer ——— */

.site-footer {
  margin-top: 3rem;
  padding: 2.25rem 1.25rem 2.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--steel);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.site-footer strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
}

.site-footer a {
  color: #cfd5df;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__note {
  margin: 0.85rem 0 0;
  color: #7d8796;
  font-size: 0.82rem;
}

/* ——— Motion ——— */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.2%, -0.8%, 0);
  }
}

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

  .hero__media,
  .hero__brand,
  .hero__lead,
  .hero__actions,
  .gallery-grid img {
    animation: none !important;
    transition: none !important;
  }
}
