/* ==========================================================================
   Raven Racing — shared stylesheet
   ========================================================================== */

:root {
  --navy-950: #0b1220;
  --navy-900: #0f1b33;
  --navy-800: #16233f;
  --navy-700: #1c2c4d;
  --green-600: #1f7a4d;
  --green-500: #237044;
  --green-400: #62ce91;
  --white: #ffffff;
  --off-white: #f4f6f5;
  --gray-100: #e7eae8;
  --gray-400: #8b93a1;
  --gray-600: #5a6472;
  --gray-800: #2b3341;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 18px;
  --radius-md: 10px;
  --shadow-md: 0 10px 30px rgba(11, 18, 32, 0.12);
  --shadow-lg: 0 20px 50px rgba(11, 18, 32, 0.18);
}

/* -------------------- reset -------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy-900);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------- buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--green-500);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.35);
}
.btn-primary:hover { background: #195b36; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline:hover { border-color: var(--green-400); color: var(--green-400); }
.btn-outline-dark {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}
.btn-outline-dark:hover { border-color: var(--green-500); color: var(--green-500); }

/* -------------------- header / nav -------------------- */
.site-header {
  position: relative;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  border-bottom: 3px solid var(--green-500);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--green-500);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-name em {
  color: var(--green-400);
  font-style: italic;
}
.brand-tagline {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(46, 139, 87, 0.25);
  color: var(--green-400);
}

.menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
}
.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; }
  .menu-button:not([hidden]) { display: flex; flex-shrink: 0; }
  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-800);
  }
  .nav-links a { border-radius: 0; padding: 14px 24px; }
}

/* -------------------- hero (home) -------------------- */
.hero {
  position: relative;
  background: radial-gradient(circle at 20% -10%, var(--navy-700), var(--navy-950) 65%);
  color: var(--white);
  padding: 90px 0 100px;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(11, 18, 32, 0.4));
  pointer-events: none;
}
.hero-content { position: relative; max-width: 760px; margin: 0 auto; }
.hero-logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--green-500);
  object-fit: cover;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green-400);
  border: 1px solid rgba(58, 167, 109, 0.5);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-style: italic;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1;
}
.hero h1 em { color: var(--green-400); font-style: italic; }
.hero-tagline {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 1rem;
  color: var(--gray-100);
  margin-bottom: 6px;
}
.hero-program {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: var(--green-400);
  margin-bottom: 34px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* -------------------- page hero (sub pages) -------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 64px 0;
  text-align: center;
  border-bottom: 4px solid var(--green-500);
}
.page-hero .hero-eyebrow { margin-bottom: 14px; }
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  font-style: italic;
  margin-bottom: 12px;
}
.page-hero h1 em { color: var(--green-400); font-style: italic; }
.page-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--gray-100);
}

/* -------------------- sections -------------------- */
section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green-500);
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.section-head p { color: var(--gray-600); margin: 0; }

/* -------------------- cards / grids -------------------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--green-500);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--navy-900);
  color: var(--green-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.card p { color: var(--gray-600); font-size: 0.95rem; margin: 0; }

/* person / roster card */
.person-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.person-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-400);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}
.person-card .person-info { padding: 18px 16px 24px; }
.person-card h3 { font-size: 1rem; margin-bottom: 4px; }
.person-role {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  background: rgba(46, 139, 87, 0.12);
  border-radius: 999px;
  padding: 4px 12px;
}

/* sub-team tabs / list */
.subteam-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy-800);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 3px;
}

/* stats strip */
.stats {
  background: var(--navy-900);
  color: var(--white);
  padding: 44px 0;
}
.stats .grid-4 { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--green-400);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* timeline (seasons) */
.timeline { position: relative; margin-left: 20px; padding-left: 30px; border-left: 3px solid var(--gray-100); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--green-500);
}
.timeline-year {
  font-family: var(--font-display);
  color: var(--green-600);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item p { color: var(--gray-600); margin: 0; }

/* race results table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
table { width: 100%; border-collapse: collapse; background: var(--white); min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; font-size: 0.92rem; }
thead th {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
tbody tr:nth-child(even) { background: var(--off-white); }
tbody tr:hover { background: rgba(46, 139, 87, 0.08); }

/* sponsor tiers */
.tier-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px 26px;
  text-align: center;
  border-top: 6px solid var(--green-500);
}
.tier-card.tier-featured { border-top-color: var(--navy-900); background: var(--navy-900); color: var(--white); }
.tier-card.tier-featured h3,
.tier-card.tier-featured .tier-price { color: var(--white); }
.tier-name { font-size: 1rem; margin-bottom: 6px; }
.tier-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--green-600);
  margin-bottom: 14px;
}
.tier-card ul { margin: 0 0 20px; text-align: left; }
.tier-card li {
  padding: 7px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.tier-card.tier-featured li { border-bottom-color: rgba(255,255,255,0.12); }

.sponsor-logo-slot {
  background: var(--white);
  border: 1px dashed var(--gray-400);
  border-radius: var(--radius-md);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* FAQ */
.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.faq-item h3 { font-size: 1rem; margin-bottom: 8px; color: var(--navy-900); }
.faq-item p { color: var(--gray-600); margin: 0; }

/* -------------------- gallery -------------------- */
.gallery-chips {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0;
}
.gallery-chips .container { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gallery-chips a.gallery-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 7px 16px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.gallery-chip span {
  font-size: 0.7rem;
  color: var(--navy-950);
  background: var(--green-400);
  border-radius: 999px;
  padding: 1px 8px;
}
.gallery-chips a.gallery-chip:hover { border-color: var(--green-400); color: var(--green-400); }
section[id] { scroll-margin-top: 70px; }

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--green-500);
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.gallery-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-style: italic; margin: 0; }
.gallery-count {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
}
.gallery-blurb { color: var(--gray-600); margin-top: -8px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 12px;
}
main a.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--navy-800);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (max-width: 700px) {
  .gallery-chips .container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .gallery-chips .container::-webkit-scrollbar { display: none; }
  .gallery-chips a.gallery-chip { flex-shrink: 0; }
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 18, 32, 0.96);
  color: var(--white);
}
.lightbox::backdrop { background: rgba(11, 18, 32, 0.9); }
.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 64px 16px;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox-caption {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-100);
  text-align: center;
}
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 27, 51, 0.8);
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-btn:hover { border-color: var(--green-400); color: var(--green-400); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox-inner { padding: 60px 8px 80px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--green-600), var(--green-500));
  color: var(--white);
  text-align: center;
  padding: 60px 0;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 28px; }
.cta-banner .btn-primary { background: var(--navy-900); box-shadow: none; }
.cta-banner .btn-primary:hover { background: var(--navy-800); }

/* -------------------- footer -------------------- */
.site-footer { background: var(--navy-950); color: var(--gray-400); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green-500);
  flex-shrink: 0;
}
.footer-brand p { color: var(--gray-400); font-size: 0.9rem; margin: 0; }
.footer-brand strong { color: var(--white); }
.site-footer h3 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}
.site-footer a {
  display: block;
  color: var(--gray-400);
  font-size: 0.9rem;
  padding: 5px 0;
  transition: color 0.15s ease;
}
.site-footer a:hover { color: var(--green-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
}
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Accessibility: keyboard visibility, reflow, and user motion preferences. */
[hidden] { display: none !important; }
body { overflow-wrap: anywhere; }
.grid > *, .footer-inner > * { min-width: 0; }
.brand-name { white-space: normal; }
.menu-button { width: 44px; height: 44px; border-color: var(--gray-400); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #0b1220;
}
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--white);
  color: var(--navy-950);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
main a:not(.btn), .site-footer a { text-decoration: underline; text-underline-offset: 0.2em; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.sponsor-logo-slot { color: var(--gray-600); }
.cta-banner p { color: var(--white); }
iframe { max-width: 100%; border: 0; }
caption { padding: 14px 18px; text-align: left; font-weight: 600; }
.person-card h4 { font-size: 1rem; margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .card:hover { transform: none; }
}
