/* ==========================================================================
   United States Auto Club — shared stylesheet
   Clean & modern theme
   ========================================================================== */

:root {
  --red: #d81f2a;
  --red-dark: #b0161f;
  --navy: #0c1b33;
  --navy-2: #12274a;
  --ink: #1a1f29;
  --slate: #55627a;
  --line: #e6e9f0;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --gold: #f2b705;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 27, 51, 0.08);
  --shadow-sm: 0 4px 14px rgba(12, 27, 51, 0.06);
  --max: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--slate); max-width: 720px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .mark-img {
  width: 46px; height: 46px; object-fit: contain; flex: none;
}
.brand .brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-txt small { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--slate); font-weight: 700; }
.brand .brand-txt span { font-size: 1.05rem; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--navy); font-weight: 600; font-size: .95rem;
  padding: 9px 14px; border-radius: 8px; text-decoration: none;
}
.nav-links a:hover { background: var(--bg-soft); text-decoration: none; }
.nav-links a.active { color: var(--red); }
.nav-cta { margin-left: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem; padding: 12px 22px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn--outline:hover { border-color: var(--red); color: var(--red); }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(216,31,42,.55), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #0a1730 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 110px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .eyebrow { color: #ff8f97; }
.hero p { color: #cdd6e6; font-size: 1.2rem; max-width: 60ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-flag { display: inline-flex; gap: 6px; margin-bottom: 22px; }
.hero-flag span { width: 34px; height: 8px; border-radius: 3px; }
.hero-page { padding: 66px 0 58px; }
.hero-page h1 { max-width: none; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.stat .num { font-size: 2.4rem; font-weight: 900; color: var(--red); letter-spacing: -.03em; line-height: 1; }
.stat .lbl { color: var(--slate); font-weight: 600; font-size: .95rem; margin-top: 8px; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-top { height: 8px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.card-body { padding: 26px; flex: 1; }
.card-body h3 { margin-bottom: 8px; }
.card .tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); background: #fdecee; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.card .muted { color: var(--slate); }
.card-link { font-weight: 700; margin-top: 6px; display: inline-block; }

/* ---------- Series feature ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature--rev .feature-media { order: 2; }
.feature-media {
  border-radius: var(--radius); min-height: 300px; box-shadow: var(--shadow);
  display: grid; place-items: center; color: #fff; position: relative; overflow: hidden;
}
.feature-media .badge { font-size: 5rem; font-weight: 900; opacity: .9; letter-spacing: -.04em; }
.media-crown { background: linear-gradient(140deg, #1c2f57, #0c1b33); }
.media-sprint { background: linear-gradient(140deg, #d81f2a, #7c0f16); }
.media-midget { background: linear-gradient(140deg, #f2b705, #c47b00); }
.media-circle { background: linear-gradient(140deg, #d81f2a, #7c0f16); }
.media-road   { background: linear-gradient(140deg, #12274a, #0c1b33); }
.media-offroad{ background: linear-gradient(140deg, #b5651d, #6b3410); }
.media-power  { background: linear-gradient(140deg, #1f8ad1, #10496f); }
.feature-media::after { content:""; position:absolute; inset:0; background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 3px, transparent 3px 30px); }

/* ---------- Schedule table ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
table.sched { width: 100%; border-collapse: collapse; }
table.sched th, table.sched td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); }
table.sched th { background: var(--navy); color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
table.sched tr:last-child td { border-bottom: 0; }
table.sched tbody tr:hover { background: var(--bg-soft); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill-sprint { background: #fdecee; color: var(--red-dark); }
.pill-midget { background: #fff5d6; color: #8a6400; }
.pill-crown { background: #e7edf9; color: #21396e; }
.pill-power { background: #dcefff; color: #10496f; }

.date-cell { font-weight: 800; color: var(--navy); white-space: nowrap; }

/* ---------- News list ---------- */
.news-item { display: grid; grid-template-columns: 150px 1fr; gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-date { color: var(--slate); font-weight: 700; font-size: .9rem; }
.news-item h3 { margin-bottom: 6px; }
.news-item .muted { color: var(--slate); margin: 0; }

/* ---------- Timeline (About) ---------- */
.timeline { position: relative; margin: 10px 0 0; padding-left: 28px; }
.timeline::before { content:""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 30px 6px; }
.tl-item::before { content:""; position: absolute; left: -28px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.tl-year { font-weight: 900; color: var(--red); letter-spacing: -.01em; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 20px; padding: 56px; text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd6e6; max-width: 620px; margin: 0 auto 26px; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; color: var(--navy); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(216,31,42,.35); border-color: var(--red); }

/* ---------- Footer ---------- */
/* ---------- Photos ---------- */
.card-media { height: 160px; background-size: cover; background-position: center; background-color: var(--navy); }
.card-media--contain { background-size: contain; background-repeat: no-repeat; background-color: #0d0d0d; }
.feature-media.has-photo { background-size: cover; background-position: center; }
.feature-media.has-photo::after { background-image: linear-gradient(180deg, rgba(12,27,51,0) 60%, rgba(12,27,51,.35)); }
.feature-media.has-photo .badge { display: none; }
.news-thumb { margin-top: 10px; width: 120px; height: 80px; border-radius: 10px; background-size: cover; background-position: center; }
.series-logo { width: 52px; height: 52px; object-fit: contain; flex: none; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.membership-logo { height: 150px; display: grid; place-items: center; background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 18px; }
.membership-logo img { max-height: 114px; max-width: 80%; object-fit: contain; }
.series-item .series-name { display: flex; align-items: center; gap: 12px; }

/* ---------- Series list (dynamic) ---------- */
.series-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.series-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.series-item strong { color: var(--navy); font-size: .98rem; }
.series-item p { color: var(--slate); font-size: .85rem; margin: 2px 0 0; }
.series-links { display: flex; gap: 8px; flex: none; }
.btn--sm { padding: 7px 12px; font-size: .8rem; border-radius: 8px; }
.section--soft .series-item { background: #fff; }
.btn--ghost.btn--sm { color: var(--navy); border: 1px solid var(--line); background: #fff; }

.site-footer { background: var(--navy); color: #c6d0e2; padding: 60px 0 28px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 16px; }
.site-footer a { color: #c6d0e2; display: block; padding: 4px 0; font-size: .95rem; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: #93a1bd; font-size: .95rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #8493b2; }
.footer-flag { display: inline-flex; gap: 5px; }
.footer-flag span { width: 26px; height: 6px; border-radius: 2px; }

.disclaimer { font-size: .8rem; color: #8493b2; margin-top: 8px; max-width: 60ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4, .grid-3, .grid-2, .stats { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature--rev .feature-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px; gap: 2px; display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 6px 0 0; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .stats, .grid-4, .grid-3, .grid-2, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .cta-band { padding: 36px 22px; }
  .section { padding: 60px 0; }
}
