/* =========================================================
   Barba Baseball Development — site styles
   Brand tokens live in :root. Change colors/type here, not inline.
   ========================================================= */

:root {
  /* Brand colors: black, baby blue and red */
  --black: #0E1013;       /* primary dark — header, cover, footer, dark sections */
  --black-2: #1C2027;     /* hover on dark buttons, raised dark surfaces */
  --dark-line: #2A3039;   /* dividers on black */
  --baby-blue: #8ECAF0;   /* highlights on black only (too light for text on white) */
  --blue: #1C6EA4;        /* accents, eyebrows and links on light backgrounds */
  --blue-tint: #EAF4FB;   /* light blue fills (tags, packs strip, selected choices) */
  --red: #C8102E;         /* call-to-action buttons */
  --red-hover: #A30D25;
  --ink: #111418;         /* body text */
  --ink-2: #2B3038;       /* long-form body text */
  --muted: #4B525B;       /* secondary text on light */
  --muted-light: #B8C1CB; /* secondary text on dark */
  --paper: #F6F7F9;       /* page background */
  --white: #FFFFFF;
  --line: #E2E5EA;        /* borders on light */
  --field-line: #D3D8DF;

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --max: 1240px;
  --gutter: 24px;
  --section-y: 104px;
  --radius: 4px;        /* one small radius everywhere: nearly square, like the diamond */

  /* Theme for the scroll engine (css/scrollcraft.css, index page only). */
  --sc-canvas: var(--black);
  --sc-surface: var(--black-2);
  --sc-ink: var(--white);
  --sc-ink-soft: var(--muted-light);
  --sc-accent: var(--baby-blue);
  --sc-accent-ink: var(--black);
  --sc-font-display: var(--font-display);
  --sc-font-text: var(--font-body);
  --sc-r-sm: var(--radius); --sc-r-md: var(--radius); --sc-r-lg: var(--radius); --sc-r-pill: var(--radius);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--black); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* On black, the lighter blue shows better */
.site-header :focus-visible, .cover :focus-visible, .cage :focus-visible, .book-intro :focus-visible,
.program :focus-visible, .site-footer :focus-visible { outline-color: var(--baby-blue); }
[id] { scroll-margin-top: 84px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--baby-blue); color: var(--black);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-tight-top { padding-top: 24px; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1;
}
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 40px; }

.eyebrow {
  margin-bottom: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow-light { color: var(--baby-blue); }
.text-blue { color: var(--baby-blue); }
.muted-light { color: var(--muted-light); font-size: 17px; line-height: 1.65; }
.section-intro { font-size: 17px; line-height: 1.65; color: var(--muted); }
.body-lg { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin-bottom: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border-radius: var(--radius); border: 0;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { min-height: 44px; padding: 0 22px; font-size: 15px; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-hover); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--black-2); color: var(--white); }
.btn-outline-light { background: transparent; border: 1.5px solid #4A5260; color: var(--white); font-weight: 600; }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top); /* under the status bar when opened from the home screen */
  background: var(--black); color: var(--white);
  border-bottom: 1px solid var(--dark-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--baby-blue); text-decoration: none; }
.brand:hover { color: var(--baby-blue); }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 28px;
  letter-spacing: .14em; line-height: 1; color: var(--white);
}
.brand-name-lg { font-size: 34px; }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: .28em; line-height: 1; color: var(--baby-blue); }

.site-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn) { color: #E6EAEE; text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--baby-blue); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: var(--radius);
  background: transparent; border: 1.5px solid #3A414C; color: var(--white);
  align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- Cover (index hero) ----------
   Four planes: field plate, BARBA wordmark, the coach cut out in front of it,
   then the copy. js/scrollcraft.js moves the planes at different rates
   (data-sc-parallax); .cover-lean takes the pointer lean so the two transforms
   never fight over one element. */
.cover {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - 73px); max-height: 980px;
  display: flex; align-items: flex-end;
  background: var(--black); color: var(--white);
}
.cover-plane { position: absolute; inset: 0; pointer-events: none; }
.cover-lean { width: 100%; height: 100%; translate: calc(var(--lean-x, 0) * var(--depth, 0) * 1px) calc(var(--lean-y, 0) * var(--depth, 0) * 1px); transition: translate .5s var(--sc-ease-out); }
.cover-plate { inset: -200px 0 -140px; --depth: -18; }
.cover-plate img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 62%; }
.cover-word {
  --depth: -10;
  display: flex; justify-content: center;
  font-family: var(--font-display); font-weight: 700; line-height: .8;
  font-size: clamp(120px, 27vw, 420px); letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 2px var(--baby-blue);
  top: clamp(24px, 6vh, 72px);
}
.cover-word .cover-lean { height: auto; text-align: center; }
.cover-coach { --depth: 14; }
.cover-coach .cover-lean { position: absolute; right: max(3vw, calc(50% - 600px)); bottom: -14%; width: auto; height: 104%; }
.cover-coach img { height: 100%; width: auto; max-width: none; }
/* Density only where the copy sits, plus a floor that hands off to the next section. */
.cover-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(14,16,19,.92) 0%, rgba(14,16,19,.5) 22%, rgba(14,16,19,0) 46%),
    linear-gradient(to right, rgba(14,16,19,.88) 0%, rgba(14,16,19,.55) 34%, rgba(14,16,19,0) 58%);
}
.cover-copy { position: relative; z-index: 2; width: 100%; padding-top: 120px; padding-bottom: clamp(48px, 9vh, 96px); }
.cover-copy .eyebrow { margin-bottom: 18px; }
/* Motion you can actually see.
   --cp runs 0 at page load to 1 as the cover leaves (the engine's --sc-p for this
   flow act starts near .48 with the cover filling the screen). */
.cover { --cp: clamp(0, (var(--sc-p, .48) - .48) / .52, 1); }
.cover-word .cover-lean { transform: translateX(calc(var(--cp) * -16vw)); }
.cover-coach img { transform: scale(calc(1 + var(--cp) * .16)); transform-origin: 60% 100%; }
/* On load: the field settles from a push-in, BARBA rises, then the coach, then the copy. */
@keyframes cover-settle { from { transform: scale(1.16); } }
@keyframes cover-rise { from { opacity: 0; transform: translateY(var(--rise, 28px)); } }
.cover-plate img { animation: cover-settle 2.4s var(--sc-ease-out) both; }
.cover-word .cover-lean { --rise: 45%; animation: cover-rise 1.5s var(--sc-ease-out) .15s backwards; }
.cover-coach .cover-lean { --rise: 90px; animation: cover-rise 1.3s var(--sc-ease-out) .45s backwards; }
.cover-copy > * { animation: cover-rise .9s var(--sc-ease-out) backwards; }
.cover-copy > :nth-child(1) { animation-delay: .8s; }
.cover-copy > :nth-child(2) { animation-delay: .92s; }
.cover-copy > :nth-child(3) { animation-delay: 1.08s; }
.cover-copy > :nth-child(4) { animation-delay: 1.22s; }
.cover h1 {
  max-width: 11.5em;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(46px, 6.6vw, 96px); line-height: .96; letter-spacing: -.01em;
  text-wrap: balance;
}
.lede { margin-top: 24px; max-width: 30em; text-wrap: pretty; font-size: 19px; line-height: 1.6; color: #D3DAE1; }
.cover .btn-row { margin-top: 32px; }

/* ---------- Practice (team clip) ----------
   Two halves with no dead space: the copy column, and the clip filling the
   other half edge to edge, full height. */
.practice {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(86svh, 800px); background: var(--paper);
}
.practice-copy {
  align-self: center;
  padding: 72px clamp(32px, 5vw, 80px) 72px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.practice-copy h2 { margin-bottom: 20px; }
.practice-copy .section-intro { max-width: 28em; }
.practice-facts {
  list-style: none; margin: 36px 0 0; padding: 20px 0 0; border-top: 2px solid var(--black);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.practice-facts li { display: flex; flex-direction: column; gap: 4px; }
.practice-facts strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.6vw, 36px); line-height: 1; color: var(--black); }
.practice-facts span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.practice-clip { position: relative; margin: 0; min-height: 420px; background: #05070A; }
.practice-clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cage (pinned looping clip + scorebook diamond) ----------
   The engine publishes the act's scroll progress as --sc-p. --t maps it to how
   far round the bases the runner is; each base lights when --t passes its --at. */
.cage { background: var(--black); color: var(--white); --t: clamp(0, (var(--sc-p, 0) - .05) / .7, 1); }
.cage-stage { display: flex; align-items: center; }
.cage-clip {
  position: absolute; z-index: 0; margin: 0;
  top: calc(73px + 4svh); bottom: 5svh; right: max(var(--gutter), calc(50% - 600px));
  aspect-ratio: 720 / 1018; border-radius: var(--radius); overflow: hidden; background: #05070A;
}
.cage-clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cage-clip figcaption, .practice-clip figcaption {
  font-size: 14px;
  position: absolute; z-index: 2; left: 16px; bottom: 14px;
  padding: 4px 10px; border-radius: var(--radius); background: rgba(14,16,19,.7); color: #D3DAE1;
}
.cage-scrim { display: none; }
.cage-copy { position: relative; z-index: 3; width: 100%; }
.cage-copy h2 { max-width: 8.5em; }
.scorebook { display: flex; align-items: flex-start; gap: 32px; margin-top: 40px; max-width: 560px; }
.diamond { flex: 0 0 150px; width: 150px; height: 150px; overflow: visible; }
.diamond-line { fill: none; stroke: var(--dark-line); stroke-width: 3; }
.diamond-run {
  fill: none; stroke: var(--baby-blue); stroke-width: 5; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--t) * 100);
}
.base {
  --on: clamp(0, (var(--t) - var(--at)) * 16 + 1, 1);
  fill: color-mix(in srgb, var(--baby-blue) calc(var(--on) * 100%), var(--black-2));
  stroke: var(--baby-blue); stroke-width: 2;
}
.bases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bases li {
  --on: clamp(0, (var(--t) - var(--at)) * 16 + 1, 1);
  display: flex; flex-direction: column; gap: 2px;
  font-size: 16px; line-height: 1.5; color: #D3DAE1;
  opacity: calc(.38 + var(--on) * .62);
}
.base-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .02em; color: var(--white); }

/* ---------- Training ---------- *//* ---------- Training ---------- */
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 16px 40px; margin-bottom: 44px;
}
.section-head h2 { flex: 1 1 520px; min-width: 0; }
.section-head .section-intro { flex: 1 1 360px; max-width: 440px; }

/* A ruled price list, like the back page of a program. */
.rates { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--black); }
.rate {
  /* Fixed last column so every row's button lines up, same width, same right edge. */
  display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(0, 1.6fr) minmax(150px, .8fr) 216px;
  gap: 12px 40px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--field-line);
}
.rate-name { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.rate h3 { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1; }
.rate-desc { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 34em; }
.rate-meta { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--muted); }
.rate-meta strong { font-size: 17px; color: var(--black); }
.rate .btn { width: 100%; }
/* The tint bleeds past the row instead of padding it, so its button stays in line. */
.rate-packs { position: relative; isolation: isolate; border-bottom: 0; }
.rate-packs::before { content: ""; position: absolute; z-index: -1; inset: 0 -24px; background: var(--blue-tint); }
.rate-packs h3 { font-size: 28px; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-tint); padding: 6px 10px; border-radius: var(--radius);
}

/* ---------- Programs ---------- */
/* Square cards: each row is at least as tall as a column is wide (cqw = the
   section's width), and cards stretch to their row, so every card in a row is
   the same height and grows together if one needs more room. */
#programs { container-type: inline-size; }
.program-grid {
  --cols: 4;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 20px;
  grid-auto-rows: minmax(calc((100cqw - (var(--cols) - 1) * 20px) / var(--cols)), auto);
}
.program {
  background: var(--black); color: var(--white); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.program > * { flex-shrink: 0; }
.program-foot .btn { width: auto; } /* sized to its label, not the card */
.program-meta { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--baby-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.program h3 { font-family: var(--font-display); font-size: 27px; font-weight: 600; line-height: 1.05; }
.program p { font-size: 15px; line-height: 1.45; color: var(--muted-light); }
.program p:not(.program-when) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.program .program-when { font-size: 14px; font-weight: 600; color: var(--white); }
.program.is-loading { background: #E4E8EC; animation: none; }
.program-empty {
  grid-column: 1 / -1; padding: 28px 30px; border-radius: var(--radius);
  background: var(--blue-tint); font-size: 16px; line-height: 1.6; color: var(--black);
}
.program-foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--dark-line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px; /* room between price and button */
  font-size: 15px; color: var(--muted-light);
}

@media (max-width: 1100px) { .program-grid { --cols: 2; } }
@media (max-width: 560px) { .program-grid { --cols: 1; } }

/* ---------- About ---------- */
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  column-gap: 72px; align-items: start;
}
/* The name is the headline: poster scale, ERIC solid, BARBA outlined like the cover's
   wordmark. The photo, on the right, rises behind BARBA, so the outlined letters
   overlay it; the copy sits under ERIC, which stays whole. */
.about-name {
  grid-column: 1 / -1; position: relative; z-index: 2; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(84px, 16vw, 236px); line-height: .8; letter-spacing: -.005em;
  color: var(--black); white-space: nowrap;
}
/* Same baby-blue outline as the cover's wordmark (a deliberate exception to
   baby blue on light grounds: display scale, a touch heavier stroke). */
.about-name-out { color: transparent; -webkit-text-stroke: 3px var(--baby-blue); }
.about-media { grid-column: 2; grid-row: 2; position: relative; z-index: 1; margin: -0.36em 0 0; font-size: clamp(84px, 16vw, 236px); }
.about-media img { width: 100%; height: 600px; object-fit: cover; object-position: center 20%; border-radius: var(--radius); box-shadow: var(--sc-e3); }
.about-copy { grid-column: 1; grid-row: 2; max-width: 34em; padding-top: 56px; }
.about-lead {
  margin-bottom: 24px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3vw, 42px); line-height: 1.05;
  color: var(--black); text-wrap: balance;
}
.about-lead em { font-style: normal; color: var(--blue); }
/* Motion, matching the cover. --ap is 0 when the section fills the screen
   (the act's --sc-p is about .48 there): BARBA drifts across, the photo grows. */
.about { --ap: calc(var(--sc-p, .48) - .48); overflow-x: clip; }
.about-name > span { display: inline-block; }
.about-name-out { translate: calc(var(--ap) * -22vw) 0; }
.about-media img { transform: scale(calc(1 + clamp(-.04, var(--ap), .5) * .25)); transform-origin: 50% 100%; }
/* Entrance, once, when it scrolls into view (main.js adds .enter-ready, then .is-in). */
.enter-ready:not(.is-in) :is(.about-name > span, .about-media, .about-copy > *) { opacity: 0; }
.is-in .about-name > span { --rise: 45%; animation: cover-rise 1.5s var(--sc-ease-out) backwards; }
.is-in .about-name-out { animation-delay: .15s; }
.is-in .about-media { --rise: 90px; animation: cover-rise 1.3s var(--sc-ease-out) .4s backwards; }
.is-in .about-copy > * { animation: cover-rise .9s var(--sc-ease-out) backwards; }
.is-in .about-copy > :nth-child(1) { animation-delay: .7s; }
.is-in .about-copy > :nth-child(2) { animation-delay: .82s; }
.is-in .about-copy > :nth-child(3) { animation-delay: .96s; }
.is-in .about-copy > :nth-child(4) { animation-delay: 1.1s; }
.about-facts {
  margin: 32px 0 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--black);
}
.about-facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.about-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.about-facts dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; color: var(--black); }

/* ---------- Booking ---------- */
.book { background: var(--black); color: var(--white); }
.book-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.book-intro { flex: 1 1 300px; max-width: 360px; }
.book .section-intro { margin-bottom: 22px; color: var(--muted-light); }
.book-points { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.book-points li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.5; color: #D3DAE1; }
.book-points li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--baby-blue); border-bottom: 2.5px solid var(--baby-blue); transform: rotate(-45deg);
}
.coach-chip {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--black-2); border: 1px solid var(--dark-line); border-radius: var(--radius);
}
.coach-chip img { width: 64px; height: 64px; border-radius: var(--radius); object-fit: cover; }
.coach-chip strong { display: block; font-size: 16px; }
.coach-chip span { font-size: 14px; color: var(--muted-light); }

.book-card {
  flex: 999 1 560px; min-width: 0; color: var(--ink); /* the section around it is white-on-black */
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px;
}
#booking-form { display: flex; flex-direction: column; gap: 28px; counter-reset: step; }
#booking-form[hidden] { display: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend {
  padding: 0; margin-bottom: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--black);
}
/* Steps number themselves in a small badge, skipping hidden ones (programs have
   no day/time step). A finished step's badge turns into a blue check. */
#booking-form legend { display: flex; align-items: center; flex-wrap: wrap; }
#booking-form legend::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px;
  border-radius: var(--radius); background: var(--black); color: var(--white);
  font-size: 12px; letter-spacing: 0;
  transition: background-color .2s var(--sc-ease-out);
}
#booking-form .step.is-done legend::before { content: "✓"; background: var(--blue); font-size: 13px; }
.legend-note { margin-left: 8px; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 8px 6px; border-radius: var(--radius);
  border: 1.5px solid var(--field-line); background: var(--white); color: var(--black);
  font-family: var(--font-body); cursor: pointer;
}
.day small { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.day strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.day:hover { border-color: var(--black); }
.day[aria-checked="true"] { background: var(--black); border-color: var(--black); color: var(--white); }
.day[aria-checked="true"] small { color: var(--muted-light); }
.day-count { margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.day[aria-checked="true"] .day-count { color: var(--baby-blue); }

/* Times split into Morning / Afternoon / Evening when a day spans more than one. */
.time-groups { display: flex; flex-direction: column; gap: 14px; }
.slot-group { display: flex; flex-direction: column; gap: 8px; }
.slot-group-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 44px; padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--field-line); background: var(--white); color: var(--black);
  font-family: var(--font-body); font-size: 15px; text-align: left; cursor: pointer;
}
.choice strong { font-weight: 700; }
.choice small { font-size: 13px; color: var(--muted); }
.choice .choice-note { margin-top: 2px; font-weight: 600; color: var(--blue); }
.offering-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choice:hover { border-color: var(--black); }
.choice[aria-checked="true"] { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue); }

.pill {
  min-height: 44px; min-width: 92px; padding: 10px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--field-line); background: var(--white); color: var(--black);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
}
.pill:hover { border-color: var(--black); }
.pill[aria-checked="true"] { background: var(--black); border-color: var(--black); color: var(--white); }

.field-row { display: flex; flex-wrap: wrap; gap: 14px; }
.field-row + .field-row { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field-sm { flex: 0 1 160px; }
.label-note { font-weight: 500; color: #7B838C; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.field input, .field select {
  height: 48px; padding: 0 14px; border-radius: var(--radius);
  border: 1.5px solid var(--field-line); background: var(--white);
  font-family: var(--font-body); font-size: 16px; /* 16px stops iOS zoom-on-focus */
  color: var(--black); width: 100%;
}
.field textarea {
  padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--field-line); background: var(--white);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--black); width: 100%; resize: vertical;
}
.field input[aria-invalid="true"] { border-color: #B3261E; box-shadow: inset 0 0 0 1px #B3261E; }
.field-error { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: #B3261E; }
.field-error:empty { display: none; }
.saved-note {
  margin: -2px 0 14px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--blue-tint); font-size: 14px; line-height: 1.5; color: var(--black);
}
.saved-note[hidden] { display: none; }
.saved-note .link-btn { min-height: 0; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.book-status {
  padding: 14px 16px; border-radius: var(--radius); background: var(--blue-tint);
  font-size: 15px; line-height: 1.55; color: var(--black);
}
.book-status[hidden] { display: none; }

/* Placeholders while open times load */
.is-loading {
  display: block; min-height: 44px; border-color: transparent;
  background: linear-gradient(90deg, #ECEEF1 0%, #F6F7F9 50%, #ECEEF1 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite; pointer-events: none;
}
.choice.is-loading { min-height: 66px; }
.pill.is-loading { width: 92px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.book-submit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  /* Pinned to the bottom of the screen while the form scrolls past, so the
     choice and the button are always in reach. */
  position: sticky; bottom: 0; z-index: 3;
  margin: 0 -34px -34px; padding: 16px 34px calc(16px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px -12px rgba(14, 16, 19, .18);
  border-radius: 0 0 var(--radius) var(--radius);
}
.book-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#booking-summary { font-size: 15px; font-weight: 700; color: var(--black); }
.book-summary small { font-size: 13px; color: var(--muted); }

.booking-done { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 0; }
.booking-done[hidden] { display: none; }
.booking-done h3 { font-family: var(--font-display); font-weight: 600; font-size: 40px; }
.booking-done p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.booking-recap { width: 100%; margin: 4px 0 0; border-top: 2px solid var(--black); }
.booking-recap div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.booking-recap dt { flex: 0 0 72px; padding-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.booking-recap dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--black); }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--muted-light); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-top: 60px; padding-bottom: 40px; }
.footer-brand { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.footer-brand p { margin-top: 12px; font-size: 15px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col strong { color: var(--white); }
.footer-col a { color: var(--muted-light); text-decoration: none; }
.footer-col a:hover { color: var(--baby-blue); }
.footer-legal {
  padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--dark-line);
  font-size: 13px; line-height: 1.6; color: #8C96A1;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  :root { --section-y: 64px; --gutter: 20px; }

  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--dark-line);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--dark-line); font-size: 17px; }
  .site-nav .btn { margin-top: 16px; align-self: flex-start; }
  .header-inner { position: relative; }
  .brand-name { font-size: 24px; }
  .brand-mark { width: 38px; height: 38px; }

  .lede { font-size: 17px; margin-top: 16px; }
  /* Thumb-sized, not full-width slabs: 44px tall, as wide as the label. */
  .btn, .btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }

  /* Cover, recomposed for a phone: wordmark up top behind his cap, the coach
     right of centre, the copy on a band at the bottom. */
  .cover { min-height: calc(100svh - 68px); max-height: none; }
  .cover-word { font-size: 37vw; top: 18px; }
  .cover-coach .cover-lean { right: -14vw; bottom: 10%; height: 78%; }
  .cover-plate img { object-position: 30% 62%; }
  .cover-shade { background: linear-gradient(to top, rgba(14,16,19,.96) 0%, rgba(14,16,19,.86) 34%, rgba(14,16,19,.2) 56%, rgba(14,16,19,0) 66%); }
  .cover-copy { padding-top: 46svh; padding-bottom: 28px; }
  .cover h1 { font-size: clamp(34px, 9.6vw, 48px); }
  .cover .eyebrow { font-size: 12px; letter-spacing: .14em; }
  .cover .btn-row { margin-top: 22px; gap: 10px; }

  .practice { grid-template-columns: 1fr; min-height: 0; }
  .practice-clip { order: -1; min-height: 0; height: 58svh; }
  .practice-copy { padding: 36px var(--gutter) 44px; }
  .practice-facts { margin-top: 28px; gap: 12px; }
  .practice-facts strong { font-size: 24px; }
  .practice-facts span { font-size: 13px; }

  /* The cage clip goes full-bleed; the copy sits on a band, and only the base
     he has just reached is shown, so the phone never holds four paragraphs. */
  .cage-stage { align-items: flex-end; }
  .cage-clip { inset: 0; aspect-ratio: auto; border-radius: 0; }
  .cage-clip figcaption { top: 82px; bottom: auto; }
  .cage-scrim { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, rgba(14,16,19,.95) 0%, rgba(14,16,19,.82) 32%, rgba(14,16,19,0) 58%); }
  .cage-copy { padding-bottom: 32px; }
  .cage-copy h2 { font-size: 38px; }
  .scorebook { gap: 18px; margin-top: 20px; align-items: center; }
  .diamond { flex-basis: 84px; width: 84px; height: 84px; }
  .bases { display: grid; flex: 1 1 auto; min-height: 7.5em; }
  .bases li {
    /* One base at a time: each line is gone just before the next arrives. */
    --on: clamp(0, (var(--t) - var(--at)) * 33 + 1, 1);
    --next: clamp(0, (var(--t) - var(--nx)) * 33 + 2, 1);
    grid-area: 1 / 1; align-self: center;
    opacity: calc(var(--on) * (1 - var(--next)));
  }
  .base-name { font-size: 20px; }

  .rate { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; padding: 24px 0; }
  .rate-name, .rate-desc { grid-column: 1 / -1; }
  .rate-meta { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .rate .btn { grid-column: 1 / -1; justify-self: start; width: auto; }
  .rate-packs::before { inset: 0 -14px; }
  .rate h3 { font-size: 30px; }

  .about-inner { grid-template-columns: 1fr; }
  .about-name { font-size: 31vw; white-space: normal; }
  .about-name span { display: block; }
  .about-media { grid-column: 1; font-size: 31vw; margin-top: -0.36em; }
  .about-copy { grid-column: 1; grid-row: 3; }
  .about-media img { height: 380px; }
  .about-copy { padding-top: 32px; }
  .about-facts dd { font-size: 21px; }

  .book-card { padding: 22px; }
  .book-submit { margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); }
  .book-submit .btn { flex: 1 1 100%; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offering-grid { grid-template-columns: 1fr; }
  .pill-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pill { min-width: 0; }
  .field-sm { flex: 1 1 200px; }
  /* Open days scroll sideways instead of stacking into rows */
  .day-grid {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
    padding: 2px 0 6px; scrollbar-width: none;
  }
  .day-grid::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 76px; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-loading { animation: none; }
  /* The diamond is fully traced and every base readable without motion. */
  .cage { --t: 1; }
  .cover-lean { translate: none; }
  .cover-lean, .cover-plate img, .cover-copy > * { animation: none; }
  .cover-word .cover-lean, .cover-coach img, .about-media img { transform: none; }
  .about-name-out { translate: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .bases { display: flex; min-height: 0; }
  .bases li { opacity: 1; }
  .bases li:not(:last-child) { display: none; }
}

/* ---------- Manage booking page ---------- */
.manage-page main { min-height: calc(100vh - 73px); }
.manage-card { max-width: 620px; margin: 0 auto; }
.manage-title { margin-bottom: 20px; font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; color: var(--black); }
.manage-details { margin: 0 0 22px; border-top: 2px solid var(--black); }
.manage-details[hidden] { display: none; }
.manage-details div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.manage-details dt { flex: 0 0 90px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.manage-details dd { margin: 0; font-weight: 600; color: var(--black); }
.manage-actions { margin-top: 26px; }
.manage-actions .btn[hidden] { display: none; }
.btn-outline-dark { background: transparent; border: 1.5px solid var(--black); color: var(--black); }
.btn-outline-dark:hover { background: var(--black); color: var(--white); }

/* ---------- Coach dashboard (coach.html) ---------- */
.coach-page { min-height: 100vh; }
.coach-main { padding-top: 36px; padding-bottom: 80px; max-width: 880px; }
.coach-login { max-width: 440px; margin: 40px auto 0; }
.coach-login form { display: flex; flex-direction: column; gap: 16px; }
.coach-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5vw, 46px); line-height: 1.05; color: var(--black); margin-bottom: 20px; }
.coach-error { min-height: 0; font-size: 15px; color: #B3261E; }
.coach-error:empty { display: none; }
.coach-hint { font-size: 14px; line-height: 1.5; color: var(--muted); }

.coach-tabs { display: flex; gap: 6px; margin-bottom: 22px; padding: 5px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.coach-tabs button {
  flex: 1 1 0; min-height: 44px; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--muted);
}
.coach-tabs button[aria-selected="true"] { background: var(--black); color: var(--white); }

.coach-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 26px; }
.coach-actions .coach-hint { flex: 1 1 260px; }
.coach-list { display: flex; flex-direction: column; gap: 12px; }
.coach-day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.coach-day-title { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }

.coach-card {
  display: flex; gap: 18px; padding: 18px 20px;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--black); border-radius: var(--radius);
}
.coach-card.is-loading { min-height: 110px; border-left-color: transparent; }
.coach-card-group { border-left-color: var(--baby-blue); }
.coach-card-block { border-left-color: var(--field-line); background: #F9FAFB; }
.coach-offering { border-left-color: var(--blue); }
.coach-time { flex: 0 0 74px; display: flex; flex-direction: column; gap: 2px; }
.coach-time strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.1; color: var(--black); white-space: nowrap; }
.coach-time span { font-size: 13px; color: var(--muted); }
.coach-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.coach-card-body h3 { font-size: 18px; font-weight: 700; color: var(--black); }
.coach-kind { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.coach-card-block .coach-kind { color: var(--muted); }
.coach-meta { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.coach-notes { font-size: 14px; font-style: italic; color: var(--ink-2); overflow-wrap: anywhere; }
.coach-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 8px; }
.contact-links { display: flex; gap: 6px; }
.contact-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius);
  background: var(--blue-tint); color: var(--black); font-size: 14px; font-weight: 700; text-decoration: none;
}
.contact-links a:hover { background: #D6E9F6; color: var(--black); }
.link-btn {
  min-height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:disabled { opacity: .5; cursor: default; }
.link-danger { color: #B3261E; }
.coach-empty { padding: 26px; border-radius: var(--radius); background: var(--blue-tint); font-size: 16px; line-height: 1.6; color: var(--black); }

.coach-offering-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius); }
.status-on { background: var(--blue-tint); color: var(--blue); }
.status-warn { background: #FBF1DC; color: #7A5A12; }
.status-off { background: #ECEEF1; color: var(--muted); }
.fill { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.fill-bar { flex: 0 1 180px; height: 8px; border-radius: var(--radius); background: #E6E9ED; overflow: hidden; }
.fill-bar span { display: block; height: 100%; background: var(--blue); border-radius: var(--radius); }
.fill-label { font-size: 14px; font-weight: 600; color: var(--black); }
.coach-past { margin-top: 16px; }
.coach-past summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.coach-past .coach-card { margin-top: 10px; opacity: .85; }

/* Preview mode */
.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  margin-bottom: 24px; padding: 14px 18px; border-radius: var(--radius);
  background: #FBF1DC; border: 1px solid #EAD7A8; font-size: 15px; line-height: 1.5; color: #4A3A10;
}
.demo-banner[hidden] { display: none; }
.demo-banner > div { flex: 1 1 320px; }
.demo-banner .link-btn { color: #7A5A12; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.demo-note {
  margin-bottom: 22px; padding: 12px 16px; border-radius: var(--radius);
  background: #FBF1DC; font-size: 14px; line-height: 1.5; color: #4A3A10;
}
.coach-tabs button[hidden] { display: none; }
.email-row { width: 100%; text-align: left; font-family: var(--font-body); cursor: pointer; }
.email-row:hover { border-color: var(--blue); }
.email-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }

/* Dialog: centered on desktop, a bottom sheet on phones */
.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: var(--radius); background: var(--white); color: var(--ink);
  box-shadow: 0 24px 60px rgba(15, 46, 36, .25);
}
.sheet::backdrop { background: rgba(15, 46, 36, .55); }
.sheet-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 22px 24px 12px; background: var(--white);
}
.sheet-title { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.05; color: var(--black); }
.sheet-close {
  flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--field-line); border-radius: var(--radius); background: var(--white); color: var(--black); cursor: pointer;
}
.sheet-body { padding: 4px 24px 26px; }
.sheet-lead { margin-bottom: 18px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.sheet-form { display: flex; flex-direction: column; gap: 16px; }
.sheet-form .field-row + .field-row { margin-top: 0; }
.sheet-form > .field { flex: none; }
.sheet-form .btn { align-self: flex-start; }
.sheet-slots { display: flex; flex-direction: column; gap: 14px; }
.sheet-slots[hidden], .sheet-form [hidden] { display: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--black); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--black); }
.btn-danger { background: #8A0F1E; color: var(--white); }
.btn-danger:hover { background: #6E0C18; color: var(--white); }

.roster-email { margin-bottom: 14px; }
.roster { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.roster li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.roster-main { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--muted); }
.roster-main strong { font-size: 17px; color: var(--black); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: var(--radius);
  background: var(--black); color: var(--white); font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.toast[hidden] { display: none; }

@media (max-width: 760px) {
  .coach-main { padding-top: 24px; }
  .coach-card { flex-direction: column; gap: 6px; padding: 16px; }
  .coach-time { flex-direction: row; align-items: baseline; gap: 8px; flex-basis: auto; }
  .coach-time span::before { content: "to "; }
  .sheet {
    width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-head { padding: 18px 20px 10px; }
  .sheet-body { padding: 4px 20px 24px; }
  .toast { bottom: 16px; }
}
