/* Layout: one scrolling profile built like a scorecard; a family-only /questions page */
:root {
  color-scheme: light;
  --bg: #F3F4F0; --surface: #FFFFFF; --ink: #14231C; --muted: #59685F;
  --line: #D3D9D1; --fairway: #1F5A3D; --fairway-ink: #FFFFFF; --flag: #C8901A; --flag-bg: #FBF1DA;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0D1511; --surface: #142019; --ink: #E5ECE7; --muted: #95A69B;
  --line: #26362D; --fairway: #5DB487; --fairway-ink: #0D1511; --flag: #F0C75A; --flag-bg: #2A2414; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0D1511; --surface: #142019; --ink: #E5ECE7; --muted: #95A69B;
  --line: #26362D; --fairway: #5DB487; --fairway-ink: #0D1511; --flag: #F0C75A; --flag-bg: #2A2414; color-scheme: dark; }

* { box-sizing: border-box; }
img { max-width: 100%; }
[hidden] { display: none !important; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--fairway); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: 1; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tbd { display: inline-block; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--flag); background: var(--flag-bg); border: 1px dashed var(--flag); border-radius: 4px; padding: 0 .4em; line-height: 1.6; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }

/* Nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; gap: 20px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; text-decoration: none; color: var(--ink); margin-right: auto; white-space: nowrap; flex: none; }
.brand span { color: var(--fairway); }
nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav ul a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
nav ul a:hover { color: var(--ink); }

/* Hero */
.hero { padding-block: 48px 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: end; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(4.5rem, 13vw, 9rem); font-weight: 800; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--fairway); display: block; }
.hero .tag { margin-top: 16px; font-size: 1.15rem; color: var(--muted); max-width: 34ch; }
.hero .tag strong { color: var(--ink); }
.cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; padding: 12px 18px; border-radius: 6px; text-decoration: none; border: 1px solid var(--fairway); cursor: pointer; font-family: var(--body); }
.btn.primary { background: var(--fairway); color: var(--fairway-ink); }
.btn.ghost { background: transparent; color: var(--fairway); }
.photo { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--surface) 0 14px, var(--bg) 14px 28px);
  display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: .9rem; }

/* Scorecard strip */
.card-label { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.scorecard-scroll { overflow-x: auto; }
.scorecard { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--surface); border: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.scorecard th, .scorecard td { border: 1px solid var(--line); padding: 10px 12px; text-align: center; }
.scorecard thead th { background: var(--ink); color: var(--bg); font-family: var(--mono); font-weight: 500; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; border-color: var(--ink); }
.scorecard td { font-family: var(--display); font-size: 1.9rem; font-weight: 700; }
.scorecard td .tbd { font-size: .7rem; }

section { padding-block: 56px; border-top: 1px solid var(--line); }
section > .wrap > header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.lede { color: var(--muted); max-width: 62ch; margin: 0; }

/* Results table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.results { width: 100%; min-width: 620px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.results th, .results td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.results th { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.results td.num { font-family: var(--mono); text-align: right; }
.results th.num { text-align: right; }
.results tr:last-child td { border-bottom: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-weight: 500; }
.video { border: 1px solid var(--line); background: var(--ink); color: var(--bg); border-radius: 10px; padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.video h3 { font-size: 2rem; }
.video p { margin: 0; color: var(--bg); opacity: .8; max-width: 52ch; }
.honors { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.honors li { display: flex; gap: 12px; align-items: baseline; }
.honors li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--flag); flex: none; transform: translateY(-1px); }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 6px; }
.contact-box h3 { font-size: 1.5rem; }
.note { font-size: .85rem; color: var(--muted); margin-top: 20px; max-width: 70ch; }
footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* Questions view */
#questions-view, #admin-view { padding-block: 48px 64px; }
.gate { max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: grid; gap: 14px; }
label { font-weight: 600; font-size: .9rem; }
input[type=password], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
textarea { min-height: 84px; resize: vertical; }
.err { color: #B4372B; font-size: .9rem; margin: 0; }
.qa-layout { display: grid; gap: 28px; max-width: 760px; }
.ask { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.ask .row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.qlist { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.q { border: 1px solid var(--line); border-left: 4px solid var(--flag); border-radius: 8px; background: var(--surface); padding: 18px 20px; display: grid; gap: 10px; }
.q.answered { border-left-color: var(--fairway); }
.q .qtext { font-weight: 600; font-size: 1.05rem; }
.q .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.q .answer { white-space: pre-wrap; }
.q .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; padding: 0; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 24px; }
.status { font-size: .85rem; color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-block: 32px; }
  .photo { aspect-ratio: 16 / 10; }
  .grid-2 { grid-template-columns: 1fr; }
  nav ul { gap: 12px; }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform .15s; } .btn:hover { transform: translateY(-1px); } }

/* Coach code gate */
#code-gate { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: grid; place-items: center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.gate-card { width: 100%; max-width: 440px; display: grid; gap: 18px; text-align: center; }
.gate-card h1 { font-size: clamp(3.5rem, 12vw, 5.5rem); font-weight: 800; }
.gate-card h1 em { font-style: normal; color: var(--fairway); }
.digits { display: flex; gap: 10px; justify-content: center; }
.digits input { width: 64px; height: 76px; text-align: center; font-family: var(--display); font-size: 2.4rem; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 8px; }
.digits input:focus { border-color: var(--fairway); outline: none; }
.gate-card .btn { justify-content: center; }
.skip { color: var(--muted); font-size: .85rem; }
/* Coach codes admin */
.admin { display: grid; gap: 14px; }
.addcode { display: grid; grid-template-columns: 110px 1fr 1fr auto; gap: 10px; align-items: end; }
.addcode > div { display: grid; gap: 4px; min-width: 0; }
.addcode input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.pill { font-family: var(--mono); font-size: .72rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.yes { background: var(--fairway); color: var(--fairway-ink); }
.pill.no { border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 600px) { .addcode { grid-template-columns: 1fr; } .digits input { width: 56px; height: 68px; } }

/* Admin */
.created { background: var(--surface); border: 1px solid var(--fairway); border-radius: 10px; padding: 18px 20px; display: grid; gap: 8px; }
.created-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; min-width: 0; }
.created-row strong { font-family: var(--display); font-size: 2.4rem; line-height: 1; letter-spacing: .08em; }
.created-row code { font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; min-width: 0; }
.created .btn { padding: 8px 14px; }
.summary { display: flex; gap: 24px; flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.summary b { font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-right: 6px; }

/* Results extras */
.mono { font-family: var(--mono); font-size: .9rem; }
.results td.win { color: var(--fairway); font-weight: 600; }
.rankings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.rankings > div { display: grid; gap: 2px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rankings strong { font-family: var(--display); font-size: 2.4rem; line-height: 1.1; }
.rankings span:last-child { color: var(--muted); font-size: .9rem; }
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-box .mono { overflow-wrap: anywhere; }
@media (max-width: 760px) { .rankings, .contacts { grid-template-columns: 1fr; } }

/* Picks pages */
.tool-view { padding-block: 48px 64px; }
.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.tool-stack { display: grid; gap: 20px; }
.pick-summary { display: flex; gap: 24px; flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 16px; }
.pick-summary b { font-family: var(--display); font-size: 1.8rem; color: var(--ink); margin-right: 6px; }
.pick-summary .send b { color: var(--fairway); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 260px; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { touch-action: manipulation; font: inherit; font-size: .82rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.school-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.school { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; }
.school.yes { border-left-color: var(--fairway); }
.school.no { border-left-color: var(--muted); opacity: .75; }
.school.later { border-left-color: var(--flag); }
.school .info { flex: 1; min-width: 0; }
.school .name { font-weight: 600; }
.school .sub { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.toggle button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; font: inherit; font-size: .88rem; font-weight: 600; white-space: nowrap; padding: 9px 16px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.toggle button + button { border-left: 1px solid var(--line); }
.toggle button.on.yes { background: var(--fairway); color: var(--fairway-ink); }
.toggle button.on.no { background: var(--ink); color: var(--bg); }
.toggle button.on.later { background: var(--flag-bg); color: var(--ink); }
.school-form { display: grid; grid-template-columns: 2fr 1fr 1.4fr .8fr 1.4fr 1.6fr; gap: 10px; }
.school-form > div { display: grid; gap: 4px; min-width: 0; }
.school-form input, .school-form select { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
details.ask summary { cursor: pointer; list-style-position: inside; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-actions .btn { padding: 9px 14px; }
.pill.skip { background: var(--ink); color: var(--bg); }
.pill.later { background: var(--flag-bg); color: var(--ink); }
@media (max-width: 900px) { .school-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .school { flex-wrap: wrap; } .toggle { width: 100%; } .toggle button { flex: 1; padding: 9px 8px; min-height: 44px; } .school-form { grid-template-columns: 1fr; } }
.school .reason, .results .sub { font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }

/* =========================================================
   Motion & polish
   Everything animated lives under html.motion, which is only
   set when the viewer hasn't asked for reduced motion.
   ========================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-swing: cubic-bezier(.65, 0, .35, 1); }

/* Cross-page transitions (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s var(--ease-swing) both; }
::view-transition-new(root) { animation: vt-in .55s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Nav: translucent, with a scroll progress line and sliding active marker */
nav { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); transition: box-shadow .3s; }
nav.scrolled { box-shadow: 0 6px 24px -18px rgba(0,0,0,.5); }
nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--flag); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
nav ul a { position: relative; transition: color .2s; }
nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--fairway); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease-out); }
nav ul a:hover::after, nav ul a.active::after { transform: scaleX(1); }
nav ul a.active { color: var(--ink); }

/* Buttons: lift + light sweep */
.btn { position: relative; overflow: hidden; transition: transform .25s var(--ease-out), box-shadow .25s, background-color .2s, color .2s; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s var(--ease-out); pointer-events: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px var(--fairway); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Cards and rows respond to the pointer */
.contact-box, .rankings > div, .q, .school, .tl-card { transition: transform .35s var(--ease-out), box-shadow .35s, border-color .25s, opacity .25s, background-color .25s; }
.contact-box:hover, .rankings > div:hover, .tl-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(0,0,0,.45); }
.results tbody tr { transition: background-color .2s; }
.results tbody tr:hover { background: color-mix(in srgb, var(--fairway) 7%, transparent); }
.honors li::before { transition: transform .3s var(--ease-out); }
.honors li:hover::before { transform: translateY(-1px) scale(1.5); }

/* Photo placeholder shimmer */
.photo { position: relative; overflow: hidden; }
.photo > span { position: relative; z-index: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Hero: shot tracer ---------- */
.hero { position: relative; isolation: isolate; }
.tracer { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.hero > div:not(.photo) { position: relative; z-index: 2; }
.tracer-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.tracer-ring { opacity: 0; transform-box: fill-box; transform-origin: center; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 28px; --line-x: 132px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: var(--line-x); top: 6px; bottom: 6px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--line); }
.timeline::after { background: linear-gradient(var(--fairway), var(--flag)); transform-origin: 50% 0; transform: scaleY(var(--tl-progress, 1)); }
.tl-item { display: grid; grid-template-columns: calc(var(--line-x) - 28px) 1fr; gap: 56px; align-items: start; position: relative; }
.tl-item::before { content: ""; position: absolute; left: calc(var(--line-x) - 7px); top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--fairway); z-index: 1; transition: transform .5s var(--ease-out), background-color .4s, border-color .4s; }
.tl-item.lit::before { background: var(--flag); border-color: var(--flag); transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--flag) 25%, transparent); }
.tl-year { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-age { display: block; font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .04em; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; min-width: 0; }
.tl-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.tl-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tl-card li { padding-left: 18px; position: relative; }
.tl-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tl-card li.win::before { background: var(--flag); width: 8px; height: 8px; left: 1px; top: .55em; }
.tl-card li.win { font-weight: 600; }
.tl-card .sc { font-family: var(--mono); font-size: .8rem; color: var(--muted); font-weight: 400; margin-left: 4px; white-space: nowrap; }
@media (max-width: 640px) {
  .timeline { --line-x: 8px; gap: 22px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 32px; }
  .tl-year { text-align: left; font-size: 2rem; }
}

/* ---------- Gate ---------- */
#code-gate { transition: transform .9s var(--ease-swing), opacity .6s; }
#code-gate.leaving { transform: translateY(-100%); }
.digits input { transition: border-color .2s, transform .25s var(--ease-out), background-color .2s; }
.digits input.filled { transform: scale(1.06); border-color: var(--fairway); }
.digits.shake { animation: shake .45s var(--ease-swing); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Picks ---------- */
.toggle button { transition: background-color .25s, color .25s, transform .2s var(--ease-out); }
.toggle button:active { transform: scale(.95); }
.school.just-picked { animation: picked .6s var(--ease-out); }
@keyframes picked { 30% { transform: scale(1.015); box-shadow: 0 12px 28px -18px var(--fairway); } }
.chip { transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-out); }
.chip:hover { transform: translateY(-1px); }
.pill { transition: background-color .3s, color .3s; }

/* ================= Entrance & scroll animations ================= */
.motion .hero .eyebrow, .motion .hero .tag, .motion .hero .cta, .motion .photo { animation: rise 1s var(--ease-out) both; }
.motion .hero .eyebrow { animation-delay: .05s; }
.motion .hero .tag { animation-delay: .55s; }
.motion .hero .cta { animation-delay: .7s; }
.motion .photo { animation: photo-in 1.3s var(--ease-out) .25s both; }
.motion .hero h1 .line, .motion .gate-card h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.motion .gate-card h1 .line { display: inline-block; }
.motion .hero h1 .line > span, .motion .gate-card h1 .line > span { display: inline-block; animation: line-up 1.1s var(--ease-out) both; }
.motion .hero h1 .line:nth-child(2) > span, .motion .gate-card h1 .line:nth-of-type(2) > span { animation-delay: .12s; }
.motion .hero h1 em.line > span { animation-delay: .14s; }
.motion .tracer-line { stroke-dashoffset: 1; animation: draw 2s cubic-bezier(.33, .05, .25, 1) .8s forwards; }
.motion .tracer-ring { animation: ring 1.4s var(--ease-out) 2.75s 2; }
.motion .photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--fairway) 14%, transparent) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 3.2s ease-in-out 1.4s infinite; }
.motion .photo img { animation: kenburns 18s ease-in-out infinite alternate; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes line-up { from { transform: translateY(105%); } }
@keyframes photo-in { from { opacity: 0; transform: translateY(30px) scale(.96); clip-path: inset(12% 0 0 0 round 10px); } to { clip-path: inset(0 0 0 0 round 10px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes shimmer { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }

/* Scroll reveals: elements tagged .reveal by motion.js */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.motion .reveal.from-left { transform: translateX(-36px); }
.motion .reveal.from-right { transform: translateX(36px); }
.motion .reveal.pop { transform: translateY(14px) scale(.94); }
.motion .reveal.in, .motion-done .reveal { opacity: 1; transform: none; }
.motion .scorecard td { transition: color .3s; }

/* Gate entrance */
.motion .gate-card > * { animation: rise .9s var(--ease-out) both; }
.motion .gate-card > :nth-child(2) { animation-delay: .05s; }
.motion .gate-card > :nth-child(3) { animation-delay: .35s; }
.motion .gate-card > :nth-child(4) { animation-delay: .45s; }
.motion .gate-card > :nth-child(n+5) { animation-delay: .6s; }
.motion .digits input { animation: rise .7s var(--ease-out) both; }
.motion .digits input:nth-child(2) { animation-delay: .5s; }
.motion .digits input:nth-child(3) { animation-delay: .56s; }
.motion .digits input:nth-child(4) { animation-delay: .62s; }
.motion .digits input:nth-child(1) { animation-delay: .44s; }

/* Tool pages: gate card and lists come in softly */
.motion .page-head > *, .motion main > .wrap > header > * { animation: rise .8s var(--ease-out) both; }
.motion .page-head > :nth-child(2), .motion main > .wrap > header > :nth-child(2) { animation-delay: .07s; }
.motion .page-head > :nth-child(3), .motion main > .wrap > header > :nth-child(3) { animation-delay: .14s; }
.motion .gate { animation: rise .8s var(--ease-out) .2s both; }
.motion .stagger-in > * { animation: rise .6s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 35ms); }
.motion .gate-card h1 em.line > span { animation-delay: .14s; }
.motion .tracer-ball { animation: appear .01s linear .8s both; }
@keyframes appear { from { opacity: 0; } }
html, body { overflow-x: clip; }
@media (max-width: 640px) {
  nav .wrap { flex-wrap: nowrap; gap: 14px; }
  nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: -6px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
  nav ul:has(> li:only-child) { mask-image: none; overflow: visible; }
  nav ul::-webkit-scrollbar { display: none; }
  nav ul li { flex: none; }
}
.ev-link { color: inherit; text-decoration: none; background-image: linear-gradient(var(--fairway), var(--fairway)); background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s var(--ease-out), color .2s; border-bottom: 1px dotted var(--line); }
.ev-link:hover, .ev-link:focus-visible { background-size: 100% 2px; color: var(--fairway); border-bottom-color: transparent; }
.ev-link::after { content: "\2197"; font-size: .75em; margin-left: 3px; opacity: .45; transition: opacity .2s, transform .2s var(--ease-out); display: inline-block; }
.ev-link:hover::after { opacity: 1; transform: translate(2px, -2px); }

/* Head to head course comparison */
.h2h-summary { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); text-transform: uppercase; line-height: 1.15; margin: 0 0 24px; max-width: 40ch; text-wrap: balance; }
.h2h-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.h2h-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; display: grid; gap: 16px; min-width: 0; transition: transform .35s var(--ease-out), box-shadow .35s; }
.h2h-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(0,0,0,.45); }
.h2h-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.h2h-head h3 { font-size: 1.5rem; }
.h2h-head .sub { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-top: 4px; }
.h2h-verdict { font-family: var(--mono); font-size: .75rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex: none; }
.h2h-verdict.ahead { background: var(--fairway); color: var(--fairway-ink); }
.h2h-verdict.behind { border: 1px solid var(--line); color: var(--muted); }
.h2h-bars { display: grid; gap: 10px; }
.h2h-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 3.2rem; gap: 12px; align-items: center; }
.h2h-label { display: grid; min-width: 0; }
.h2h-label strong { font-size: .9rem; }
.h2h-label span { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-track { height: 14px; background: color-mix(in srgb, var(--line) 55%, transparent); border-radius: 999px; overflow: hidden; }
.h2h-fill { height: 100%; width: var(--w); border-radius: 999px; transition: width 1.3s var(--ease-out); }
.h2h-row.ben .h2h-fill { background: linear-gradient(90deg, var(--fairway), color-mix(in srgb, var(--fairway) 70%, var(--flag))); }
.h2h-row.d1 .h2h-fill { background: var(--muted); }
.h2h-row.field .h2h-fill { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.h2h-row.field .h2h-val { color: var(--muted); }
.motion .h2h-row.field .h2h-fill { transition-delay: .45s; }
.h2h-lines { display: grid; gap: 2px; font-size: .78rem; }
.motion .courses-section:not(.bars-in) .h2h-fill { width: 0; }
.motion .h2h-row.d1 .h2h-fill { transition-delay: .25s; }
.h2h-val { font-family: var(--display); font-weight: 700; font-size: 1.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.h2h-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.course-form { grid-template-columns: 2fr 1.2fr .6fr 1.4fr 2fr .7fr 1fr 1.6fr; }
@media (max-width: 1000px) { .course-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .course-form { grid-template-columns: 1fr; } .h2h-row { grid-template-columns: minmax(0, 6.5rem) 1fr 2.8rem; } }

/* Real hero photo and video clip */
.photo.has-img { background: var(--surface); padding: 0; display: block; z-index: 2; }
.photo.has-img img { object-position: 50% 30%; }
@media (max-width: 900px) { .photo.has-img { aspect-ratio: 4 / 5; } }
.video.has-clip { flex-direction: row; align-items: center; gap: 32px; }
.video .clip { flex: 0 0 auto; width: min(300px, 42%); aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #000; }
.video .clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-text { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
@media (max-width: 640px) { .video.has-clip { flex-direction: column; align-items: stretch; padding: 20px; } .video .clip { width: 100%; max-width: 340px; margin: 0 auto; } }

/* Hero slideshow: photos stack and crossfade */
.slideshow picture { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.slideshow picture.on { opacity: 1; }
.slideshow picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.slideshow .dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 4px; z-index: 3; }
.slideshow .dots button { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation; display: grid; place-items: center; }
.slideshow .dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.25); transition: width .3s, background .3s; }
.slideshow .dots button[aria-current="true"]::before { width: 22px; border-radius: 4px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .slideshow picture { transition: none; } }
