/* I Teach Adapted PE — "Gym floor" design system
   Display: Big Shoulders (Chicago's civic typeface)
   Text: Atkinson Hyperlegible (Braille Institute, built for low-vision readers) */

:root {
  --wall: #F5F6F3;       /* painted cinder-block white */
  --paper: #FFFFFF;
  --ink: #1E2633;        /* gym-banner navy */
  --ink-soft: #4A5466;
  --line: #D9DDE3;
  --maple: #E2B47C;      /* finished hardwood */
  --maple-deep: #C98F4F;
  --amber: #F0A500;      /* brand gold, buttons */
  --amber-deep: #C98700;

  /* REACH spokes */
  --r: #E05C3A;
  --e: #F0A500;
  --a: #3E9E6C;
  --c: #3F84CF;
  --h: #8E4FAE;
  /* text-safe variants (4.5:1 on white) */
  --r-text: #B73F20;
  --e-text: #8A5D00;
  --a-text: #2B7550;
  --c-text: #2563A8;
  --h-text: #7A3D99;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;

  --measure: 64ch;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: 0.005em; margin: 0; }
h1 { font-size: clamp(3rem, 7.4vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; line-height: 1.1; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink-soft); }
.small { font-size: .92rem; color: var(--ink-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--wall { background: var(--wall); }
.section--ink { background: var(--ink); color: #EEF1F5; }
.section--ink .lede, .section--ink .small { color: #B9C2CF; }
.section--ink a { color: #9CC6F2; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 + p { margin-top: 18px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 10px 14px; z-index: 100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font: 700 1rem/1.2 var(--text);
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--go { background: var(--amber); color: var(--ink); }
.btn--go:hover { background: var(--amber-deep); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.section--ink .btn--line { border-color: #EEF1F5; color: #EEF1F5; }
.section--ink .btn--line:hover { background: #EEF1F5; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.55rem; line-height: 1; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: var(--radius); }
.nav a:hover { background: var(--wall); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--amber); border-radius: 0; }
.nav .btn { margin-left: 10px; min-height: 42px; padding: 8px 16px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 2px solid var(--ink); border-radius: var(--radius);
    font: 700 1rem var(--text); color: var(--ink); padding: 8px 14px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--amber); padding-left: 14px; }
  .nav .btn { margin: 16px 0 0; }
}

/* ---------- Hero (center court) ---------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lede { margin-bottom: 32px; }
.court { width: 100%; max-width: 560px; justify-self: end; }
.court svg { width: 100%; height: auto; overflow: visible; }
.court text { font-family: var(--display); }
.court .spoke-label { font-family: var(--text); font-size: 15px; fill: var(--ink); }
.court .spoke-label tspan.k { font-weight: 700; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .court { justify-self: center; max-width: 480px; }
}

/* one orchestrated load moment: spokes paint outward, spots drop in */
@media (prefers-reduced-motion: no-preference) {
  .court .spoke { stroke-dasharray: 200; stroke-dashoffset: 200; animation: paint .7s cubic-bezier(.3,.7,.2,1) forwards; }
  .court .spot, .court .spoke-label { opacity: 0; animation: drop .45s ease-out forwards; }
  .court .s1 { animation-delay: .25s; } .court .s2 { animation-delay: .4s; } .court .s3 { animation-delay: .55s; }
  .court .s4 { animation-delay: .7s; }  .court .s5 { animation-delay: .85s; }
  .court .spot.s1, .court .spoke-label.s1 { animation-delay: .75s; }
  .court .spot.s2, .court .spoke-label.s2 { animation-delay: .9s; }
  .court .spot.s3, .court .spoke-label.s3 { animation-delay: 1.05s; }
  .court .spot.s4, .court .spoke-label.s4 { animation-delay: 1.2s; }
  .court .spot.s5, .court .spoke-label.s5 { animation-delay: 1.35s; }
}
@keyframes paint { to { stroke-dashoffset: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Court-line list (rows separated by painted lines) ---------- */
.lines { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.lines > li { border-bottom: 1px solid var(--line); padding: 28px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: start; }
.section--ink .lines { border-top-color: #EEF1F5; }
.section--ink .lines > li { border-bottom-color: #3A4558; }
.lines h3 { margin-bottom: 8px; }
.lines p { margin-bottom: 0; }
.lines .meta { text-align: right; white-space: nowrap; }
.lines .price { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; display: block; }
.lines .meta .btn { margin-top: 12px; }
@media (max-width: 640px) {
  .lines > li { grid-template-columns: 1fr; }
  .lines .meta { text-align: left; }
}

/* ---------- Paths (home: where to start) ---------- */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 3px solid var(--ink); }
.path { padding: 28px 28px 32px 0; border-right: 1px solid var(--line); }
.path + .path { padding-left: 28px; }
.path:last-child { border-right: 0; }
.path .who { font-weight: 700; color: var(--ink-soft); margin-bottom: 10px; }
.path h3 { margin-bottom: 12px; }
.path p { color: var(--ink-soft); }
.path a.go { font-weight: 700; }
@media (max-width: 820px) {
  .paths { grid-template-columns: 1fr; }
  .path, .path + .path { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- REACH spokes ---------- */
.spokes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.spokes li { border-top: 6px solid var(--k); padding-top: 16px; }
.spokes .letter { font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: .9; color: var(--k-text); display: block; margin-bottom: 6px; }
.spokes strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.spokes p { font-size: .98rem; color: var(--ink-soft); margin: 0; }
.k-r { --k: var(--r); --k-text: var(--r-text); } .k-e { --k: var(--e); --k-text: var(--e-text); }
.k-a { --k: var(--a); --k-text: var(--a-text); } .k-c { --k: var(--c); --k-text: var(--c-text); }
.k-h { --k: var(--h); --k-text: var(--h-text); }
@media (max-width: 900px) { .spokes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .spokes { grid-template-columns: 1fr; } }

/* ---------- Two-column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Free resources */
.freebies { list-style: none; padding: 0; margin: 0 0 28px; }
.freebies li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.freebies li:first-child { border-top: 1px solid var(--line); }
.freebies a { font-weight: 700; color: var(--ink); text-decoration: none; }
.freebies a:hover { text-decoration: underline; }
.freebies span { display: block; font-size: .95rem; color: var(--ink-soft); }

.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup label { flex-basis: 100%; font-weight: 700; }
.signup input {
  flex: 1 1 240px; min-height: 48px; padding: 10px 14px;
  font: 1rem var(--text); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper);
}
.signup input[aria-invalid="true"] { border-color: var(--r-text); }
.signup .note { flex-basis: 100%; font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* Practice Zone panel: a taped-to-the-wall poster */
.poster {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.poster::before, .poster::after {
  content: ""; position: absolute; top: -10px; width: 64px; height: 20px;
  background: rgba(240, 165, 0, .55);
}
.poster::before { left: 24px; transform: rotate(-4deg); }
.poster::after { right: 24px; transform: rotate(3deg); }
.poster h3 { margin-bottom: 10px; }

/* ---------- Goal generator ---------- */
.generator { background: var(--paper); color: var(--ink); border-radius: 10px; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); }
.gen-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.gen-form label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.gen-form select {
  width: 100%; min-height: 46px; padding: 8px 10px;
  font: 1rem var(--text); color: var(--ink); background: var(--wall);
  border: 1px solid #B8BFCA; border-radius: var(--radius);
}
.gen-form .full { grid-column: 1 / -1; }
@media (max-width: 820px) { .gen-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .gen-form { grid-template-columns: 1fr; } }
.demo-output { margin-top: 22px; border-top: 3px solid var(--ink); padding-top: 18px; min-height: 90px; }
.demo-placeholder { color: var(--ink-soft); }
.output-label { font-weight: 700; color: var(--ink-soft); font-size: .92rem; margin-bottom: 8px; }
.output-text { font-size: 1.12rem; line-height: 1.6; max-width: 72ch; }
.output-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }
.output-error { color: var(--r-text); font-weight: 700; }

/* ---------- Tool rows ---------- */
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .94rem; color: var(--ink-soft); }
.tool-tags li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--maple-deep); margin-right: 8px; vertical-align: 1px; }

/* ---------- Tables (pricing tiers) ---------- */
.tiers { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.tier { padding: 26px 24px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--paper); }
.tier:last-child { border-right: 0; }
.tier.pick { background: #FFF6E0; }
.tier .flag { font-weight: 700; font-size: .9rem; color: var(--e-text); margin-bottom: 6px; min-height: 1.4em; }
.tier h3 { margin-bottom: 4px; }
.tier .price { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; margin: 10px 0 4px; }
.tier .price small { font-family: var(--text); font-weight: 400; font-size: .95rem; color: var(--ink-soft); }
.tier .for { color: var(--ink-soft); font-size: .96rem; margin-bottom: 16px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.tier li { padding: 7px 0 7px 22px; border-top: 1px solid var(--line); font-size: .96rem; position: relative; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 10px; height: 3px; background: var(--a); }
.tier li.no { color: #8A93A3; }
.tier li.no::before { background: #C3C9D2; }
@media (max-width: 900px) {
  .tiers { grid-template-columns: 1fr; }
  .tier { border-right: 0; border-bottom: 1px solid var(--line); }
  .tier:last-child { border-bottom: 0; }
}

/* ---------- Books shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.book { display: flex; flex-direction: column; }
.spine {
  aspect-ratio: 3 / 4; border-radius: 3px 8px 8px 3px; padding: 20px 18px;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 8px 0 0 rgba(0,0,0,.18);
  margin-bottom: 18px;
}
.spine .vol { font-family: var(--display); font-weight: 800; font-size: 3.6rem; line-height: .85; }
.spine .t { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.05; }
.book .status { font-weight: 700; font-size: .92rem; color: var(--ink-soft); margin-bottom: 6px; }
.book h3 { font-size: 1.45rem; margin-bottom: 8px; }
.book p { font-size: .98rem; color: var(--ink-soft); flex: 1; }
.book .buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.book .buy strong { font-family: var(--display); font-size: 1.7rem; }
@media (max-width: 980px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shelf { grid-template-columns: 1fr; } .spine { aspect-ratio: 16 / 9; } }

/* ---------- FAQ ---------- */
.faq { border-top: 3px solid var(--ink); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-family: var(--display); font-size: 2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; color: var(--ink-soft); }

/* ---------- About ---------- */
.portrait { position: relative; max-width: 420px; }
.portrait::before {
  content: ""; position: absolute; inset: 18% 0 0 0; border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  background: var(--maple);
}
.portrait img { position: relative; }
.honors { list-style: none; padding: 0; margin: 24px 0; border-top: 3px solid var(--ink); }
.honors li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.honors strong { display: block; }

.quote { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; max-width: 22ch; margin: 0 0 16px; }

/* ---------- Embedded tool frame ---------- */
.frame { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.frame iframe { width: 100%; height: 760px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C7CFDB; padding: 56px 0 40px; font-size: .96rem; }
.site-footer a { color: #EEF1F5; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: 1.4rem; color: #fff; margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { padding: 4px 0; }
.foot-base { border-top: 1px solid #3A4558; margin-top: 40px; padding-top: 20px; font-size: .88rem; color: #9AA4B3; }
.foot-base p { max-width: none; margin: 0; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Booking modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20, 26, 36, .6); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal-overlay.open { display: flex; }
.modal { background: var(--paper); border-radius: 10px; max-width: 640px; width: 100%; padding: clamp(20px, 4vw, 36px); position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: none; font-size: 1.8rem; cursor: pointer; color: var(--ink); border-radius: var(--radius); }
.modal-close:hover { background: var(--wall); }
.modal h2 { font-size: 2.2rem; margin-bottom: 4px; padding-right: 40px; }
.modal .sub { color: var(--ink-soft); margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; min-height: 46px; padding: 9px 12px; font: 1rem var(--text); color: var(--ink);
  border: 1px solid #B8BFCA; border-radius: var(--radius); background: var(--paper);
}
.form-grid textarea { min-height: 96px; resize: vertical; }
.form-grid [aria-invalid="true"] { border: 2px solid var(--r-text); }
.form-legend { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-top: 8px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* heading rhythm */
h2 + p, h2 + .lede, h2 + ul, h2 + .faq { margin-top: 16px; }
.split > div > h2 + .lede { margin-top: 16px; }
.section--ink a.btn--go, .section--ink a.btn--go:hover { color: var(--ink); text-decoration: none; }
