/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* ─── DESIGN TOKENS ─── */
:root {
  /* Palette */
  --bg:          #fafaf7;
  --bg-alt:      #f1efe9;
  --bg-strong:   #e6e3da;
  --ink:         #0a0a0a;
  --ink-2:       #4a4a4a;
  --ink-3:       #8a8a82;
  --line:        #1a1a1a;
  --line-soft:   #cfcdc4;
  --blue:        #0047FF;
  --green:       #00C24A;
  --green-fluo:  #00FF66;
  --warn:        #D97500;
  --red:         #E60022;

  /* Dark section */
  --dark-bg:     #0a0a0a;
  --dark-ink:    #fafaf7;
  --dark-ink-2:  #cfcdc4;

  /* Layout */
  --max-width: 1100px;
  --radius:    0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
ul { list-style: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }

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

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn.primary {
  background: var(--ink);
  color: var(--green-fluo);
  border: 2px solid var(--ink);
}
.btn.primary:hover {
  background: #1a1a1a;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn.ghost:hover {
  background: var(--bg-alt);
}

.btn.large {
  padding: 14px 28px;
  font-size: 13px;
}

/* ─── SECTION LABELS ─── */
.section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.section-tag.light { color: var(--dark-ink-2); }

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 48px;
}

/* ─── NAV ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo-img {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.nav-links a:not(.btn):hover { color: var(--ink); }

.nav-cta {
  padding: 8px 16px !important;
  font-size: 12px !important;
}

/* Burger — mobile only */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ─── HERO ─── */
.hero {
  border-bottom: 2px solid var(--line);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1.5px solid var(--line-soft);
  padding: 4px 10px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero-title-accent {
  color: var(--blue);
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── MOCKUP ─── */
.hero-mockup {
  display: flex;
  justify-content: flex-end;
}
.mockup-window {
  background: var(--bg);
  border: 2px solid var(--line);
  overflow: hidden;
  width: 100%;
  max-width: 520px;
}
.mockup-titlebar {
  background: var(--bg-strong);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1.5px solid var(--line-soft);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green-dot { background: #28c840; }
.mockup-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 8px;
}

/* Topbar dans mockup */
.mockup-topbar {
  background: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-bottom: 1.5px solid #2a2a2a;
}
.mockup-topbar-brand { display: flex; align-items: center; gap: 4px; }
.mockup-sq { display: block; width: 8px; height: 8px; }
.mockup-sq.b { background: var(--green-fluo); }
.mockup-sq.g { background: var(--green-fluo); opacity: 0.5; }
.mockup-topbar-name {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fafaf7;
  text-transform: uppercase;
  margin-left: 4px;
}
.mockup-topbar-tabs { display: flex; gap: 2px; flex: 1; }
.mockup-tab {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8a82;
  padding: 4px 8px;
  cursor: default;
}
.mockup-tab.active {
  color: #fafaf7;
  border-bottom: 2px solid var(--blue);
}
.mockup-live-badge {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--red);
  text-transform: uppercase;
  padding: 2px 5px;
  border: 1px solid var(--red);
}

/* Match rows */
.mockup-content { padding: 0; }
.mockup-match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10px;
}
.mockup-match.alt { background: var(--bg-alt); }
.mockup-num {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-3);
  width: 22px;
  flex-shrink: 0;
}
.mockup-players {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mockup-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mockup-name.winner { color: var(--blue); font-weight: 700; }
.mockup-name.muted  { color: var(--ink-3); }
.mockup-score-val {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}
.mockup-score-val.live-score { color: var(--red); }
.mockup-score-val.muted { color: var(--ink-3); }
.mockup-status {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 5px;
  flex-shrink: 0;
}
.mockup-status.done    { background: var(--bg-strong); color: var(--ink-3); }
.mockup-status.live    { background: var(--red); color: #fff; }
.mockup-status.pending { background: transparent; color: var(--ink-3); border: 1px solid var(--line-soft); }

/* Stats strip */
.mockup-stats {
  display: flex;
  border-top: 1.5px solid var(--line-soft);
  background: var(--bg-alt);
}
.mockup-stat {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
}
.mockup-stat:last-child { border-right: none; }
.mockup-stat-num {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 2px;
}
.mockup-stat-num.blue-num  { color: var(--blue); }
.mockup-stat-num.green-num { font-size: 10px; color: var(--green); }
.mockup-stat-lbl {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── FEATURES ─── */
.features {
  padding: 96px 0;
  border-bottom: 2px solid var(--line);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--line);
}

.feature-card {
  padding: 32px 28px;
  border-right: 1.5px solid var(--line-soft);
  border-bottom: 1.5px solid var(--line-soft);
}
.feature-card:nth-child(4n) { border-right: none; }
.feature-card:nth-last-child(-n+4) { border-bottom: none; }

.feature-icon {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1;
}
.feature-icon.red-icon { color: var(--red); }

.feature-card h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ─── HOW IT WORKS ─── */
.how {
  padding: 96px 0;
  border-bottom: 2px solid var(--line);
  background: var(--bg-alt);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  flex: 1;
  padding: 32px;
  border: 2px solid var(--line);
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  padding: 0 8px;
  margin-top: 48px;
}

.step-number {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-fluo);
  background: var(--ink);
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 20px;
  line-height: 1;
}

.step h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--ink);
}
.step p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ─── FORMATS ─── */
.formats {
  padding: 96px 0;
  border-bottom: 2px solid var(--line);
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--line);
}

.format-card {
  padding: 28px 24px;
  border-right: 1.5px solid var(--line-soft);
  border-bottom: 1.5px solid var(--line-soft);
  position: relative;
}
.format-card:nth-child(3n) { border-right: none; }
.format-card:nth-last-child(-n+3) { border-bottom: none; }

.format-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.format-card p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}
.format-card.coming { opacity: 0.65; }
.coming-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1.5px solid var(--warn);
  padding: 2px 6px;
}

/* ─── DOWNLOAD ─── */
.download {
  background: var(--ink);
  color: var(--dark-ink);
  padding: 96px 0;
  border-bottom: 2px solid var(--line);
}

.download-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.download-text h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--dark-ink);
  margin-bottom: 20px;
  line-height: 1.05;
}

.download-sub {
  font-size: 15px;
  color: var(--dark-ink-2);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

/* Override btn colors inside dark section */
.download .btn.primary {
  background: var(--green-fluo);
  color: var(--ink);
  border-color: var(--green-fluo);
}
.download .btn.primary:hover { background: #00e85c; border-color: #00e85c; }
.download .btn.ghost {
  background: transparent;
  color: var(--dark-ink);
  border-color: #3a3a3a;
}
.download .btn.ghost:hover { border-color: var(--dark-ink-2); background: rgba(255,255,255,0.05); }

.download-note {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.7;
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dark-ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.source-link:hover { color: var(--green-fluo); }

/* Download card */
.download-card {
  border: 2px solid #2a2a2a;
  padding: 32px 28px;
  text-align: center;
  min-width: 180px;
}
.dl-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-bottom: 12px;
}
.dl-card-sq { display: block; width: 20px; height: 20px; }
.dl-card-sq.b { background: var(--dark-ink); border: 1px solid #3a3a3a; }
.dl-card-sq.g { background: var(--green-fluo); }

.dl-card-name {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--dark-ink);
  margin-bottom: 6px;
}
.dl-card-version {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.dl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.dl-card-tags span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-ink-2);
  border: 1px solid #3a3a3a;
  padding: 3px 7px;
}

/* ─── CHANGELOG ─── */
.changelog {
  padding: 96px 0;
  border-bottom: 2px solid var(--line);
  background: var(--bg-alt);
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 2px solid var(--line);
}

.changelog-entry {
  border-bottom: 1.5px solid var(--line-soft);
}
.changelog-entry:last-child { border-bottom: none; }

.changelog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  cursor: pointer;
  list-style: none;
  background: var(--bg);
  transition: background 0.12s;
}
.changelog-summary::-webkit-details-marker { display: none; }
.changelog-summary:hover { background: var(--bg-alt); }

details[open] > .changelog-summary { border-bottom: 1.5px solid var(--line-soft); }

.changelog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.changelog-version {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: uppercase;
}
.changelog-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}
.changelog-arrow {
  font-size: 20px;
  color: var(--ink-3);
  transition: transform 0.2s;
}
details[open] > .changelog-summary .changelog-arrow {
  transform: rotate(90deg);
}

.changelog-content {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-section { display: flex; flex-direction: column; gap: 8px; }

.changelog-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  margin-bottom: 4px;
}
.changelog-tag.new    { background: var(--blue);       color: #fff; }
.changelog-tag.fix    { background: var(--bg-strong);  color: var(--ink); border: 1px solid var(--line-soft); }
.changelog-tag.launch { background: var(--green-fluo); color: var(--ink); }

.changelog-content ul {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.changelog-content li {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  padding-left: 14px;
  position: relative;
}
.changelog-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-3);
  font-size: 12px;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--ink);
  color: var(--dark-ink);
  padding: 48px 0 40px;
  border-top: 2px solid #1a1a1a;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo-img {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
}
.footer-name {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--dark-ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--dark-ink); }

.footer-copy {
  font-size: 11px;
  color: #3a3a3a;
  line-height: 1.7;
}
.footer-copy a {
  color: #5a5a5a;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-copy a:hover { color: var(--dark-ink-2); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 24px;
    gap: 40px;
  }
  .hero-mockup { display: none; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card:nth-child(4n)   { border-right: revert; }
  .feature-card:nth-last-child(-n+4) { border-bottom: revert; }
  .feature-card:nth-child(2n)   { border-right: none; }
  .feature-card:nth-last-child(-n+2) { border-bottom: none; }

  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); padding: 4px 0; margin-top: 0; font-size: 24px; }
  .step { width: 100%; }

  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .format-card:nth-child(3n)   { border-right: revert; }
  .format-card:nth-last-child(-n+3) { border-bottom: revert; }
  .format-card:nth-child(2n)   { border-right: none; }
  .format-card:nth-last-child(-n+2) { border-bottom: none; }

  .download-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .download-card { display: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
    padding: 16px 24px 24px;
    z-index: 99;
  }
  .nav-links.open a:not(.btn) {
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links.open .nav-cta { margin-top: 16px; }

  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card:nth-child(n) { border-right: none; border-bottom: 1.5px solid var(--line-soft); }
  .feature-card:last-child { border-bottom: none; }

  .formats-grid { grid-template-columns: 1fr; }
  .format-card:nth-child(n) { border-right: none; border-bottom: 1.5px solid var(--line-soft); }
  .format-card:last-child { border-bottom: none; }

  .download-buttons { flex-direction: column; }
  .download-buttons .btn { width: 100%; justify-content: center; }

  .section-title { margin-bottom: 32px; }

  .features, .how, .formats, .download, .changelog { padding: 64px 0; }
}
