/* ─── Tokens (aligned with Raven app) ───────────────────────────────────── */
:root {
  --bg:        #0c1222;
  --bg-elevated: #141c2e;
  --surface:   #1a2438;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --accent:    #3b82f6;
  --accent-dim: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --radius:    12px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

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

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

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 18, 34, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.brand:hover { text-decoration: none; opacity: 0.9; }

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.backlink {
  font-size: 0.875rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.backlink:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 120%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 32ch;
  margin-bottom: 32px;
}

.version-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, var(--accent-dim) 100%);
}

.hero-visual img {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

/* ─── Downloads ─────────────────────────────────────────────────────────── */
.downloads {
  padding: 0 0 80px;
}

.downloads h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.downloads .section-lead {
  color: var(--muted);
  margin-bottom: 28px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.download-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.download-card .platform {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.download-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.download-card p {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
}

.btn-download:hover {
  background: #2563eb;
  text-decoration: none;
}

.btn-download.disabled {
  background: var(--surface);
  color: var(--muted);
  pointer-events: none;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--muted);
}

.btn-secondary:hover { color: var(--accent); }

/* ─── Features ──────────────────────────────────────────────────────────── */
.features {
  padding: 64px 0 80px;
  border-top: 1px solid var(--border);
}

.features h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  padding: 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature p {
  font-size: 0.875rem;
  color: var(--muted);
}

.feature code {
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--text);
  font-weight: 500;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual { max-height: 240px; }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}
