:root {
  --font-body: "Satoshi", "Segoe UI", sans-serif;
  --text-xs: clamp(.75rem, .72rem + .12vw, .82rem);
  --text-sm: clamp(.875rem, .84rem + .15vw, .96rem);
  --text-base: clamp(1rem, .97rem + .15vw, 1.08rem);
  --text-lg: clamp(1.125rem, 1.06rem + .3vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.36rem + .6vw, 2rem);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-sm: .35rem;
  --radius-md: .55rem;
  --radius-lg: .8rem;
  --bg: #f3f3f1;
  --surface: #fff;
  --surface-2: #e9e9e6;
  --text: #171717;
  --muted: #62625e;
  --border: #cecec8;
  --accent: #d9192e;
  --accent-hover: #ad1425;
  --accent-soft: #f7dfe2;
  --development: #24633d;
  --development-soft: #e1efe5;
}

[data-theme="dark"] {
  --bg: #151515;
  --surface: #1d1d1c;
  --surface-2: #282827;
  --text: #f0f0ec;
  --muted: #b3b2ac;
  --border: #454542;
  --accent: #f33a4f;
  --accent-hover: #ff6474;
  --accent-soft: #4a2429;
  --development: #8dd5a6;
  --development-soft: #203b29;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overflow-x: hidden; font-size: var(--text-base); }
button, a { min-height: 44px; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { max-width: 18ch; font-size: var(--text-xl); letter-spacing: -.035em; }
h2 { max-width: 28ch; font-size: var(--text-lg); letter-spacing: -.015em; }
h3 { font-size: var(--text-base); }
p { max-width: 66ch; line-height: 1.55; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

.skip-link { position: fixed; left: var(--space-4); top: -5rem; z-index: 20; padding: var(--space-3); background: var(--surface); }
.skip-link:focus { top: var(--space-3); }
.site-header, main, footer { width: min(100% - 2rem, 1120px); margin-inline: auto; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); border-bottom: 1px solid var(--border); }
.brand { min-height: 60px; display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand img { width: 40px; height: 44px; object-fit: contain; }
.brand span { display: grid; }
.brand small { color: var(--muted); font-size: var(--text-xs); }
#theme-toggle { min-width: 64px; padding-inline: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }

main { display: grid; gap: var(--space-16); padding-block: var(--space-12) var(--space-16); }
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr); align-items: end; gap: var(--space-8); }
.eyebrow { margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-copy { margin-top: var(--space-4); color: var(--muted); }
.hero-actions { display: grid; gap: var(--space-3); }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: var(--space-3) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 700; text-align: center; text-decoration: none; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: var(--surface); }
.section { display: grid; gap: var(--space-8); }
.section-heading { display: grid; gap: var(--space-2); }
.section-heading .eyebrow { margin: 0; }
.section-heading > p:last-child { color: var(--muted); }

.engine { position: relative; isolation: isolate; min-height: 500px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "players . training" ". core ." "match dashboard review"; gap: var(--space-6); align-items: center; padding: var(--space-8); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.engine-node, .engine-core { position: relative; z-index: 2; min-height: 116px; display: grid; align-content: center; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / .04); }
.engine-node > span, .engine-core > span { color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.engine-node small, .engine-core small { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; }
.engine-core { grid-area: core; min-height: 156px; border-color: var(--development); background: var(--development-soft); text-align: center; box-shadow: 0 14px 36px rgb(36 99 61 / .12); }
.engine-core > span, .engine-core small { color: var(--development); }
.node-players { grid-area: players; }
.node-training { grid-area: training; }
.node-match { grid-area: match; }
.node-review { grid-area: review; }
.node-dashboard { grid-area: dashboard; }
.engine-lines { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.line { position: absolute; left: 50%; top: 50%; width: 35%; height: 1px; transform-origin: left center; background: var(--border); }
.line-1 { transform: rotate(216deg); }
.line-2 { transform: rotate(324deg); }
.line-3 { transform: rotate(144deg); }
.line-4 { transform: rotate(36deg); }
.line-5 { width: 22%; transform: rotate(90deg); }

.journey-grid, .priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.journey-card, .priority-grid article { min-width: 0; display: grid; align-content: start; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.card-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.journey-card p, .priority-grid p { color: var(--muted); font-size: var(--text-sm); }
.journey-card a { min-height: 44px; display: flex; align-items: center; width: fit-content; margin-top: auto; font-size: var(--text-sm); font-weight: 700; text-underline-offset: 3px; }
.availability-note { min-height: 44px; display: flex; align-items: center; margin-top: auto; color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.priorities { padding-block: var(--space-8); border-block: 1px solid var(--border); }
.priority-grid article { border: 0; border-left: 3px solid var(--development); border-radius: 0; padding-block: var(--space-3); background: transparent; }

.pilot-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-8); padding: var(--space-8); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.pilot-strip p:last-child { margin-top: var(--space-3); color: var(--muted); }
footer { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--space-4); }
footer a { display: inline-flex; align-items: center; text-underline-offset: 3px; }

@media (max-width: 760px) {
  main { gap: var(--space-12); padding-top: var(--space-8); }
  .hero, .pilot-strip { grid-template-columns: 1fr; align-items: start; gap: var(--space-5); }
  .journey-grid, .priority-grid { grid-template-columns: 1fr; }
  .engine { min-height: 0; grid-template-columns: 1fr; grid-template-areas: "core" "players" "training" "match" "review" "dashboard"; padding: var(--space-4); gap: var(--space-3); }
  .engine-core { min-height: 128px; }
  .engine-node { min-height: 92px; }
  .engine-lines { display: none; }
}

@media (max-width: 390px) {
  .site-header, main, footer { width: min(100% - 1.5rem, 1120px); }
  .brand small { max-width: 18ch; }
  .pilot-strip { padding: var(--space-5); }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
