/* ============================================
   Football Strategy Club - Base Stylesheet
   ============================================ */

:root {
  --bg: #0c0e0c;
  --bg-alt: #141713;
  --bg-card: #191d18;
  --line: #2a2e28;
  --line-strong: #3d4238;
  --text: #eceee9;
  --text-dim: #a8afa2;
  --accent: #3ecf6e;
  --accent-dim: #234d33;
  --flag: #ffc633;
  --font-head: 'Oswald', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', -apple-system, sans-serif;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.3;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 3px solid var(--accent);
  background: var(--bg-alt);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  align-self: center;
  flex-shrink: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.breadcrumb .container {
  padding: 10px 24px;
  text-align: left;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--line-strong);
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .current { color: var(--accent); }
.breadcrumb.breadcrumb-footer {
  border-bottom: none;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.breadcrumb-footer + .site-footer {
  margin-top: 0;
}

/* ---------- Back to top (floating) ---------- */
.back-to-top {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 0.5s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.back-to-top:hover {
  background: var(--accent);
  color: #06110a;
  transform: translateX(-50%) translateY(-2px);
}
.back-to-top.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.back-to-top svg { width: 18px; height: 18px; display: block; }

/* ---------- Diagram zoom modal ---------- */
.diagram-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.diagram-modal.is-open { display: flex; }
.diagram-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 6, 0.85);
}
.diagram-modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}
.diagram-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.diagram-modal-close:hover { background: var(--accent); color: #06110a; }
.diagram-modal-close svg { width: 16px; height: 16px; display: block; }
.diagram-modal-inner { margin-top: 8px; }
.diagram-modal-inner svg { display: block; width: 100%; height: auto; }

.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Hamburger toggle (mobile) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  padding: 64px 0 48px;
  background:
    linear-gradient(180deg, rgba(62,207,110,0.06), transparent 60%);
}
.hero .eyebrow {
  color: var(--flag);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 18px;
}
.hero p.lead {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin: 0 0 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  border-radius: 2px;
}
.btn:hover { background: var(--accent); color: #06110a; text-decoration: none; }
.btn.solid { background: var(--accent); color: #06110a; }
.btn.solid:hover { background: #33b862; }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 10px;
  margin: 56px 0 28px;
}
.section-head h2 {
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.section-head .index {
  color: var(--accent);
  font-family: var(--font-head);
  margin-right: 10px;
}
.section-head a.more { font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Article cards ---------- */
.card-list { display: flex; flex-direction: column; }
.card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.card:first-child { padding-top: 0; }
.card .num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--line-strong);
}
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}
.card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--text-dim); font-size: 0.96rem; }
.card .meta { color: var(--text-dim); font-size: 0.8rem; margin-top: 10px; letter-spacing: 0.03em; }

/* ---------- Article page ---------- */
.article-head {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
}
.article-head .tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 16px;
}
.article-head h1 { font-size: 2.1rem; margin: 0 0 14px; }
.article-head .meta { color: var(--text-dim); font-size: 0.88rem; }

.article-body { max-width: 720px; margin: 40px auto 0; padding: 0 24px; }
.article-body h2 {
  font-size: 1.4rem;
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line-strong);
}
.article-body h3 { font-size: 1.1rem; margin: 30px 0 12px; color: var(--accent); }
.article-body p { margin: 0 0 18px; color: #d9dbd4; }
.article-body ul, .article-body ol { color: #d9dbd4; padding-left: 22px; margin-bottom: 18px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }

.callout {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.callout strong { color: var(--accent); }

.diagram {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  margin: 28px 0;
  text-align: center;
}
.diagram figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: left;
}

/* comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  font-size: 0.92rem;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.compare-table th {
  background: var(--bg-card);
  color: var(--accent);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}
.compare-table td { color: #d9dbd4; }

.article-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin: 56px auto 0;
  padding: 28px 0;
  max-width: 720px;
  text-align: center;
}
.article-nav a { color: var(--text-dim); font-size: 0.9rem; }
.article-nav a:hover { color: var(--accent); }

/* ---------- Page (about, list) ---------- */
.page-head {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 2.2rem; margin: 0 0 14px; }
.page-head p { color: var(--text-dim); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--accent);
  background: var(--bg-alt);
  margin-top: 80px;
  padding: 36px 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero h1,
  .article-head h1,
  .page-head h1 { font-size: 1.6rem; }
  .card { grid-template-columns: 1fr; }
  .card .num { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Shrink brand so it fits alongside the hamburger button on one line */
  .brand {
    font-size: 1.5rem;
    line-height: 1;
    gap: 4px;
    letter-spacing: 0.03em;
  }

  /* Hamburger menu */
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
}
