/* ================================================================
   Electric Racing Association — Shared Styles
   Edit the color variables below to update the site palette.
   ================================================================ */

:root {
  --background: #0b0b0d;
  --surface: #151518;
  --surface-raised: #1b1b1f;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --accent: #d71920;
  --accent-bright: #f0272e;
  --border: #2a2a2e;
  --content: 1180px;
  --header-height: 76px;
  --radius: 4px;
  --ease: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.85rem, 9vw, 6.8rem);
  font-weight: 850;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

h1 em {
  color: var(--accent-bright);
  font-style: normal;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
}

h3 { font-size: 1.25rem; }
p { color: var(--muted); }

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 4px;
}

.container {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--text);
  color: var(--background);
  font-weight: 750;
  transform: translateY(-150%);
  transition: transform var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* Header and navigation */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 11, 13, 0.94);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 54px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--accent);
  background: var(--accent);
  transform: skewX(-9deg);
}

.brand-logo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  transform: skewX(9deg);
}

.brand-logo.is-loaded { display: block; }
.brand-logo.is-loaded + .brand-fallback { display: none; }

.brand-fallback {
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  transform: skewX(9deg);
}

.brand-name {
  max-width: 150px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.nav-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed;
  inset: var(--header-height) 0 0;
  display: none;
  padding: 1.25rem 1rem 2rem;
  background: var(--background);
}

.site-nav.is-open { display: block; }

.site-nav a {
  display: block;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"] { color: var(--accent-bright); }

/* Reusable buttons and labels */
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-bright); }
.button-secondary { border-color: #57575d; background: transparent; }
.button-secondary:hover { border-color: var(--text); }
.button-light { background: var(--text); color: var(--background); }
.button-light:hover { background: #fff; }

.eyebrow, .section-kicker, .panel-label {
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.25rem; }
.eyebrow > span { width: 28px; height: 2px; background: var(--accent); }
.section-kicker { margin-bottom: 0.85rem; color: var(--accent-bright); }

.text-link {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-transform: uppercase;
  text-underline-offset: 5px;
}

/* Home hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(215, 25, 32, 0.16), transparent 28%),
    linear-gradient(115deg, transparent 62%, rgba(255,255,255,0.025) 62% 63%, transparent 63%);
  content: "";
}

.hero-grid {
  position: absolute;
  inset: 55% -10% -45%;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, #000 35%);
  transform: perspective(360px) rotateX(55deg);
  transform-origin: top;
}

.hero-layout {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  gap: 2rem;
  padding-block: 4.5rem;
}

.hero-copy { max-width: 850px; }
.hero-lede { max-width: 700px; margin-bottom: 1.15rem; font-size: clamp(1.08rem, 2vw, 1.3rem); }

.status-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(215, 25, 32, 0.16);
}

.hero-panel {
  position: relative;
  max-width: 470px;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  background: rgba(21, 21, 24, 0.9);
}

.panel-number {
  position: absolute;
  top: -1.75rem;
  right: 0.5rem;
  color: rgba(255,255,255,0.04);
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
}

.hero-panel h2 { position: relative; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.event-facts { margin: 1.5rem 0 0; }

.event-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.event-facts dt { color: var(--muted); }
.event-facts dd { margin: 0; color: var(--text); font-weight: 750; text-align: right; }
.panel-note { margin: 1rem 0 0; font-size: 0.78rem; }

/* Home sections */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-dark { border-block: 1px solid var(--border); background: var(--surface); }

.split-intro, .momentum-layout { display: grid; gap: 2rem; }
.split-intro h2, .momentum-layout h2 { max-width: 720px; }
.intro-copy { max-width: 620px; }
.intro-copy p { font-size: 1.08rem; }
.intro-copy p:last-child, .momentum-layout p:last-child { margin-bottom: 0; }

.section-heading-row { margin-bottom: 2.25rem; }
.section-heading-row h2 { margin-bottom: 1rem; }

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.highlight-card {
  min-height: 190px;
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--ease);
}

.highlight-card:hover { background: var(--surface-raised); }
.highlight-card > span { display: block; margin-bottom: 2rem; color: var(--accent-bright); font-size: 0.7rem; font-weight: 850; }
.highlight-card h3 { margin-bottom: 0.5rem; text-transform: uppercase; }
.highlight-card p { margin-bottom: 0; font-size: 0.92rem; }

.momentum-layout { align-items: center; }
.momentum-visual {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface-raised), var(--background));
}

.momentum-visual::before {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.025) 18px 36px);
  content: "";
}

.track-line { position: absolute; left: -15%; width: 130%; height: 3px; background: var(--accent); transform: rotate(-17deg); }
.track-line-one { top: 38%; }
.track-line-two { top: 56%; background: rgba(255,255,255,.22); }
.timing-box {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(11,11,13,.88);
}
.timing-box strong, .timing-box small { display: block; }
.timing-box strong { font-size: clamp(1.65rem, 6vw, 2.65rem); letter-spacing: .05em; line-height: 1; }
.timing-box small { margin-top: .6rem; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .16em; }

.cta-section { padding-block: clamp(4rem, 8vw, 7rem); background: var(--accent); }
.cta-inner { display: grid; align-items: center; gap: 2rem; }
.cta-inner .section-kicker { color: #fff; opacity: .8; }
.cta-inner h2 { margin-bottom: .8rem; }
.cta-inner p { max-width: 680px; margin-bottom: 0; color: rgba(255,255,255,.84); }

/* Footer */
.site-footer { padding-top: 3.25rem; border-top: 1px solid var(--border); background: #080809; }
.footer-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 2.75rem; }
.footer-brand .brand-name { max-width: 200px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer-links a { color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-legal { display: flex; flex-direction: column; gap: .35rem; padding-block: 1.25rem; border-top: 1px solid var(--border); }
.footer-legal p { margin: 0; font-size: .72rem; }

/* Interior page components */
.page-hero { position: relative; padding-block: clamp(4.5rem, 10vw, 8rem); overflow: hidden; border-bottom: 1px solid var(--border); }
.page-hero::after { position: absolute; right: -5%; bottom: -35%; width: 380px; aspect-ratio: 1; border: 1px solid rgba(215,25,32,.3); border-radius: 50%; box-shadow: 0 0 0 55px rgba(215,25,32,.04), 0 0 0 110px rgba(215,25,32,.03); content: ""; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 960px; margin-bottom: 1rem; }
.page-hero p:not(.eyebrow) { max-width: 720px; margin-bottom: 0; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.content-grid { display: grid; gap: 2rem; }
.content-grid + .content-grid { margin-top: 2rem; }
.info-card { padding: clamp(1.4rem, 4vw, 2.25rem); border: 1px solid var(--border); background: var(--surface); }
.info-card h2 { font-size: clamp(1.5rem, 3vw, 2.35rem); }
.info-card h3 { margin-top: 1.5rem; text-transform: uppercase; }
.info-card p:last-child, .info-card ul:last-child { margin-bottom: 0; }
.check-list, .plain-list { padding: 0; margin: 1.25rem 0; list-style: none; }
.check-list li, .plain-list li { position: relative; padding: .75rem 0 .75rem 1.65rem; border-top: 1px solid var(--border); color: var(--muted); }
.check-list li::before { position: absolute; top: .94rem; left: 0; width: 9px; height: 9px; border: 2px solid var(--accent-bright); content: ""; transform: rotate(45deg); }
.plain-list li::before { position: absolute; top: 1.15rem; left: .2rem; width: 5px; height: 5px; background: var(--accent-bright); content: ""; }
.notice { padding: 1rem 1.15rem; border-left: 3px solid var(--accent); background: rgba(215,25,32,.08); color: var(--text); }
.feature-number { color: var(--accent-bright); font-size: .7rem; font-weight: 850; letter-spacing: .12em; }

/* Placeholder forms */
.form-placeholder { padding: clamp(1.5rem, 5vw, 3rem); border: 1px dashed #56565d; background: var(--surface); }
.form-placeholder h2 { font-size: clamp(1.5rem, 4vw, 2.65rem); }
.field-preview { display: grid; gap: .9rem; margin: 1.75rem 0; }
.field-preview div { padding: .85rem 1rem; border: 1px solid var(--border); background: var(--background); color: var(--muted); font-size: .87rem; }
.placeholder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.direct-email { color: var(--text); font-weight: 750; text-decoration-color: var(--accent); text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-form label { display: block; margin-bottom: .45rem; color: var(--text); font-size: .78rem; font-weight: 750; }
.contact-form input, .contact-form textarea { width: 100%; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 0; background: var(--background); color: var(--text); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:disabled, .contact-form textarea:disabled { cursor: not-allowed; opacity: .7; }
.form-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.social-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.social-link { display: inline-flex; padding: .65rem .85rem; border: 1px solid var(--border); color: var(--text); font-size: .78rem; font-weight: 750; text-decoration: none; }
.social-link:hover { border-color: var(--accent); }

@media (min-width: 700px) {
  .container { width: min(calc(100% - 3rem), var(--content)); }
  .highlight-grid { grid-template-columns: repeat(3, 1fr); }
  .highlight-card { min-height: 220px; padding: 1.75rem; }
  .section-heading-row, .cta-inner { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
  .section-heading-row h2 { margin-bottom: 0; }
  .content-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-preview, .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal { flex-direction: row; justify-content: space-between; gap: 2rem; }
}

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; align-items: center; gap: 1.4rem; padding: 0; background: transparent; }
  .site-nav a { position: relative; padding: .4rem 0; border: 0; color: var(--muted); font-size: .72rem; letter-spacing: .035em; }
  .site-nav a:hover { color: var(--text); }
  .site-nav a[aria-current="page"]::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: var(--accent); content: ""; }
  .hero-layout { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .65fr); gap: 4rem; }
  .hero-panel { align-self: end; margin-bottom: 2rem; }
  .split-intro { grid-template-columns: 1.05fr .95fr; gap: 5rem; }
  .momentum-layout { grid-template-columns: .9fr 1.1fr; gap: 5rem; }
  .momentum-visual { min-height: 470px; }
  .content-grid.sidebar-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr); gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
