/* ============================================================
   GONDIK LAW SPEEDWAY — site-wide design system
   Night-race dark theme: red #d8232f · navy #0a0f1e · chrome
   ============================================================ */

@font-face {
  font-family: 'Anton'; font-style: normal; font-weight: 400;
  src: url(/assets/fonts/anton.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500;
  src: url(/assets/fonts/barlow500.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600;
  src: url(/assets/fonts/barlow600.woff2) format('woff2'); font-display: swap;
}
@font-face {
  font-family: 'Kaushan Script'; font-style: normal; font-weight: 400;
  src: url(/assets/fonts/kaushan.woff2) format('woff2'); font-display: swap;
}

:root {
  --night: #0a0f1e;
  --night-2: #0d1426;
  --asphalt: #121a2e;
  --asphalt-2: #172341;
  --edge: #253356;
  --dust: #eef1f7;
  --silver: #94a1bb;
  --red: #d8232f;
  --red-hot: #ff4d57;
  --chrome: #c9d4e8;
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --cond: 'Barlow Condensed', 'Bahnschrift', 'Arial Narrow', sans-serif;
  --body: 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--night);
  color: var(--dust);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red-hot); outline-offset: 3px;
}
img { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.checker {
  height: 10px;
  background: repeating-conic-gradient(var(--dust) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
  opacity: .28;
}

/* ---------- brand ---------- */
.logo { display: block; background: center/contain no-repeat; }
.logo-sm { background-image: url(/assets/logo-sm.png); }
.logo-lg { background-image: url(/assets/logo-lg.png); }
.logo-nav { width: 86px; height: 55px; }
.logo-hero { width: min(400px, 74vw); aspect-ratio: 1531/987; margin-bottom: 20px; }
.logo-footer { width: 210px; aspect-ratio: 1531/987; margin-bottom: 14px; }
.fye {
  display: inline-block; vertical-align: middle;
  background: url(/assets/fye.png) center/contain no-repeat;
}
.fye-top { width: 49px; height: 26px; }
.fye-cta { width: 106px; height: 56px; transition: filter .15s ease, transform .15s ease; }
.fye-cta:hover, .fye-foot:hover { filter: brightness(1.2); }
.fye-cta:hover { transform: translateY(-2px); }
.fye-info { width: 87px; height: 46px; margin-top: 6px; }
.fye-foot { width: 60px; height: 32px; }

/* ---------- top bar + nav ---------- */
.topbar {
  background: var(--night-2);
  border-bottom: 1px solid var(--edge);
  font-family: var(--cond); font-weight: 500;
  font-size: 14px; letter-spacing: .06em; color: var(--silver);
}
.topbar .wrap {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 7px; padding-bottom: 7px; align-items: center;
}
.topbar a:hover { color: var(--dust); }

nav.main {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,30,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--edge);
}
nav.main .wrap {
  display: flex; align-items: center; gap: 20px;
  padding-top: 10px; padding-bottom: 10px;
}
nav.main ul {
  display: flex; gap: 4px; list-style: none; margin-left: auto;
  font-family: var(--cond); font-weight: 600; font-size: 15.5px;
  letter-spacing: .08em; align-items: center;
}
nav.main ul a {
  color: var(--silver); padding: 8px 10px; display: block; white-space: nowrap;
}
nav.main ul a:hover, nav.main li.open > a { color: var(--dust); }
nav.main li { position: relative; }
nav.main li.active > a { color: var(--dust); box-shadow: inset 0 -2px 0 var(--red); }
nav.main .drop {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 210px;
  background: var(--night-2);
  border: 1px solid var(--edge); border-top: 2px solid var(--red);
  padding: 6px 0;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
nav.main li:hover > .drop, nav.main li:focus-within > .drop, nav.main li.open > .drop { display: block; }
nav.main .drop a { padding: 8px 16px; font-size: 15px; }
nav.main .drop a:hover { background: var(--asphalt); color: var(--dust); }

.btn {
  display: inline-block;
  font-family: var(--cond); font-weight: 600;
  letter-spacing: .12em; font-size: 15px;
  padding: 9px 20px 10px;
  background: linear-gradient(120deg, var(--red), var(--red-hot));
  color: #ffffff;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: filter .15s ease;
  border: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost {
  background: none; color: var(--dust);
  clip-path: none; border: 1px solid var(--edge);
}
.btn.ghost:hover { border-color: var(--red); color: var(--red-hot); }

.burger {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--edge); color: var(--dust);
  font-family: var(--cond); font-weight: 600; letter-spacing: .1em;
  padding: 8px 14px; cursor: pointer; font-size: 15px;
}

/* ---------- page header (subpages) ---------- */
.page-head {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,15,30,.78), rgba(10,15,30,.94)),
    url(/assets/hero.jpg) center 30% / cover no-repeat, var(--night);
  border-bottom: 1px solid var(--edge);
  padding: 64px 0 42px;
}
.page-head .eyebrow {
  font-family: var(--cond); font-weight: 600; font-size: 14px;
  letter-spacing: .3em; color: var(--red-hot); text-transform: uppercase;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 64px);
  line-height: .96; text-transform: uppercase;
  transform: skewX(-3deg); transform-origin: left bottom;
  margin-top: 8px;
}
.page-head p.lead { color: var(--silver); margin-top: 12px; max-width: 62ch; }

/* ---------- sections & content ---------- */
section { padding: 64px 0 0; }
section:last-of-type { padding-bottom: 64px; }
.sec-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 26px;
}
.sec-head h2, .sec-head h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 40px);
  text-transform: uppercase; letter-spacing: .01em; line-height: 1;
}
.sec-head .rule { flex: 1; height: 1px; background: var(--edge); position: relative; top: -6px; }
.sec-head a {
  font-family: var(--cond); font-weight: 600; font-size: 15px;
  letter-spacing: .14em; color: var(--red-hot); white-space: nowrap;
}
.sec-head a:hover { color: var(--dust); }
.sec-head .fun, h1 .fun {
  font-family: 'Kaushan Script', cursive;
  text-transform: none; color: var(--red-hot);
  font-size: .92em; padding-left: 4px;
}

.content { max-width: 820px; }
.content h3 {
  font-family: var(--cond); font-weight: 600; font-size: 22px;
  text-transform: uppercase; letter-spacing: .06em;
  margin: 30px 0 10px; color: var(--dust);
}
.content h3:first-child { margin-top: 0; }
.content p { color: var(--silver); margin-bottom: 12px; max-width: 68ch; }
.content strong { color: var(--dust); }
.content ul { color: var(--silver); margin: 0 0 12px 20px; }
.content li { margin-bottom: 5px; }
.content a { color: var(--red-hot); }
.content a:hover { color: var(--dust); }

.card {
  background: var(--asphalt);
  border: 1px solid var(--edge);
  padding: 24px 28px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }

/* data tables (records, champions) */
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
table.data th {
  font-family: var(--cond); font-weight: 600; font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--red-hot);
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--red);
}
table.data td {
  padding: 9px 12px; border-bottom: 1px solid var(--edge); color: var(--silver);
}
table.data td:first-child { color: var(--dust); font-weight: 600; }
table.data tr:hover td { background: rgba(216,35,47,.05); }
.table-scroll { overflow-x: auto; }

/* champion year blocks */
.champ-year { margin-bottom: 8px; }
.champ-year summary {
  font-family: var(--cond); font-weight: 600; font-size: 19px;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  padding: 12px 16px; background: var(--asphalt); border: 1px solid var(--edge);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.champ-year summary::after { content: '+'; color: var(--red-hot); font-size: 22px; }
.champ-year[open] summary::after { content: '–'; }
.champ-year summary:hover { border-color: var(--red); }
.champ-year .champ-body { border: 1px solid var(--edge); border-top: 0; padding: 6px 0; }

/* staff */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.staff-card { background: var(--asphalt); border: 1px solid var(--edge); padding: 18px 20px; }
.staff-card h4 { font-family: var(--cond); font-weight: 600; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; }
.staff-card .role { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .18em; color: var(--red-hot); text-transform: uppercase; margin: 2px 0 8px; }
.staff-card p { font-size: 14px; color: var(--silver); }
.staff-card a { color: var(--chrome); }
.staff-card a:hover { color: var(--red-hot); }

/* hall of fame */
.hof { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.hof .card h4 { font-family: var(--display); font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
.hof .card .yr { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .2em; color: var(--red-hot); }

/* sponsors */
.logo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.slogo {
  background: #fff; border: 1px solid var(--edge);
  height: 88px; display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; transition: transform .15s ease;
}
.slogo:hover { transform: translateY(-2px); }
.slogo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slogo.more { background: var(--asphalt); flex-direction: column; gap: 4px; text-align: center; border-style: dashed; }
.slogo.more b { font-family: var(--cond); font-weight: 600; font-size: 14.5px; letter-spacing: .12em; color: var(--dust); text-transform: uppercase; }
.slogo.more i { font-style: normal; font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: .14em; color: var(--red-hot); text-transform: uppercase; }

/* news cards (home) + news page */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post { background: var(--asphalt); border: 1px solid var(--edge); display: flex; flex-direction: column; transition: border-color .15s ease; }
.post:hover { border-color: var(--red); }
.post > a { display: flex; flex-direction: column; flex: 1; }
.post .ph { aspect-ratio: 16/9; background: var(--asphalt-2) center/cover no-repeat; border-bottom: 2px solid var(--red); }
.post .tx { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post time { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .2em; color: var(--red-hot); }
.post h4 { font-family: var(--cond); font-weight: 600; font-size: 20px; line-height: 1.22; text-transform: uppercase; letter-spacing: .02em; }
.post p { font-size: 14.5px; color: var(--silver); }
.post .more { margin-top: auto; padding-top: 10px; font-family: var(--cond); font-weight: 600; font-size: 13.5px; letter-spacing: .16em; color: var(--red-hot); }

.news-item {
  background: var(--asphalt); border: 1px solid var(--edge);
  margin-bottom: 22px; overflow: hidden;
}
.news-img { aspect-ratio: 21/9; background: var(--asphalt-2) center/cover no-repeat; border-bottom: 2px solid var(--red); }
.news-body { padding: 24px 30px 28px; }
.news-body time { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .2em; color: var(--red-hot); }
.news-body h2 { font-family: var(--cond); font-weight: 600; font-size: 26px; line-height: 1.15; text-transform: uppercase; margin: 6px 0 12px; }
.news-body p { color: var(--silver); margin-bottom: 10px; max-width: 72ch; }

/* schedule events */
.sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.ev {
  background: var(--asphalt); border: 1px solid var(--edge);
  padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start;
  transition: border-color .15s ease, transform .15s ease;
}
.ev:hover { border-color: var(--red); transform: translateY(-2px); }
.ev .d {
  font-family: var(--cond); font-weight: 600; text-align: center;
  color: var(--red-hot); letter-spacing: .08em; line-height: 1.05;
  border-right: 1px solid var(--edge); padding-right: 16px; min-width: 64px;
}
.ev .d .day { font-family: var(--display); font-size: 32px; color: var(--dust); letter-spacing: 0; }
.ev h4 { font-family: var(--cond); font-weight: 600; font-size: 17.5px; letter-spacing: .03em; line-height: 1.2; text-transform: uppercase; }
.ev p { font-size: 13.5px; color: var(--silver); margin-top: 5px; }
.ev .chip {
  display: inline-block; margin-top: 9px;
  font-family: var(--cond); font-weight: 600; font-size: 11.5px;
  letter-spacing: .18em; padding: 2px 9px 3px;
  color: var(--chrome); border: 1px solid rgba(160,180,220,.45);
}
.ev.past { opacity: .55; }
.ev .chip.result { color: var(--red-hot); border-color: rgba(216,35,47,.5); }

/* photo gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gal a {
  aspect-ratio: 4/3; background: var(--asphalt-2) center/cover no-repeat;
  border: 1px solid var(--edge); display: block; position: relative;
}
.gal a:hover { border-color: var(--red); }
.gal .cap {
  position: absolute; inset: auto 0 0 0; padding: 8px 12px;
  background: linear-gradient(transparent, rgba(10,15,30,.9));
  font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .08em;
}

/* footer */
footer {
  border-top: 1px solid var(--edge);
  background: var(--night-2);
  padding: 46px 0 34px; margin-top: 64px;
  font-size: 14.5px; color: var(--silver);
}
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
footer h5 { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .24em; color: var(--dust); text-transform: uppercase; margin-bottom: 12px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
footer a:hover { color: var(--red-hot); }
footer .fine { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--edge); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  nav.main ul {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night-2); border-bottom: 1px solid var(--edge);
    padding: 8px 0 14px; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  nav.main.nav-open ul { display: flex; }
  nav.main .drop { display: block; position: static; border: 0; box-shadow: none; background: transparent; padding-left: 18px; min-width: 0; }
  .burger { display: block; }
  .grid2, .grid3, .news { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .topbar .wrap { flex-direction: column; gap: 2px; }
  .logo-nav { width: 66px; height: 42px; }
  .sched { grid-template-columns: 1fr; }
}
