:root {
  --bg: #0d0f14;
  --surface: #13161d;
  --border: #232838;
  --border-hover: #3a3f55;
  --accent: #e8734a;
  --accent-hover: #ff9370;
  --accent2: #4a9ee8;
  --accent3: #6bcf7f;
  --text: #e8eaf0;
  --muted: #7a8099;
  --step-num: #2a2f40;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 115, 74, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 115, 74, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── HEADER ── */
header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 26px;
  height: 26px;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

h1 span {
  color: var(--accent);
}

.subtitle {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  max-width: 520px;
  line-height: 1.6;
}

/* ── SECTIONS ── */
section {
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.section-label .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(232, 115, 74, 0.1);
  border: 1px solid rgba(232, 115, 74, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.section-label h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── DOWNLOAD CARDS ── */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}

.dl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.dl-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.dl-card.win::after {
  background: radial-gradient(circle at 50% 0%, rgba(74, 158, 232, 0.08), transparent 70%);
}

.dl-card.mac::after {
  background: radial-gradient(circle at 50% 0%, rgba(232, 115, 74, 0.08), transparent 70%);
}

.dl-card.linux::after {
  background: radial-gradient(circle at 50% 0%, rgba(107, 207, 127, 0.08), transparent 70%);
}

.dl-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.dl-card:hover::after {
  opacity: 1;
}

.dl-os-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.win .dl-os-icon {
  background: rgba(74, 158, 232, 0.15);
  color: var(--accent2);
}

.mac .dl-os-icon {
  background: rgba(232, 115, 74, 0.15);
  color: var(--accent);
}

.linux .dl-os-icon {
  background: rgba(107, 207, 127, 0.15);
  color: var(--accent3);
}

.dl-os-icon svg {
  width: 22px;
  height: 22px;
}

.dl-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.dl-card-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.dl-arrow {
  margin-top: auto;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}

.dl-card:hover .dl-arrow {
  color: var(--text);
  gap: 10px;
}

.dl-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}

.dl-all:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* ── STEPS ── */
.steps {
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0 20px;
  position: relative;
  counter-increment: step;
}

/* vertical line */
.step:not(:last-child) .step-num-col::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 52px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.step-num-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 4px;
}

.step-num {
  width: 38px;
  height: 38px;
  background: var(--step-num);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  z-index: 1;
}

.step-num::before {
  content: counter(step);
}

.step-body {
  padding-bottom: 36px;
}

.step:last-child .step-body {
  padding-bottom: 0;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  padding-top: 6px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 400;
}

.step-desc + .step-desc {
  margin-top: 12px;
}

.step-desc strong,
.note strong {
  color: var(--text);
  font-weight: 600;
}

.step-desc strong.text-ok {
  color: var(--accent3);
}

.step-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 14px;
}

.note {
  margin-top: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  background: rgba(232, 115, 74, 0.06);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

/* code / path highlight */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(232, 115, 74, 0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

code.break {
  word-break: break-all;
}

/* ── COPY BUTTON ── */
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  background: rgba(232, 115, 74, 0.1);
  border: 1px solid var(--accent);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}

.copy-button:hover {
  background: rgba(232, 115, 74, 0.2);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.copy-button:active {
  transform: translateY(0);
}

.copy-button.copied {
  color: var(--accent3);
  border-color: var(--accent3);
  background: rgba(107, 207, 127, 0.1);
}

/* offscreen textarea for the clipboard fallback in script.js */
.clipboard-fallback {
  position: fixed;
  top: 0;
  left: -9999px;
  opacity: 0;
}

/* ── FOOTER ── */
footer {
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* animate on load */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header,
section {
  animation: fadeUp 0.5s ease both;
}

section:nth-child(1) {
  animation-delay: 0.08s;
}

section:nth-child(2) {
  animation-delay: 0.16s;
}

footer {
  animation: fadeUp 0.5s 0.24s ease both;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .dl-card:hover,
  .copy-button:hover {
    transform: none;
  }
}
