/* ── Shiftmans ── */

:root {
  --bg: #0c0c0e;
  --surface: #131316;
  --border: #1e1e24;
  --text: #d4d4d8;
  --muted: #71717a;
  --dim: #3f3f46;
  --accent: #004db8;
  --accent2: #0038b8;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 56px;
  background: rgba(12,12,14,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-right a { font-size: 0.88rem; color: var(--muted); transition: color 0.15s; }
.nav-right a:hover { color: var(--text); }
.join-btn {
  background: var(--accent); color: #fff !important; padding: 0.35rem 0.9rem;
  border-radius: 6px; font-weight: 600; font-size: 0.85rem; transition: background 0.15s;
}
.join-btn:hover { background: var(--accent2); }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 0; width: 24px; height: 18px; position: relative; }
.burger span, .burger::before, .burger::after {
  content: ''; display: block; width: 100%; height: 2px; background: var(--muted); border-radius: 1px;
  position: absolute; left: 0; transition: 0.25s;
}
.burger span { top: 8px; }
.burger::before { top: 0; }
.burger::after { bottom: 0; }
.burger.active span { opacity: 0; }
.burger.active::before { top: 8px; transform: rotate(45deg); }
.burger.active::after { bottom: 8px; transform: rotate(-45deg); }

/* ── Intro ── */
main { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }
.intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  padding: 8rem 0 5rem; min-height: 90vh;
}
.tag {
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1rem;
}
.intro h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1.2rem; }
.desc { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 2rem; max-width: 440px; }
.intro-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-fill {
  display: inline-block; padding: 0.6rem 1.4rem; background: var(--accent);
  color: #fff; border-radius: 6px; font-weight: 600; font-size: 0.9rem; transition: 0.15s;
}
.btn-fill:hover { background: var(--accent2); }
.btn-outline {
  display: inline-block; padding: 0.6rem 1.4rem; border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: 0.15s;
}
.btn-outline:hover { border-color: var(--muted); color: var(--text); }

/* Terminal mockup */
.terminal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; font-family: var(--mono); font-size: 0.82rem; line-height: 1.7;
}
.terminal-bar {
  display: flex; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.terminal-bar span:first-child { background: #ef4444; }
.terminal-bar span:nth-child(2) { background: #eab308; }
.terminal-bar span:nth-child(3) { background: #22c55e; }
.terminal-body { padding: 1rem 1.2rem; }
.terminal-body p { margin: 0; }
.t-dim { color: var(--dim); font-style: normal; }
.t-ok { color: #22c55e; }

/* ── Sections ── */
section { padding: 5rem 0; }
section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.section-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 2.5rem; max-width: 480px; }

/* ── Tournaments ── */
#tournaments { border-top: 1px solid var(--border); }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.t-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.2rem; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.t-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.t-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.t-name { font-weight: 600; font-size: 1rem; }
.t-status {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 4px;
}
.st-open { background: rgba(34,197,94,0.12); color: #22c55e; }
.st-closed { background: rgba(59,130,246,0.12); color: #60a5fa; }
.st-cancelled { background: rgba(113,113,122,0.12); color: #71717a; }
.t-card-meta { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); }
.t-prize { color: #eab308; font-weight: 600; }
.t-card-time { font-size: 0.78rem; color: var(--dim); margin-top: 0.4rem; font-family: var(--mono); }
.t-loading, .t-empty { color: var(--dim); font-size: 0.9rem; padding: 2rem 0; }

/* ── How it works ── */
#how { border-top: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.step {
  position: relative; padding: 1.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.step-num {
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
  font-weight: 700; margin-bottom: 0.6rem;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* ── Ranks ── */
#ranks { border-top: 1px solid var(--border); }
.rank-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 520px; }
.rank {
  display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  border-left: 3px solid var(--rc);
  transition: border-color 0.15s;
}
.rank:hover { border-color: var(--rc); }
.rank-name { font-size: 1.4rem; font-weight: 700; color: var(--rc); width: 28px; text-align: center; }
.rank-detail { display: flex; flex-direction: column; }
.rank-detail span:first-child { font-family: var(--mono); font-size: 0.82rem; color: var(--text); }
.rank-label { font-size: 0.78rem; color: var(--dim); }

/* ── Footer ── */
footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 2rem; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--dim);
  max-width: 1040px; margin: 0 auto;
}
footer a:hover { color: var(--text); }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-content {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 2rem; max-width: 600px; width: 90%; max-height: 80vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 1rem; background: none; border: none;
  color: var(--muted); font-size: 1.5rem; cursor: pointer; transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }
.modal-content h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.modal-content h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 1.5rem 0 0.75rem; }
.t-detail-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.85rem; }
.t-time-line { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
.t-players { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.t-player {
  font-size: 0.82rem; background: var(--bg); border: 1px solid var(--border);
  padding: 0.25rem 0.6rem; border-radius: 4px;
}
.t-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.t-team {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.t-team-name { font-weight: 600; font-size: 0.85rem; color: var(--accent); margin-bottom: 0.25rem; }
.t-team-player { font-size: 0.82rem; color: var(--muted); }
.t-bracket { display: flex; flex-direction: column; gap: 0.5rem; }
.t-match {
  display: flex; justify-content: space-between; padding: 0.5rem 0.75rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem;
}
.t-match span:first-child { color: var(--dim); font-family: var(--mono); font-size: 0.78rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .burger { display: block; }
  .nav-right {
    position: fixed; top: 56px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem 2rem; gap: 1rem;
    transform: translateY(-120%); transition: transform 0.25s;
  }
  .nav-right.open { transform: translateY(0); }
  .intro { grid-template-columns: 1fr; padding: 7rem 0 3rem; }
  .intro-right { display: none; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .intro h1 { font-size: 1.8rem; }
}