/*
 Theme Name:   Aegis Cycling
 Theme URI:    https://nextstepracingtx.com/
 Description:  Official theme for Aegis Cycling Team — standalone, no parent required
 Author:       Aegis Cycling
 Version:      2.0.0
 Text Domain:  aegis-cycling
*/

/* =========================================
   DESIGN TOKENS
   ========================================= */
:root {
  --pink:       #FF2D8A;
  --turquoise:  #00D4CC;
  --yellow:     #FFE000;
  --dark:       #0A0A0F;
  --dark-mid:   #0F0F1A;
  --dark-card:  #13131F;
  --white:      #FFFFFF;
  --grey:       #6B7280;
  --grey-light: #9CA3AF;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius:     4px;
  --transition: 0.25s ease;
  --container:  1200px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--dark);
  color: var(--grey-light);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* =========================================
   UTILITIES
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section-pad { padding: 96px 0; }

.label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 16px;
}

.text-pink     { color: var(--pink); }
.text-turquoise{ color: var(--turquoise); }
.text-yellow   { color: var(--yellow); }
.text-white    { color: var(--white); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.05;
}

h1 { font-size: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

p { color: var(--grey-light); line-height: 1.7; }

/* Fade-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary  { background: var(--pink);     color: var(--white); }
.btn-primary:hover { background: var(--white); color: var(--dark); }
.btn-outline  { background: transparent; color: var(--white); border: 2px solid var(--turquoise); }
.btn-outline:hover { background: var(--turquoise); color: var(--dark); }
.btn-yellow   { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: var(--white); color: var(--dark); }

/* =========================================
   NAVIGATION
   ========================================= */
.aegis-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 20px 32px;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.aegis-header.scrolled {
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 32px;
  border-bottom-color: rgba(0,212,204,0.2);
}
.aegis-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.aegis-logo { text-decoration: none; flex-shrink: 0; }
.aegis-logo img { height: 44px; width: auto; }
/* Stacked logo */
.aegis-logo-stack {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}
.aegis-logo-main {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
.aegis-logo-sub {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.aegis-logo-sub em {
  font-style: normal;
  color: var(--pink);
}
.aegis-drawer-logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.aegis-drawer-logo .aegis-logo-main { font-size: 1.1rem; }
.aegis-drawer-logo .aegis-logo-sub  { font-size: 0.65rem; }

.aegis-logo-text {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
}
.aegis-logo-text em { color: var(--pink); font-style: normal; }

/* Desktop nav */
.aegis-nav-desktop {
  display: flex;
  align-items: center;
  gap: 40px;
}
.aegis-nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.aegis-nav-desktop ul li a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s;
}
.aegis-nav-desktop ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--pink);
  transition: width 0.25s ease;
}
.aegis-nav-desktop ul li a:hover,
.aegis-nav-desktop ul li.current a { color: var(--white); }
.aegis-nav-desktop ul li a:hover::after,
.aegis-nav-desktop ul li.current a::after { width: 100%; }

/* Hamburger */
.aegis-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 10001;
  flex-shrink: 0;
}
.aegis-nav-toggle .bar {
  display: block;
  width: 28px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.aegis-nav-toggle.open .bar-1 { transform: translateY(8px) rotate(45deg); }
.aegis-nav-toggle.open .bar-2 { opacity: 0; width: 0; }
.aegis-nav-toggle.open .bar-3 { transform: translateY(-8px) rotate(-45deg); }

/* Overlay */
.aegis-nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.aegis-nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Drawer */
.aegis-nav-drawer {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; height: 100vh;
  background: var(--dark-card);
  border-left: 1px solid rgba(0,212,204,0.2);
  z-index: 10000;
  padding: 100px 32px 48px;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.aegis-nav-drawer.open { right: 0; }
.aegis-nav-drawer ul {
  list-style: none;
  margin: 0 0 32px; padding: 0;
  display: flex; flex-direction: column; gap: 0;
}
.aegis-nav-drawer ul li a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.aegis-nav-drawer ul li a:hover { color: var(--pink); padding-left: 8px; }

@media (max-width: 900px) {
  .aegis-nav-desktop { display: none; }
  .aegis-nav-toggle  { display: flex; }
  .aegis-nav-overlay { display: block; }
}
@media (max-width: 480px) {
  .aegis-header,
  .aegis-header.scrolled { padding-left: 20px; padding-right: 20px; }
}
body.admin-bar .aegis-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .aegis-header { top: 46px; }
}

/* =========================================
   PAGE HERO (interior pages)
   ========================================= */
.page-hero {
  padding: 160px 0 80px;
  background: var(--dark-mid);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255,45,138,0.07) 0%, transparent 70%);
}
.page-hero-inner { position: relative; }
.page-hero-line {
  width: 48px; height: 3px;
  background: var(--pink);
  margin-bottom: 20px;
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p  { font-size: 1.1rem; max-width: 560px; }

/* =========================================
   HERO — HOME
   ========================================= */
.hero-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-bg {
  position: absolute; inset: 0;
  background: #0A0A0F;
}
/* Hero slideshow slides */
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #0A0A0F;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  /* Overlay so text stays readable */
}
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,10,15,0.78) 0%,
    rgba(10,10,15,0.55) 50%,
    rgba(10,10,15,0.72) 100%
  );
}
.hero-slide.active {
  opacity: 1;
}
/* Keep gradient accents on top of slides */
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(0,212,204,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,45,138,0.06) 0%, transparent 60%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 55%;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, transparent, var(--turquoise) 30%, var(--pink) 70%, transparent);
  opacity: 0.3;
  transform: skewX(-8deg);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.hero-eyebrow-line {
  width: 40px; height: 2px; background: var(--pink);
}
.hero-title {
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.9;
  margin-bottom: 32px;
}
.hero-title .line-2 { color: var(--turquoise); }
.hero-subtitle {
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 40px;
  color: var(--grey-light);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 900;
  color: var(--white); line-height: 1;
}
.hero-stat-num span { color: var(--pink); }
.hero-stat-label {
  font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--grey);
  margin-top: 4px;
}

/* =========================================
   RACE TICKER
   ========================================= */
.ticker-wrap {
  background: var(--pink);
  overflow: hidden;
  padding: 12px 0;
}
.ticker-track {
  display: flex;
  gap: 64px;
  animation: ticker-scroll 155s linear infinite;
  width: max-content;
}
.ticker-item {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  display: flex; align-items: center; gap: 20px;
}
.ticker-item::after { content: '◆'; color: rgba(255,255,255,0.5); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================
   SECTION HEADER
   ========================================= */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-header h2 { margin-bottom: 0; }

/* =========================================
   ABOUT PREVIEW
   ========================================= */
.about-preview {
  background: var(--dark-mid);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-image-wrap {
  position: relative;
}
.about-image-placeholder {
  aspect-ratio: 3/4;
  background: var(--dark-card);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}
.about-image-placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--turquoise));
}
.about-accent {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 120px; height: 120px;
  background: var(--pink);
  opacity: 0.15;
  border-radius: 50%;
}
.about-text { display: flex; flex-direction: column; gap: 24px; }
.about-text h2 { margin-bottom: 8px; }
.values-list { display: flex; flex-direction: column; gap: 16px; margin: 8px 0; }
.value-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--dark-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--turquoise);
}
.value-icon { font-size: 1.2rem; flex-shrink: 0; }
.value-row h4 {
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--white);
}

/* =========================================
   RIDERS GRID
   ========================================= */
.riders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.rider-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.rider-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,204,0.3);
}
.rider-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--dark-mid);
}
.rider-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.rider-number {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--white);
  background: var(--pink);
  padding: 4px 8px;
  border-radius: 2px;
}
.rider-body { padding: 20px; }
.rider-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--white); margin-bottom: 4px;
}
.rider-role {
  font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}

/* =========================================
   UPCOMING RACES
   ========================================= */
.races-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.race-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.race-card:hover {
  border-color: rgba(255,45,138,0.3);
  transform: translateY(-4px);
}
.race-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--turquoise));
}
.race-date-badge {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--turquoise); margin-bottom: 12px;
}
.race-name {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--white); margin-bottom: 8px;
}
.race-location { font-size: 0.85rem; color: var(--grey); }
.race-status {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
  margin-top: 16px;
}
.status-upcoming  { background: rgba(255,224,0,0.15);  color: var(--yellow); }
.status-confirmed { background: rgba(0,212,204,0.15);  color: var(--turquoise); }
.status-completed { background: rgba(255,45,138,0.15); color: var(--pink); }

/* =========================================
   SCHEDULE TABLE
   ========================================= */
.schedule-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-btn {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: var(--grey-light);
  transition: all 0.2s ease;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
}
.schedule-table th {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--grey);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.schedule-table td {
  padding: 14px 16px;
  font-size: 0.9rem; color: var(--grey-light);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.schedule-table tr:hover td { background: rgba(255,255,255,0.02); }

/* =========================================
   TEAM / ABOUT PAGE
   ========================================= */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.story-text { display: flex; flex-direction: column; gap: 20px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.value-item {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid rgba(255,255,255,0.06);
}
.value-item .value-icon { font-size: 2rem; margin-bottom: 16px; }
.value-item h3 { font-size: 1.1rem; margin-bottom: 12px; }
.value-item p  { font-size: 0.9rem; }

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-info-item h4 {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--turquoise); margin-bottom: 8px;
}
.contact-info-item p,
.contact-info-item a { font-size: 1rem; color: var(--grey-light); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey);
}
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--turquoise);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-msg { padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; margin-top: 8px; }
.form-msg.success { background: rgba(0,212,204,0.1); color: var(--turquoise); border: 1px solid rgba(0,212,204,0.3); }
.form-msg.error   { background: rgba(255,45,138,0.1); color: var(--pink);     border: 1px solid rgba(255,45,138,0.3); }

/* =========================================
   CTA BAND
   ========================================= */
.cta-band {
  background: var(--pink);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 16px; }
.cta-band p  { color: rgba(255,255,255,0.85); max-width: 480px; margin: 0 auto 32px; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--dark-mid);
  padding: 80px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand p {
  font-size: 0.9rem;
  margin: 16px 0 24px;
  max-width: 280px;
}
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  background: var(--dark-card);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--grey-light);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s ease;
}
.social-link:hover { background: var(--pink); color: var(--white); border-color: var(--pink); }
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white); margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.88rem; color: var(--grey);
  transition: color 0.2s ease;
}
.footer-col ul li a:hover { color: var(--turquoise); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--grey); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .about-grid,
  .story-grid  { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid{ grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
  .section-pad { padding: 64px 0; }
  .container   { padding: 0 20px; }
  .hero-stats  { gap: 28px; flex-wrap: wrap; }
  .form-row    { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .schedule-table { font-size: 0.82rem; }
  .schedule-table th,
  .schedule-table td { padding: 10px 10px; }
}
@media (max-width: 480px) {
  h1 { font-size: 2.8rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
}

/* =========================================
   MAIN CONTENT WRAPPER
   ========================================= */
.aegis-main {
  padding-top: 80px; /* clears fixed nav */
  min-height: 60vh;
}

/* =========================================
   GUTENBERG BLOCK EDITOR SUPPORT
   ========================================= */

/* Make the editor background match the site */
.editor-styles-wrapper {
  background: var(--dark) !important;
  color: var(--grey-light) !important;
  font-family: var(--font-body) !important;
}
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: var(--font-display) !important;
  color: var(--white) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.editor-styles-wrapper p {
  color: var(--grey-light) !important;
}
.editor-styles-wrapper a {
  color: var(--turquoise) !important;
}

/* Custom block alignments */
.wp-block-group.hero-band {
  padding: 80px 32px;
  background: var(--dark-mid);
}
.wp-block-group.section-dark {
  padding: 80px 32px;
  background: var(--dark);
}
.wp-block-group.section-mid {
  padding: 80px 32px;
  background: var(--dark-mid);
}
.wp-block-group.cta-band {
  padding: 80px 32px;
  background: var(--pink);
  text-align: center;
}
.wp-block-group.foundation-band {
  padding: 80px 32px;
  background: var(--dark-mid);
  border-top: 1px solid rgba(0,212,204,0.2);
}

/* =========================================
   BLOCK EDITOR BODY PADDING FIX
   ========================================= */
#main-content { padding-top: 80px; }

/* =========================================
   GUTENBERG BLOCK STYLES
   ========================================= */

/* Make full-width blocks truly full width */
.wp-block-group.alignfull,
.wp-block-cover.alignfull { width: 100%; max-width: 100%; }

/* Custom HTML block wrapper resets */
.wp-block-html { margin: 0; }

/* Buttons inside block editor */
.wp-block-buttons .wp-block-button__link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

/* =========================================
   FOUNDATION BAND GRIDS (class-based)
   ========================================= */
.foundation-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.foundation-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */

/* Tablet */
@media (max-width: 1024px) {
  .about-grid,
  .story-grid      { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .contact-grid    { grid-template-columns: 1fr; gap: 48px; }
  .foundation-two-col { grid-template-columns: 1fr; gap: 40px; }
}

/* Mobile */
@media (max-width: 768px) {
  .section-pad     { padding: 64px 0; }
  .container       { padding: 0 20px; }
  .hero-stats      { gap: 28px; flex-wrap: wrap; }
  .form-row        { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .schedule-table  { font-size: 0.82rem; }
  .schedule-table th,
  .schedule-table td { padding: 10px 10px; }

  /* Foundation band */
  .foundation-two-col  { grid-template-columns: 1fr !important; gap: 40px !important; }
  .foundation-stats-grid { grid-template-columns: 1fr 1fr; }

  /* Foundation page contact card */
  div[style*="gap:48px"][style*="padding:56px"] {
    grid-template-columns: 1fr !important;
    padding: 40px 24px !important;
  }

  /* Story grid */
  .story-grid { grid-template-columns: 1fr !important; }
  .story-grid .about-image-wrap { display: none; }

  /* Rider grid — 2 cols on mobile */
  .riders-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section header */
  .section-header { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }

  /* Page hero */
  .page-hero-inner { padding: 48px 0 40px; }

  /* Ticker */
  .ticker-item { font-size: 0.72rem !important; }

  /* Hero stat numbers */
  .hero-stat-num { font-size: 2rem !important; }

  /* Sponsor grids */
  #sponsors .container > div > div[style*="grid-template-columns"] { gap: 10px !important; }
}

/* Small mobile */
@media (max-width: 480px) {
  h1 { font-size: 2.8rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }

  /* Single column riders */
  .riders-grid { grid-template-columns: 1fr !important; }

  /* Foundation stats — stack */
  .foundation-stats-grid { grid-template-columns: 1fr !important; }

  /* Foundation page stats */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(220px"] {
    grid-template-columns: 1fr !important;
  }

  /* Sponsor grids — 2 col */
  #sponsors div[style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero title */
  .hero-title .line-1,
  .hero-title .line-2 { font-size: 4.5rem !important; }

  /* CTA band */
  .cta-band { padding: 64px 20px !important; }

  /* Foundation page — program cards stack */
  div[style*="flex-direction:column"][style*="gap:24px"] { gap: 16px !important; }
}

/* =========================================
   MAIN CONTENT WRAPPER
   ========================================= */
.aegis-main {
  padding-top: 80px; /* clears fixed nav */
  min-height: 60vh;
}

/* =========================================
   GUTENBERG BLOCK EDITOR SUPPORT
   ========================================= */

/* Make the editor background match the site */
.editor-styles-wrapper {
  background: var(--dark) !important;
  color: var(--grey-light) !important;
  font-family: var(--font-body) !important;
}
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: var(--font-display) !important;
  color: var(--white) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.editor-styles-wrapper p {
  color: var(--grey-light) !important;
}
.editor-styles-wrapper a {
  color: var(--turquoise) !important;
}

/* Custom block alignments */
.wp-block-group.hero-band {
  padding: 80px 32px;
  background: var(--dark-mid);
}
.wp-block-group.section-dark {
  padding: 80px 32px;
  background: var(--dark);
}
.wp-block-group.section-mid {
  padding: 80px 32px;
  background: var(--dark-mid);
}
.wp-block-group.cta-band {
  padding: 80px 32px;
  background: var(--pink);
  text-align: center;
}
.wp-block-group.foundation-band {
  padding: 80px 32px;
  background: var(--dark-mid);
  border-top: 1px solid rgba(0,212,204,0.2);
}

/* =========================================
   BLOCK EDITOR BODY PADDING FIX
   ========================================= */
#main-content { padding-top: 80px; }

/* =========================================
   GUTENBERG BLOCK STYLES
   ========================================= */

/* Make full-width blocks truly full width */
.wp-block-group.alignfull,
.wp-block-cover.alignfull { width: 100%; max-width: 100%; }

/* Custom HTML block wrapper resets */
.wp-block-html { margin: 0; }

/* Buttons inside block editor */
.wp-block-buttons .wp-block-button__link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

/* =========================================
   MOBILE RESPONSIVE — INLINE GRID FIXES
   Targets inline style grids used in PHP templates
   ========================================= */

/* Foundation band 2-col grid → stack on mobile */
@media (max-width: 768px) {

  /* Foundation section on homepage */
  .foundation-band .container > div[style*="grid-template-columns:1fr 1fr"],
  .foundation-band .container > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* Foundation stats 2-col inner grid → stack */
  .foundation-band div[style*="grid-template-columns:1fr 1fr"],
  .foundation-band div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Foundation contact card 2-col */
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:48px"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 48px"] {
    grid-template-columns: 1fr !important;
    padding: 40px 24px !important;
  }

  /* Sponsor grids — already use auto-fit so fine, just ensure padding */
  #sponsors .container > div > div[style*="grid-template-columns"] {
    gap: 10px !important;
  }

  /* Hero stat numbers smaller on mobile */
  .hero-stat-num { font-size: 2rem !important; }

  /* Story grid image placeholder — hide on mobile */
  .story-grid .about-image-wrap { display: none; }

  /* Foundation page — story grid columns */
  .story-grid {
    grid-template-columns: 1fr !important;
  }

  /* Any inline 2-col grid with gap:64px (foundation homepage band) */
  div[style*="gap:64px"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* Rider grid — 2 cols on mobile instead of 3+ */
  .riders-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Section header — stack on mobile */
  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  /* Foundation contact card buttons stack */
  div[style*="flex-direction:column"][style*="gap:16px"] .btn {
    width: 100%;
    text-align: center;
  }

  /* Page hero padding */
  .page-hero-inner { padding: 48px 0 40px; }

  /* Ticker font size */
  .ticker-item { font-size: 0.72rem !important; }
}

@media (max-width: 480px) {

  /* Single column riders on very small screens */
  .riders-grid {
    grid-template-columns: 1fr !important;
  }

  /* Stats grid on foundation page */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(220px"] {
    grid-template-columns: 1fr !important;
  }

  /* Foundation homepage stats mini grid */
  .foundation-band div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Sponsor tier grids */
  #sponsors div[style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero title */
  .hero-title .line-1,
  .hero-title .line-2 { font-size: 4.5rem !important; }

  /* CTA band padding */
  .cta-band { padding: 64px 20px !important; }
}
