/* ─── Design tokens (health_check dark-mode system) ─────────────────────── */
:root {
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Backgrounds */
  --color-bg-app: #08111f;
  --color-bg-shell: #0b1220;
  --color-bg-surface: #101a29;
  --color-bg-surface-elevated: #132033;
  --color-bg-surface-muted: #1a2940;
  --color-bg-header: rgba(8, 17, 31, 0.82);

  /* Text */
  --color-text-primary: #e2e8f0;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-faint: #64748b;
  --color-text-on-accent: #020617;

  /* Borders */
  --color-border-default: #243448;
  --color-border-strong: #31465f;
  --color-border-focus: #38bdf8;
  --color-border-accent: rgba(34, 211, 238, 0.4);

  /* Accent — cyan */
  --color-accent-primary: #22d3ee;
  --color-accent-primary-hover: #67e8f9;
  --color-accent-primary-soft: rgba(34, 211, 238, 0.14);
  --color-accent-primary-soft-strong: rgba(34, 211, 238, 0.22);

  /* Accent — blue */
  --color-accent-secondary: #60a5fa;
  --color-accent-secondary-soft: rgba(96, 165, 250, 0.16);

  /* Status */
  --color-success: #39d7a0;
  --color-success-soft: rgba(57, 215, 160, 0.14);
  --color-success-border: rgba(57, 215, 160, 0.32);
  --color-warning: #fbbf24;
  --color-warning-soft: rgba(251, 191, 36, 0.14);
  --color-warning-border: rgba(251, 191, 36, 0.28);
  --color-danger: #fb7185;
  --color-danger-soft: rgba(251, 113, 133, 0.14);
  --color-info: #60a5fa;
  --color-info-soft: rgba(96, 165, 250, 0.16);
  --color-purple-soft: rgba(167, 139, 250, 0.14);
  --color-purple-border: rgba(167, 139, 250, 0.32);

  /* Shadows */
  --shadow-1: 0 2px 0 rgba(2, 6, 23, 0.35);
  --shadow-2: 0 1px 3px rgba(2, 6, 23, 0.3);
  --shadow-3: 0 4px 6px -1px rgba(2, 6, 23, 0.35);
  --shadow-4: 0 10px 25px -5px rgba(2, 6, 23, 0.45);
  --shadow-soft: 0 12px 26px rgba(2, 6, 23, 0.34);
  --shadow-focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.2);

  /* Ambient RGB values for gradients */
  --fx-ambient-primary-rgb: 34, 211, 238;
  --fx-ambient-secondary-rgb: 96, 165, 250;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--color-bg-app);
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text-primary);
  background:
    radial-gradient(circle at 12% 8%, rgba(var(--fx-ambient-primary-rgb), 0.1), transparent 36%),
    radial-gradient(circle at 88% 16%, rgba(var(--fx-ambient-secondary-rgb), 0.08), transparent 32%),
    var(--color-bg-app);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; }

/* ─── Container ─────────────────────────────────────────────────────────── */
.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--color-border-default);
  background: color-mix(in srgb, var(--color-bg-app) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 0.96rem;
  color: var(--color-text-primary);
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 750;
  padding: 9px 12px;
  border-radius: 7px;
  transition: color 0.16s, background 0.16s;
}

.nav a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-surface-muted);
}

.nav-download {
  color: var(--color-accent-primary) !important;
  font-weight: 800 !important;
  background: var(--color-accent-primary-soft) !important;
}

.nav-download:hover {
  background: var(--color-accent-primary-soft-strong) !important;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  min-height: calc(100vh - 72px);
  padding: 60px 0 72px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-copy { max-width: 660px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-accent-primary);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 860;
  line-height: 0.96;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

h1 .h1-accent {
  background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 0 0 32px;
  color: var(--color-text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 540px;
}

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

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.94rem;
  text-decoration: none;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
  cursor: pointer;
}

.btn-primary {
  color: var(--color-text-on-accent);
  background: var(--color-accent-primary);
  border: 1px solid var(--color-accent-primary);
}

.btn-primary:hover {
  background: var(--color-accent-primary-hover);
  border-color: var(--color-accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-4);
}

.btn-secondary {
  color: var(--color-text-secondary);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
}

.btn-secondary:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-4);
}

.btn-download {
  width: 100%;
  min-height: 48px;
  font-size: 0.95rem;
}

/* ─── Release strip ──────────────────────────────────────────────────────── */
.release-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background: var(--color-bg-surface);
  overflow: hidden;
  max-width: 560px;
}

.release-strip div {
  padding: 14px 18px;
}

.release-strip div + div {
  border-left: 1px solid var(--color-border-default);
}

.release-strip dt {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.release-strip dd {
  margin: 5px 0 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

/* ─── Product panel (hero right) ─────────────────────────────────────────── */
.product-panel {
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(var(--fx-ambient-primary-rgb), 0.09), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 18, 34, 0.78);
  box-shadow:
    0 24px 80px -48px rgba(34, 211, 238, 0.22),
    0 24px 60px -40px rgba(2, 6, 23, 0.96),
    var(--shadow-soft);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-default);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-bar span:nth-child(1) { background: #ef4444; }
.window-bar span:nth-child(2) { background: #f59e0b; }
.window-bar span:nth-child(3) { background: #22c55e; }

.window-bar-title {
  margin-left: auto;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.app-preview {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.metric-block {
  padding: 18px 20px;
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background: var(--color-bg-surface);
}

.metric-label {
  display: block;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-value.color-success { color: var(--color-success); }
.metric-value.color-cyan    { color: var(--color-accent-primary); }
.metric-value.color-warn    { color: var(--color-warning); }

.metric-sub {
  display: block;
  margin-top: 6px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
}

/* ─── Section commons ────────────────────────────────────────────────────── */
.section {
  padding: 84px 0;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.section + .section {
  border-top: 1px solid var(--color-border-default);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent-primary);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.85rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 12px 0 0;
}

/* ─── Why section ────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-3);
  position: relative;
}

.info-card.is-muted {
  opacity: 0.58;
}

.info-card.is-featured {
  border-color: var(--color-border-accent);
  background: color-mix(in srgb, var(--color-bg-surface) 92%, rgba(34, 211, 238, 0.08));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 12px 28px -8px rgba(34, 211, 238, 0.12),
    var(--shadow-3);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.card-badge.badge-muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-faint);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card-badge.badge-warn {
  background: var(--color-warning-soft);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.card-badge.badge-success {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.info-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.card-icon.icon-muted  { background: rgba(148, 163, 184, 0.1); }
.card-icon.icon-warn   { background: var(--color-warning-soft); }
.card-icon.icon-accent { background: var(--color-accent-primary-soft); color: var(--color-accent-primary); }

/* Feature cards icon row */
.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-accent-primary-soft);
  color: var(--color-accent-primary);
  margin-bottom: 18px;
}

/* ─── Profiles section ───────────────────────────────────────────────────── */
.profiles-table {
  display: grid;
  gap: 8px;
}

.profile-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto auto minmax(100px, 180px);
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background: var(--color-bg-surface);
  transition: border-color 0.16s, background 0.16s;
}

.profile-row:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-surface-elevated);
}

.profile-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-dot.dot-cyan   { background: var(--color-accent-primary); box-shadow: 0 0 6px rgba(34,211,238,.5); }
.profile-dot.dot-warn   { background: var(--color-warning);        box-shadow: 0 0 6px rgba(251,191,36,.5); }
.profile-dot.dot-purple { background: #a78bfa;                     box-shadow: 0 0 6px rgba(167,139,250,.5); }
.profile-dot.dot-green  { background: var(--color-success);        box-shadow: 0 0 6px rgba(57,215,160,.5); }
.profile-dot.dot-blue   { background: var(--color-accent-secondary); box-shadow: 0 0 6px rgba(96,165,250,.5); }

.profile-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.profile-block {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.profile-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.profile-badge.badge-random   { background: var(--color-accent-primary-soft); color: var(--color-accent-primary); }
.profile-badge.badge-seq      { background: var(--color-success-soft); color: var(--color-success); }
.profile-badge.badge-mixed    { background: var(--color-info-soft); color: var(--color-info); }
.profile-badge.badge-seq-warn { background: var(--color-warning-soft); color: var(--color-warning); }

.profile-queue {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--color-text-faint);
  white-space: nowrap;
}

/* Animated bar */
.bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--color-border-default);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.fill-cyan   { background: var(--color-accent-primary); }
.bar-fill.fill-warn   { background: var(--color-warning); }
.bar-fill.fill-purple { background: #a78bfa; }
.bar-fill.fill-green  { background: var(--color-success); }
.bar-fill.fill-blue   { background: var(--color-accent-secondary); }

/* ─── Features section ───────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ─── Download section ───────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.download-card {
  padding: 28px;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.download-card.is-recommended {
  border-color: var(--color-border-accent);
  background: color-mix(in srgb, var(--color-bg-surface) 92%, rgba(34, 211, 238, 0.08));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 16px 40px -12px rgba(34, 211, 238, 0.15),
    var(--shadow-3);
}

.download-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-bg-surface-muted);
  font-size: 1.4rem;
}

.download-card.is-recommended .download-card-icon {
  background: var(--color-accent-primary-soft);
}

.download-card h3 {
  font-size: 1.06rem;
  font-weight: 800;
  margin: 0;
  color: var(--color-text-primary);
}

.download-card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.download-sha {
  display: grid;
  gap: 4px;
}

.download-sha-label {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.download-sha-value {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--color-border-default);
  color: var(--color-text-faint);
  font-size: 0.88rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

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

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

/* ─── Scroll-driven animations ───────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .bar-fill { transition: none; }
  .kicker-dot { animation: none; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

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

@media (max-width: 780px) {
  .site-header {
    padding: 0 20px;
  }

  .nav {
    display: none;
  }

  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); }

  .release-strip {
    grid-template-columns: 1fr;
  }

  .release-strip div + div {
    border-left: 0;
    border-top: 1px solid var(--color-border-default);
  }

  .profile-row {
    grid-template-columns: 12px 1fr auto;
  }

  .profile-block,
  .profile-badge,
  .profile-queue {
    display: none;
  }

  .section { padding: 56px 0; }
}
