/* ─────────────────────────────────────────────────────────────
   Pitchboard — static content site (landing, guide, formations).
   Plain CSS, no JS. Light by default, dark via prefers-color-scheme.
   Brand: pitch green + the tool's blue (#2f6bff) for CTAs.
   ───────────────────────────────────────────────────────────── */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", system-ui, sans-serif;

  --bg: #ffffff;
  --bg-soft: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --border: #e5e8ec;
  --border-strong: #d6dbe1;

  --text: #18202c;
  --text-strong: #0b1017;
  --text-muted: #5c6675;
  --text-faint: #8b94a1;

  --accent: #2f6bff;
  --accent-hover: #205ef2;
  --accent-fg: #ffffff;
  --accent-soft: #eaf1ff;

  --pitch: #1f8049;
  --pitch-deep: #145f37;
  --pitch-line: rgba(255, 255, 255, 0.85);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 26px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);

  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d13;
    --bg-soft: #0d111a;
    --surface: #10141f;
    --surface-2: #0c1018;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #d8dce4;
    --text-strong: #f2f4f8;
    --text-muted: #8b93a1;
    --text-faint: #626b78;

    --accent: #3d76ff;
    --accent-hover: #5486ff;
    --accent-soft: rgba(47, 107, 255, 0.16);

    --pitch: #1c7644;
    --pitch-deep: #12512f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pitch);
  margin-bottom: 14px;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: #4fb37a; } }

h1, h2, h3 { color: var(--text-strong); line-height: 1.25; letter-spacing: -0.02em; }
h2.section-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 14px; }
.section-lead { font-size: 17px; color: var(--text-muted); max-width: 640px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 17px; color: var(--text-strong);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .ball { font-size: 20px; }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a {
  color: var(--text-muted); font-weight: 600; font-size: 14.5px;
  padding: 8px 12px; border-radius: var(--r-sm);
}
.nav a:hover { color: var(--text-strong); background: var(--surface-2); text-decoration: none; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 14px 22px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--text-strong); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: 72px 0 84px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 850; margin-bottom: 20px; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-muted); margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { font-size: 13.5px; color: var(--text-faint); margin-top: 18px; }

.hero-visual {
  position: relative;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Pitch SVG helpers ──────────────────────────────────────── */
.pitch-svg { width: 100%; height: auto; display: block; background: var(--pitch); }

/* ── Feature grid ───────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .ic {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
}
.card h3 { font-size: 18px; font-weight: 750; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* ── Audience / list rows ───────────────────────────────────── */
.rows { display: grid; gap: 14px; }
.row {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 20px;
}
.row .badge {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--pitch) 15%, transparent); color: var(--pitch);
}
@media (prefers-color-scheme: dark) { .row .badge { color: #61c088; } }
.row h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.row p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

/* ── Steps ──────────────────────────────────────────────────── */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.step .num {
  counter-increment: step;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 800; font-size: 17px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; font-weight: 750; margin-bottom: 5px; }
.step p { font-size: 15px; color: var(--text-muted); margin: 0; }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; max-width: 780px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-weight: 700; font-size: 16px; color: var(--text-strong);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--text-faint); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--text-muted); font-size: 15px; }

/* ── Formation cards ────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.form-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.form-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); text-decoration: none; }
.form-card .mini { border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.form-card .name { font-size: 20px; font-weight: 800; color: var(--text-strong); letter-spacing: -0.01em; }
.form-card .desc { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* ── Content prose (guide / formation body) ─────────────────── */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 44px 0 14px; }
.prose h3 { font-size: 19px; font-weight: 750; margin: 28px 0 10px; }
.prose p { margin: 0 0 16px; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; color: var(--text); }
.prose li::marker { color: var(--pitch); }
.prose strong { color: var(--text-strong); font-weight: 700; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--r-md); padding: 18px 20px; margin: 24px 0;
}
.callout .ic { font-size: 20px; }
.callout p { margin: 0; font-size: 15px; color: var(--text); }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.pc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px 22px;
}
.pc h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pc.pros h3 { color: var(--pitch); }
@media (prefers-color-scheme: dark) { .pc.pros h3 { color: #61c088; } }
.pc.cons h3 { color: #d9534f; }
.pc ul { margin: 0; padding-left: 20px; }
.pc li { font-size: 14.5px; color: var(--text-muted); }

/* ── Player roles (formation pages) ─────────────────────────── */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 8px; }
.role {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px 18px;
}
.role-pos {
  font-size: 14px; font-weight: 800; color: var(--text-strong); margin-bottom: 5px;
  display: inline-block;
}
.role p { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.7; }

/* ── Matchups (strong / weak against) ───────────────────────── */
.matchups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.mu {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px 22px;
  border-left: 4px solid var(--border-strong);
}
.mu h3 { margin: 0 0 8px; font-size: 15.5px; }
.mu p { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.7; }
.mu.up { border-left-color: var(--pitch); }
.mu.up h3 { color: var(--pitch); }
.mu.down { border-left-color: #d9534f; }
.mu.down h3 { color: #d9534f; }
@media (prefers-color-scheme: dark) { .mu.up h3 { color: #61c088; } }

/* ── Wide auto-fill card grid (hub) ─────────────────────────── */
.form-grid--wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ── Glossary ───────────────────────────────────────────────── */
.term-group { margin-top: 40px; }
.term-group > h2 {
  font-size: 22px; font-weight: 800; margin-bottom: 6px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.term-group > p.group-lead { color: var(--text-muted); font-size: 15px; margin: 0 0 18px; }
.term-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.term {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.term:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.term dt {
  font-size: 16px; font-weight: 800; color: var(--text-strong); margin-bottom: 6px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.term dt .en { font-size: 12.5px; font-weight: 600; color: var(--text-faint); letter-spacing: 0.01em; }
.term dd { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.72; }

/* ── Jump / anchor nav (glossary categories) ────────────────── */
.jumpnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.jumpnav a {
  font-size: 13.5px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 999px;
}
.jumpnav a:hover { color: var(--text-strong); border-color: var(--border-strong); text-decoration: none; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.crumbs { font-size: 13.5px; color: var(--text-faint); margin-bottom: 22px; }
.crumbs a { color: var(--text-muted); }
.crumbs span { margin: 0 8px; }

/* ── CTA band ───────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--pitch), var(--pitch-deep));
  border-radius: var(--r-xl); padding: 56px 40px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.9); font-size: 17px; margin-bottom: 26px; }
.cta-band .btn-primary { background: #fff; color: var(--pitch-deep); }
.cta-band .btn-primary:hover { background: #f0f2f0; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px; background: var(--bg-soft);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: 14.5px; padding: 4px 0; }
.footer-grid a:hover { color: var(--text-strong); }
.footer-grid p { color: var(--text-muted); font-size: 14.5px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; font-size: 13.5px; color: var(--text-faint); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 60px; }
  .grid-3, .grid-2, .form-grid, .pros-cons, .footer-grid { grid-template-columns: 1fr; }
  .nav a:not(.nav-cta) { display: none; }
  .cta-band { padding: 44px 24px; }
}
