/* Next Olympian Youth Track Program
   Mobile-first styles. Tokens come from CLAUDE.md section 4. */

/* ---------- Fonts ----------
   Barlow and Barlow Condensed (Google Fonts, SIL OFL; license in assets/fonts/OFL.txt).
   Self-hosted, Latin subset, so the big hero headline doesn't reflow on font swap. */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-800.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-800-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/barlow-600.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --navy: #04205E;
  --navy-light: #133172;
  --red: #ED1C24;
  --red-light: #FF7A7E;
  --mist: #F2F4F8;
  --ink-soft: #394560;
  --on-navy: #D4DCED;
  --white: #FFFFFF;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --max-width: 1200px;
  --gutter: 24px;
  --radius-card: 8px;
  --radius-btn: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.0;
  text-transform: uppercase;
  color: var(--navy);
}

h2 { font-size: clamp(44px, 3vw + 26px, 56px); }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.hero :focus-visible,
.page-hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible { outline-color: var(--white); }

.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-btn);
}
.skip-link:focus { top: 8px; outline-color: var(--red); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Eyebrows / labels ---------- */
.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--on-navy { color: var(--red-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--navy); }
.hero .btn--primary:hover { background: var(--navy-light); }
.btn--secondary { background: transparent; border-color: var(--white); color: var(--white); }
.btn--secondary:hover { background: var(--navy-light); }
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--navy-light); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 1. Header ---------- */
.site-header {
  position: relative;
  background: var(--white);
  border-bottom: 4px solid var(--red);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}
.brand__logo { display: block; width: auto; height: 48px; }

.site-header__cta { order: 2; min-height: 44px; padding: 10px 12px; font-size: 16px; }

.nav-toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--navy);
  border-radius: var(--radius-btn);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.15s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Without JS the toggle is hidden and the nav is always shown. */
html:not(.js) .nav-toggle { display: none; }

.site-nav { order: 4; flex-basis: 100%; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

.site-nav__list { padding: 8px 0 4px; }
.site-nav__list li + li { border-top: 1px solid var(--mist); }
.site-nav__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--navy);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}
.site-nav__list a:hover { color: var(--red); }

@media (min-width: 480px) {
  .brand__logo { height: 56px; }
  .site-header__cta { padding: 12px 22px; font-size: 17px; }
}

@media (min-width: 1080px) {
  .site-header__inner { flex-wrap: nowrap; gap: 24px; min-height: 84px; }
  .brand__logo { height: 64px; }
  .brand { margin-right: 0; }
  .nav-toggle { display: none; }
  .site-nav,
  .js .site-nav { display: block; order: 0; flex-basis: auto; margin-left: auto; }
  .site-nav__list { display: flex; gap: 4px; padding: 0; }
  .site-nav__list li + li { border-top: 0; }
  .site-nav__list a { padding: 0 12px; font-size: 16px; }
  .site-header__cta { order: 0; }
}

/* ---------- 2. Hero ---------- */
.hero {
  /* Stadium track photo under a light flat navy tint so text keeps its contrast. */
  --hero-tint: color-mix(in srgb, var(--navy) 45%, transparent);
  background-color: var(--navy);
  background-image:
    linear-gradient(var(--hero-tint), var(--hero-tint)),
    url("../assets/images/hero-bg.jpg");
  background-image:
    linear-gradient(var(--hero-tint), var(--hero-tint)),
    image-set(url("../assets/images/hero-bg.webp") type("image/webp"), url("../assets/images/hero-bg.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
  color: var(--on-navy);
  padding: 56px 0;
}
.hero__copy { text-align: center; }
.hero h1 {
  max-width: 13em;
  margin: 0 auto 24px;
  color: var(--white);
  font-size: clamp(44px, 7.5vw + 12px, 112px);
  font-style: italic;
  line-height: 0.92;
  letter-spacing: -0.01em;
}
.hero__accent { color: var(--red-light); }
.hero__keep { white-space: nowrap; }
@media (min-width: 480px) {
  .hero__accent { white-space: nowrap; }
}
.hero__sub {
  max-width: 36em;
  margin: 0 auto 32px;
  font-size: clamp(17px, 0.5vw + 15px, 20px);
}
.hero .btn-row { justify-content: center; }
@media (min-width: 960px) {
  .hero { padding: 96px 0 88px; }
}

/* ---------- 4. The Why ---------- */
.vision { padding: 72px 0; overflow-x: clip; } /* hides the side-slide reveal before it lands */
.vision__inner { display: grid; gap: 28px; }
.pull-quote {
  margin: 0;
  padding: 4px 0 4px 22px;
  border-left: 5px solid var(--red);
  color: var(--navy);
  font-size: clamp(20px, 0.8vw + 17px, 24px);
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 900px) {
  .vision { padding: 88px 0; }
  .vision__inner { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
}

/* ---------- 4b. Program video ---------- */
.video {
  background: var(--navy);
  padding: 72px 0;
  text-align: center;
}
.video h2 { color: var(--white); margin-bottom: 40px; }
.video__frame {
  display: flex;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--navy-light);
}
.video__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--navy-light);
}
.video__placeholder {
  color: var(--on-navy);
  font-weight: 600;
}

@media (min-width: 900px) {
  .video { padding: 88px 0; }
}

/* ---------- 5. Who We Develop ---------- */
/* White section; the cards stay navy. */
.develop {
  background: var(--white);
  padding: 72px 0;
}
.develop h2 { color: var(--navy); margin-bottom: 16px; }
.develop__intro {
  max-width: 720px;
  margin-bottom: 40px;
  color: var(--ink-soft);
  font-size: 19px;
}

.quality-cards { display: grid; gap: 16px; }
.quality-card {
  padding: 24px;
  background: var(--navy-light);
  border-radius: var(--radius-card);
}
.quality-card__num {
  display: block;
  margin-bottom: 12px;
  color: var(--red-light);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1;
}
.quality-card h3 {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 30px;
}
.quality-card p { color: var(--on-navy); }

@media (min-width: 640px) {
  .quality-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .develop { padding: 88px 0; }
  .quality-cards { grid-template-columns: repeat(5, 1fr); }
  .quality-card { padding: 22px 18px; }
}

/* ---------- 6. Closing CTA (registration panel) ---------- */
.cta {
  background: var(--red);
  color: var(--white);
  padding: 56px 0;
}
.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}
.cta h2 { color: var(--white); margin-bottom: 12px; }
.cta__sub { font-size: 18px; }
.cta__sub a { color: var(--white); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .cta { padding: 72px 0; }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--on-navy);
  padding: 48px 0 32px;
  font-size: 15px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--navy-light);
}
.site-footer__word {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}
.site-footer__tagline { margin-top: 6px; }
.site-footer__links { display: flex; flex-wrap: wrap; column-gap: 20px; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
}
.site-footer__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-weight: 600;
}

/* ---------- Subpages: page header ---------- */
.page-hero {
  background: var(--navy);
  color: var(--on-navy);
  padding: 56px 0;
  text-align: center;
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(44px, 5vw + 24px, 88px);
}
@media (min-width: 960px) {
  .page-hero { padding: 80px 0; }
}
/* Stadium track photo behind the page header, same tint as the homepage hero. */
.page-hero--photo {
  --hero-tint: color-mix(in srgb, var(--navy) 45%, transparent);
  background-image:
    linear-gradient(var(--hero-tint), var(--hero-tint)),
    url("../assets/images/hero-bg.jpg");
  background-image:
    linear-gradient(var(--hero-tint), var(--hero-tint)),
    image-set(url("../assets/images/hero-bg.webp") type("image/webp"), url("../assets/images/hero-bg.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
}

/* Current page in the nav */
.site-nav__list a[aria-current="page"] { color: var(--red); }
.site-footer__links a[aria-current="page"] { text-decoration: underline; }

/* ---------- Mission page ---------- */
.mission { padding: 72px 0; }
.mission__body {
  max-width: 1020px;
  margin: 0 auto;
  padding: 4px 0 4px 24px;
  border-left: 5px solid var(--red);
}
.mission__statement {
  color: var(--navy);
  font-size: clamp(22px, 1.2vw + 17px, 30px);
  font-weight: 500;
  line-height: 1.45;
}
.mission__motto {
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: clamp(24px, 1.6vw + 18px, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy);
}
@media (min-width: 900px) {
  .mission { padding: 88px 0; }
}

/* ---------- Coaches page ----------
   Every coach is listed one after another. */
.coaches { padding: 72px 0; }

.coach { display: grid; gap: 28px; }
.coach + .coach { margin-top: 64px; }

.coach__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: var(--mist);
  color: var(--ink-soft);
  font-weight: 600;
}
.coach__body h2 { margin-bottom: 20px; }
.coach__body p + p { margin-top: 1em; }
.coach__body p:not(.eyebrow) { max-width: 38em; font-size: 18px; }

@media (min-width: 768px) {
  .coach { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 56px; align-items: start; }
}
@media (min-width: 900px) {
  .coaches { padding: 88px 0; }
}

/* ---------- Schedule page ----------
   A sticky bar of jump links (.jump-bar) over a column of open/close sections
   (<details>). main.js marks the section in view and opens a closed
   section when its link is used. */
.jump-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--mist);
}
.jump-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.jump-bar__links {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto; /* phones: the links scroll inside the bar, not the page */
  scrollbar-width: none;
  padding: 8px 3px;
}
.jump-bar__links::-webkit-scrollbar { display: none; }
.jump-bar__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-btn);
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.jump-bar__links a:hover { color: var(--red); }
.jump-bar__links a[aria-current="true"] { background: var(--navy); color: var(--white); }
.jump-bar__cta { display: none; flex-shrink: 0; min-height: 44px; padding: 10px 18px; font-size: 16px; }
@media (min-width: 900px) {
  .jump-bar__cta { display: inline-flex; }
}

.sched { padding: 56px 0 72px; }
.sched__inner { max-width: calc(880px + 2 * var(--gutter)); }
.sched__intro { margin-bottom: 40px; }
.sched__intro h2 { margin-bottom: 20px; font-size: clamp(32px, 2vw + 24px, 44px); }
.sched__intro p { margin-bottom: 1em; font-size: 18px; }
.sched__intro .btn { margin-top: 8px; }

.sched-section {
  border-top: 1px solid var(--mist);
  scroll-margin-top: 80px; /* clears the sticky bar */
}
.sched-section:last-child { border-bottom: 1px solid var(--mist); }
.sched-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
}
.sched-section summary::-webkit-details-marker { display: none; }
.sched-section summary h2 { font-size: clamp(28px, 1.2vw + 22px, 36px); font-weight: 700; }
.sched-section summary:hover h2 { color: var(--red); }
/* Chevron: points down when closed, up when open. */
.sched-section summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-right: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}
.sched-section[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.sched-section__body { padding: 0 0 32px; }
.sched-section__body > p { font-size: 18px; }

.sched-list { padding-left: 1.4em; list-style: decimal; }
.sched-list li { padding-left: 6px; font-size: 18px; }
.sched-list li + li { margin-top: 10px; }
.sched-list li::marker { color: var(--navy); font-weight: 600; }
.sched-list strong { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.sched-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}
.sched-table th,
.sched-table td {
  padding: 12px 16px;
  border: 1px solid var(--mist);
  text-align: left;
  vertical-align: top;
}
.sched-table thead th {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sched-table tbody th { width: 40%; color: var(--navy); font-weight: 600; }
.sched-table tbody tr:nth-child(even) { background: var(--mist); }
.sched-note { margin-top: 12px; font-size: 15px; font-style: italic; }

/* One practice group's timetable (Practice Times section). */
.sched-group { margin-top: 36px; }
.sched-group h3 { margin-bottom: 14px; font-size: clamp(24px, 1vw + 20px, 30px); }
.sched-table--times tbody th { width: auto; white-space: nowrap; }
.sched-section__body > .sched-links + p { margin-top: 12px; }

.sched-links { margin-top: 12px; }
.sched-links a,
.sched-staff a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-weight: 600;
  text-underline-offset: 3px;
}
.sched-links a:hover,
.sched-staff a:hover { color: var(--red); }

.sched-staff { display: grid; gap: 16px; }
.sched-staff li {
  padding: 20px 22px 12px;
  border-top: 5px solid var(--navy);
  border-radius: var(--radius-card);
  background: var(--mist);
}
.sched-staff .eyebrow { margin-bottom: 6px; }
.sched-staff__name {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}
@media (min-width: 640px) {
  .sched-staff { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .sched { padding: 72px 0 88px; }
}

/* ---------- Motion ----------
   Hero rises in on load (CSS only, so it never depends on JS).
   Other blocks marked [data-reveal] fade/slide in on scroll once main.js
   adds .reveal-ready. Both are skipped for prefers-reduced-motion. */
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero h1,
  .hero__sub,
  .hero .btn-row,
  .page-hero .eyebrow,
  .page-hero h1 { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 { animation-delay: 0.08s; }
  .hero__sub { animation-delay: 0.18s; }
  .hero .btn-row { animation-delay: 0.26s; }
  .page-hero h1 { animation-delay: 0.08s; }

  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal-ready [data-reveal="side"] { transform: translateX(32px); }
  .reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
}

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