/* ===== Tokens ===== */
:root {
  --bg: #0b141c;
  --surface: #101c26;
  --surface-2: #16232f;
  --border: #223140;
  --border-soft: #1a2732;
  --text: #e7edf3;
  --text-dim: #8fa0b0;
  --text-faint: #5c6f80;
  --accent: #2c86ad;
  --accent-bright: #4db3dd;
  --accent-soft: rgba(44, 134, 173, 0.14);
  --good: #4ade80;
  --warn: #f0b155;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* subtle grain so the dark surface doesn't look flat/AI-default */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 20, 28, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand__mark {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent-bright);
  box-shadow: 0 0 12px rgba(77, 179, 221, 0.6);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.brand__sub { color: var(--text-dim); font-weight: 500; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

.status__dot--ok {
  background: var(--good);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 72px 24px 56px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 14px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.hero__sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 40px;
}

/* Signature element: manifest terminal */
.manifest {
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  overflow: hidden;
  box-shadow: 0 20px 60px -25px rgba(0, 0, 0, 0.6);
}

.manifest__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}

.manifest__dots { display: flex; gap: 6px; }
.manifest__dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  display: block;
}

.manifest__title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-left: 4px;
}

.manifest__body {
  margin: 0;
  padding: 18px 20px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  white-space: pre;
  overflow-x: auto;
}

.tk-muted { color: var(--text-faint); }
.tk-cmd { color: var(--text); }
.tk-flag { color: var(--accent-bright); }
.tk-key { color: var(--text-faint); display: inline-block; width: 100px; }
.tk-val { color: var(--text-dim); }
.tk-accent { color: var(--good); font-weight: 600; }

.cursor {
  display: inline-block;
  color: var(--accent-bright);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===== Downloads ===== */
.downloads { padding: 20px 24px 64px; position: relative; z-index: 1; }

.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 6px;
}
.section-head__note { color: var(--text-dim); margin: 0; font-size: 14.5px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card--recommended {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.card__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__icon::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--accent-bright);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.card__icon[data-icon="windows"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5.5 10.5 4.4V11.4H3zM11.4 4.3 21 3V11.3H11.4zM3 12.6H10.5V19.7L3 18.6zM11.4 12.6H21V21L11.4 19.7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5.5 10.5 4.4V11.4H3zM11.4 4.3 21 3V11.3H11.4zM3 12.6H10.5V19.7L3 18.6zM11.4 12.6H21V21L11.4 19.7z'/%3E%3C/svg%3E");
}
.card__icon[data-icon="android"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5v6.4a1 1 0 0 0 1 1h.9v3a1.3 1.3 0 0 0 2.6 0v-3h2v3a1.3 1.3 0 0 0 2.6 0v-3h.9a1 1 0 0 0 1-1V8.5zM8.9 4.6 7.6 2.7a.4.4 0 1 0-.7.4l1.3 1.9A6.9 6.9 0 0 0 5 11.5h14a6.9 6.9 0 0 0-3.2-6.5l1.3-1.9a.4.4 0 1 0-.7-.4l-1.3 1.9a7.6 7.6 0 0 0-5.2 0zM9 8.3a.7.7 0 1 1 0-1.5.7.7 0 0 1 0 1.5zm6 0a.7.7 0 1 1 0-1.5.7.7 0 0 1 0 1.5zM4 12.6a1.2 1.2 0 0 0-1.2 1.2v4.8a1.2 1.2 0 0 0 2.4 0v-4.8A1.2 1.2 0 0 0 4 12.6zm16 0a1.2 1.2 0 0 0-1.2 1.2v4.8a1.2 1.2 0 0 0 2.4 0v-4.8a1.2 1.2 0 0 0-1.2-1.2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 8.5v6.4a1 1 0 0 0 1 1h.9v3a1.3 1.3 0 0 0 2.6 0v-3h2v3a1.3 1.3 0 0 0 2.6 0v-3h.9a1 1 0 0 0 1-1V8.5zM8.9 4.6 7.6 2.7a.4.4 0 1 0-.7.4l1.3 1.9A6.9 6.9 0 0 0 5 11.5h14a6.9 6.9 0 0 0-3.2-6.5l1.3-1.9a.4.4 0 1 0-.7-.4l-1.3 1.9a7.6 7.6 0 0 0-5.2 0zM9 8.3a.7.7 0 1 1 0-1.5.7.7 0 0 1 0 1.5zm6 0a.7.7 0 1 1 0-1.5.7.7 0 0 1 0 1.5zM4 12.6a1.2 1.2 0 0 0-1.2 1.2v4.8a1.2 1.2 0 0 0 2.4 0v-4.8A1.2 1.2 0 0 0 4 12.6zm16 0a1.2 1.2 0 0 0-1.2 1.2v4.8a1.2 1.2 0 0 0 2.4 0v-4.8a1.2 1.2 0 0 0-1.2-1.2z'/%3E%3C/svg%3E");
}
.card__icon[data-icon="linux"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1.4 0 2.4 1.6 2.4 3.5 0 1.1-.3 1.7-.3 2.6 0 .5.2.9.5 1.4.6.9 1.9 2.1 1.9 4 0 1-.4 1.7-.9 2.3.2.4.3.8.3 1.2 0 1.7-1.8 2.3-3.1 2.3H11a3 3 0 0 1-3-2.9c0-.5.1-.9.3-1.3-.5-.6-.8-1.4-.8-2.2 0-1.6.9-2.7 1.6-3.6.5-.7.9-1.3.9-2 0-.9-.3-1.5-.3-2.7C9.7 3.5 10.7 2 12 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1.4 0 2.4 1.6 2.4 3.5 0 1.1-.3 1.7-.3 2.6 0 .5.2.9.5 1.4.6.9 1.9 2.1 1.9 4 0 1-.4 1.7-.9 2.3.2.4.3.8.3 1.2 0 1.7-1.8 2.3-3.1 2.3H11a3 3 0 0 1-3-2.9c0-.5.1-.9.3-1.3-.5-.6-.8-1.4-.8-2.2 0-1.6.9-2.7 1.6-3.6.5-.7.9-1.3.9-2 0-.9-.3-1.5-.3-2.7C9.7 3.5 10.7 2 12 2z'/%3E%3C/svg%3E");
}
.card__icon[data-icon="macos"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 12.4c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.7-1.8-3.3-1.8-1.4-.1-2.7.8-3.4.8-.7 0-1.8-.8-3-.8-1.5 0-2.9.9-3.7 2.3-1.6 2.7-.4 6.8 1.1 9 .8 1.1 1.7 2.4 2.9 2.3 1.2 0 1.6-.7 3-.7s1.8.7 3 .7c1.3 0 2.1-1.1 2.8-2.3.9-1.3 1.3-2.6 1.3-2.6-.1 0-2.6-1-2.7-3.4zM15 4.6c.6-.7 1-1.7.9-2.6-.9 0-1.9.6-2.5 1.3-.5.6-1 1.6-.9 2.6 1 0 1.9-.6 2.5-1.3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 12.4c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.7-1.8-3.3-1.8-1.4-.1-2.7.8-3.4.8-.7 0-1.8-.8-3-.8-1.5 0-2.9.9-3.7 2.3-1.6 2.7-.4 6.8 1.1 9 .8 1.1 1.7 2.4 2.9 2.3 1.2 0 1.6-.7 3-.7s1.8.7 3 .7c1.3 0 2.1-1.1 2.8-2.3.9-1.3 1.3-2.6 1.3-2.6-.1 0-2.6-1-2.7-3.4zM15 4.6c.6-.7 1-1.7.9-2.6-.9 0-1.9.6-2.5 1.3-.5.6-1 1.6-.9 2.6 1 0 1.9-.6 2.5-1.3z'/%3E%3C/svg%3E");
}

.card__title {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0;
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 3px 0 0;
}

.card__badge {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent-bright);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, transform 0.1s ease;
}
.card__cta:hover { background: var(--accent-bright); }
.card__cta:active { transform: scale(0.98); }
.card__cta[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--text-faint);
  cursor: not-allowed;
  pointer-events: none;
}

.card__size {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}

.card__hash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 11px;
}
.card__hash:hover { border-color: var(--text-faint); color: var(--text); }
.card__hash-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.card__note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0;
  line-height: 1.5;
}
.card__note--warn { color: var(--warn); }

/* ===== Split panels ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 24px 90px;
  position: relative;
  z-index: 1;
}

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

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 16px;
}

.panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: var(--text-dim);
}
.panel__list strong { color: var(--text); }

.changelog {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.changelog li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-dim);
}
.changelog li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
}
.changelog__empty { color: var(--text-faint); }
.changelog__empty::before { display: none; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 22px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer__dim { font-family: var(--font-mono); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Focus visibility ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* ===== Mobile ===== */
@media (max-width: 560px) {
  .hero { padding: 48px 20px 40px; }
  .topbar__inner { height: 54px; }
  .status span:not(.status__dot) { display: none; }
}
