:root {
  --ink: #111214;
  --muted: #62666d;
  --paper: #f4f4f1;
  --white: #ffffff;
  --red: #d71f2b;
  --red-dark: #a50f19;
  --blue: #07396e;
  --blue-dark: #03284f;
  --lime: #d7ff32;
  --line: rgba(17, 18, 20, 0.14);
  --radius: 20px;
  --max: 1180px;
  --shadow: 0 22px 55px rgba(12, 18, 25, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: 96px 0; }
.section--white { background: var(--white); }
.section--dark { color: var(--white); background: var(--ink); }
.section--blue { color: var(--white); background: var(--blue-dark); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.section-head p { max-width: 580px; margin: 0; color: var(--muted); }
.section--dark .section-head p, .section--blue .section-head p { color: rgba(255,255,255,.68); }
.eyebrow { margin: 0 0 12px; color: var(--red); font-weight: 850; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow--light { color: var(--lime); }
.title-xl, .title-lg, .title-md {
  margin: 0;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.title-xl { font-size: clamp(54px, 8vw, 112px); }
.title-lg { font-size: clamp(42px, 6vw, 76px); }
.title-md { font-size: clamp(30px, 4vw, 48px); }
.lead { font-size: clamp(18px, 2vw, 23px); line-height: 1.45; }

.site-header {
  position: sticky;
  inset: 0 0 auto;
  z-index: 50;
  height: 86px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-row { height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand img { width: 230px; height: auto; }
.nav { display: flex; align-items: center; }
.nav > ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; padding: 0; }
.nav a { position: relative; padding: 31px 0 28px; font-size: 13px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 20px; height: 3px; background: var(--red); transition: right .25s ease; }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav a.active { color: var(--red); }
.menu-toggle { display: none; border: 0; background: none; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; margin: 5px 0; background: var(--ink); transition: .25s ease; }

.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--red-dark); }
.btn::after { content: "\2192"; font-size: 18px; }
.btn--light { color: var(--ink); background: var(--white); }
.btn--light:hover { color: var(--white); background: var(--red); }
.btn--outline { color: var(--ink); background: transparent; border-color: var(--ink); }
.btn--outline:hover { color: var(--white); background: var(--ink); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.home-hero { position: relative; overflow: hidden; min-height: calc(100vh - 86px); color: var(--white); background: var(--ink); }
.home-hero::before { content: ""; position: absolute; inset: 0; opacity: .13; background: repeating-linear-gradient(116deg, transparent 0 68px, rgba(255,255,255,.25) 69px 70px); }
.hero-grid { position: relative; min-height: calc(100vh - 86px); display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; }
.hero-copy { position: relative; z-index: 2; align-self: center; padding: 72px 48px 72px 0; }
.hero-copy .lead { max-width: 660px; margin: 26px 0 34px; color: rgba(255,255,255,.72); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; min-height: 650px; margin-right: calc((100vw - min(calc(100vw - 40px), var(--max))) / -2); }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--ink) 0, transparent 38%), linear-gradient(0deg, rgba(0,0,0,.62) 0, transparent 45%); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; filter: saturate(.82) contrast(1.08); }
.hero-race-label { position: absolute; z-index: 2; right: 42px; bottom: 42px; max-width: 280px; text-align: right; }
.hero-race-label strong { display: block; margin-top: 5px; font-family: Impact, sans-serif; font-size: 34px; line-height: 1; text-transform: uppercase; }

.ticker { color: var(--white); background: var(--red); overflow: hidden; }
.ticker-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.ticker-item { padding: 24px 30px; border-right: 1px solid rgba(255,255,255,.25); }
.ticker-item:first-child { padding-left: 0; }
.ticker-item span { display: block; opacity: .72; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.ticker-item strong { font-family: Impact, sans-serif; font-size: 30px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }

.feature-race { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 570px; overflow: hidden; border-radius: var(--radius); background: var(--blue-dark); box-shadow: var(--shadow); }
.feature-race__visual { position: relative; min-height: 500px; overflow: hidden; }
.feature-race__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,23,47,.8), transparent 65%); }
.feature-race__visual > img { width: 100%; height: 100%; object-fit: cover; }
.feature-race__badge { position: absolute; z-index: 2; left: 34px; right: 34px; bottom: 30px; }
.feature-race__badge img { width: min(100%, 390px); }
.feature-race__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 74px); color: var(--white); }
.feature-race__copy p { color: rgba(255,255,255,.74); }
.race-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 26px 0 34px; background: rgba(255,255,255,.16); }
.race-facts div { padding: 16px 0; background: var(--blue-dark); }
.race-facts span { display: block; color: rgba(255,255,255,.55); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.race-facts strong { font-size: 18px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quick-card { position: relative; min-height: 240px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: transform .25s ease, box-shadow .25s ease; }
.quick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.quick-card__num { display: block; margin-bottom: 68px; color: var(--red); font-family: Impact, sans-serif; font-size: 15px; }
.quick-card h3 { margin: 0 0 8px; font-size: 24px; }
.quick-card p { margin: 0; color: var(--muted); }
.quick-card::after { content: "\2197"; position: absolute; right: 24px; top: 24px; font-size: 25px; }

.about-split { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.about-image { position: relative; }
.about-image img { width: 100%; aspect-ratio: .9; object-fit: cover; border-radius: var(--radius); }
.about-image::before { content: "AUTOSPORT.BY"; position: absolute; z-index: 2; right: -20px; bottom: 34px; padding: 13px 18px; color: var(--white); background: var(--red); font-weight: 900; letter-spacing: .09em; transform: rotate(-90deg) translateX(100%); transform-origin: right bottom; }
.about-copy p { color: var(--muted); }
.about-copy .lead { color: var(--ink); }

.page-hero { position: relative; min-height: 470px; display: flex; align-items: end; padding: 92px 0 66px; overflow: hidden; color: var(--white); background: var(--ink); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,10,12,.94), rgba(9,10,12,.44)), var(--hero-image, none) center/cover; }
.page-hero__content { position: relative; z-index: 2; max-width: 840px; }
.breadcrumbs { margin-bottom: 30px; color: rgba(255,255,255,.6); font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.breadcrumbs a:hover { color: var(--white); }

.rally-hero { min-height: 660px; background: var(--blue-dark); }
.rally-hero::before { background: linear-gradient(90deg, rgba(2,28,57,.96) 0, rgba(2,28,57,.6) 48%, rgba(2,28,57,.24)), url("../images/braslav-lakes.jpg") center/cover; filter: saturate(1.1); transform: scale(1.02); }
.rally-hero__layout { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr .8fr; align-items: end; gap: 50px; }
.rally-mark { width: min(100%, 430px); margin-left: auto; filter: drop-shadow(0 16px 32px rgba(0,0,0,.25)); }
.rally-hero .lead { max-width: 690px; color: rgba(255,255,255,.78); }
.rally-hero .hero-actions { margin-top: 30px; }
.event-status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 8px 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 50px; font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.event-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(215,255,50,.12); }

.facts-band { color: var(--white); background: var(--red); }
.facts-band__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px; border-left: 1px solid rgba(255,255,255,.22); }
.fact:first-child { padding-left: 0; border: 0; }
.fact span { display: block; opacity: .7; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.fact strong { font-family: Impact, sans-serif; font-size: 27px; font-weight: 500; text-transform: uppercase; }

.content-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: start; }
.prose p { color: var(--muted); font-size: 17px; }
.prose p:first-of-type { color: var(--ink); font-size: 22px; }
.photo-stack { position: relative; min-height: 560px; }
.photo-stack img { position: absolute; border-radius: 18px; box-shadow: var(--shadow); object-fit: cover; }
.photo-stack img:first-child { inset: 0 18% 15% 0; width: 82%; height: 85%; }
.photo-stack img:last-child { right: 0; bottom: 0; width: 44%; height: 57%; border: 8px solid var(--paper); }

.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 107px; top: 15px; bottom: 15px; width: 2px; background: rgba(255,255,255,.2); }
.timeline-item { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 54px; padding: 0 0 38px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { color: var(--lime); font-family: Impact, sans-serif; font-size: 22px; text-align: right; }
.timeline-copy { position: relative; padding: 0 0 0 25px; }
.timeline-copy::before { content: ""; position: absolute; left: -34px; top: 9px; width: 11px; height: 11px; border: 3px solid var(--blue-dark); border-radius: 50%; background: var(--lime); }
.timeline-copy h3 { margin: 0 0 4px; font-size: 21px; }
.timeline-copy p { margin: 0; color: rgba(255,255,255,.64); }

.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.doc-grid--four { grid-template-columns: repeat(4, 1fr); }
.doc-card { display: flex; min-height: 240px; flex-direction: column; justify-content: space-between; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.doc-card__icon { width: 46px; height: 54px; display: grid; place-items: center; color: var(--red); border: 2px solid var(--red); font-size: 10px; font-weight: 900; }
.doc-card h3 { margin: 25px 0 6px; font-size: 22px; }
.doc-card p { margin: 0; color: var(--muted); font-size: 14px; }
.doc-card small { display: block; margin-top: 18px; color: var(--red); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }

.event-list { display: grid; gap: 14px; }
.event-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 30px; align-items: center; padding: 26px 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: transform .2s ease, border-color .2s ease; }
.event-row:hover { transform: translateX(5px); border-color: var(--red); }
.event-row__date strong { display: block; color: var(--red); font-family: Impact, sans-serif; font-size: 38px; line-height: 1; }
.event-row__date span, .event-row__meta { color: var(--muted); font-size: 13px; }
.event-row h3 { margin: 0 0 5px; font-size: 25px; }
.event-row__arrow { font-size: 28px; }
.filter-row { display: flex; gap: 12px; margin-bottom: 30px; }
.filter-row select { min-width: 180px; padding: 14px 40px 14px 16px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); font-weight: 700; }

.contact-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 42px; padding: clamp(34px, 6vw, 72px); border-radius: var(--radius); color: var(--white); background: var(--red); }
.contact-panel p { margin: 12px 0 0; color: rgba(255,255,255,.78); }
.placeholder-note { margin-top: 28px; padding: 18px 20px; border-left: 4px solid var(--red); background: #fff4f4; color: #6f3035; }

.site-footer { padding: 58px 0 28px; color: var(--white); background: #090a0c; }
.footer-grid { display: grid; grid-template-columns: 1.15fr .7fr .7fr; gap: 60px; padding-bottom: 45px; }
.footer-brand img { width: 240px; filter: brightness(0) invert(1); }
.footer-brand p { max-width: 390px; color: rgba(255,255,255,.55); }
.footer-col h3 { margin: 0 0 18px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.footer-col a { display: block; margin: 8px 0; color: rgba(255,255,255,.6); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.42); font-size: 12px; }

@media (max-width: 920px) {
  .site-header, .header-row { height: 74px; }
  .brand img { width: 190px; }
  .menu-toggle { display: block; }
  .nav { position: absolute; top: 74px; left: 0; right: 0; height: calc(100vh - 74px); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 30px 20px; color: var(--white); background: var(--ink); }
  body.menu-open .nav { display: flex; }
  .nav > ul { width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav a { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 17px; }
  .nav a::after { display: none; }
  .hero-grid, .feature-race, .about-split, .content-grid, .rally-hero__layout { grid-template-columns: 1fr; }
  .home-hero, .hero-grid { min-height: auto; }
  .hero-copy { padding: 80px 0 38px; }
  .hero-photo { min-height: 460px; margin: 0 -20px; }
  .hero-photo::before { background: linear-gradient(0deg, var(--ink) 0, transparent 50%); }
  .quick-grid, .doc-grid { grid-template-columns: 1fr 1fr; }
  .feature-race__visual { min-height: 420px; }
  .rally-mark { width: 330px; margin: 0; }
  .facts-band__grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .fact:nth-child(4) { border-top: 1px solid rgba(255,255,255,.22); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.entry-content > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--max); }
.entry-content > .alignfull { max-width: none; }

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .section { padding: 68px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .ticker-row { grid-template-columns: 1fr; }
  .ticker-item, .ticker-item:first-child { padding: 16px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .hero-copy { padding-top: 60px; }
  .hero-photo { min-height: 390px; margin-inline: -14px; }
  .hero-race-label { right: 20px; bottom: 24px; }
  .quick-grid, .doc-grid { grid-template-columns: 1fr; }
  .feature-race { border-radius: 12px; }
  .feature-race__copy { padding: 34px 24px; }
  .race-facts { grid-template-columns: 1fr; }
  .page-hero { min-height: 390px; padding: 70px 0 52px; }
  .rally-hero { min-height: 650px; }
  .rally-mark { width: 270px; }
  .facts-band__grid { grid-template-columns: 1fr; }
  .fact, .fact:first-child, .fact:nth-child(3) { padding: 18px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.22); }
  .photo-stack { min-height: 440px; }
  .timeline::before { left: 74px; }
  .timeline-item { grid-template-columns: 58px 1fr; gap: 34px; }
  .timeline-copy::before { left: -27px; }
  .event-row { grid-template-columns: 80px 1fr; padding: 22px 18px; gap: 18px; }
  .event-row__arrow { display: none; }
  .filter-row { flex-direction: column; }
  .contact-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}
