:root {
  color-scheme: dark;
  --bg: #1c1b19;
  --panel: #232220;
  --panel-2: #2b2926;
  --line: #3c3a35;
  --muted: #8a877d;
  --text: #f5f4ef;
  --soft: #dedad5;
  --accent: #4ca877;
  --accent-bright: #5dba88;
  --accent-fg: #0c1f16;
  --amber: #e0a458;
  --button: #2f2e2b;
  --button-border: #4a4842;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Cantarell, Ubuntu, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 clamp(18px, 5vw, 64px);
  background: rgba(28, 27, 25, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img {
  width: 30px;
  height: 30px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 28px);
  justify-content: flex-end;
  color: var(--soft);
  font-size: 14px;
}

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

.icon-link,
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.icon-link img,
.github-link img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

main {
  overflow: hidden;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 1.4fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  min-height: calc(100vh - 64px);
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 64px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.hero-copy {
  max-width: 620px;
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(54px, 9vw, 112px);
  line-height: 0.9;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.lede {
  color: var(--soft);
  font-size: clamp(18px, 2.4vw, 23px);
  max-width: 600px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--button-border);
  background: var(--button);
  color: var(--text);
  font-weight: 800;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent-bright);
  color: #fff;
}

.button.secondary {
  color: var(--soft);
}

.button.disabled {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

.button.large {
  min-height: 52px;
  padding: 0 22px;
  white-space: nowrap;
}

.button:not(.disabled):hover {
  opacity: 0.92;
}

.button.primary:not(.disabled):hover {
  background: var(--accent-bright);
}

.button:not(.disabled):active {
  transform: scale(0.97);
}

/* ── API client preview ──────────────────────────────────────────────────── */
.api-preview {
  width: 100%;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  animation: fade-up 0.8s 0.14s cubic-bezier(0.22, 1, 0.36, 1) both,
             preview-float 7s 1.2s ease-in-out infinite;
}

@keyframes preview-float {
  0%, 100% { transform: translateY(0); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42); }
  50% { transform: translateY(-7px); box-shadow: 0 38px 92px rgba(0, 0, 0, 0.54), 0 0 60px rgba(76, 168, 119, 0.1); }
}

.window-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 42px;
  background: #1a1917;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
}

.mark img {
  width: 22px;
  height: 22px;
}

.window-buttons {
  display: flex;
  gap: 9px;
  padding-right: 14px;
}

.window-buttons i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4c4a45;
}

.api-body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-urlbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.api-method {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 13px;
}

.api-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 38px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--amber);
  font-family: "Cascadia Code", "Ubuntu Mono", monospace;
  font-size: 13px;
  overflow: visible;
  white-space: nowrap;
}

.api-var {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  color: var(--amber);
  cursor: help;
  outline: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.api-var::after {
  content: attr(data-value);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 2;
  padding: 7px 9px;
  border: 1px solid rgba(76, 168, 119, 0.45);
  border-radius: 6px;
  background: #121713;
  color: var(--soft);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.api-var:hover,
.api-var:focus-visible {
  background: rgba(224, 164, 88, 0.12);
  color: #f3bc72;
}

.api-var:hover::after,
.api-var:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.api-url em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--soft);
  font-style: normal;
}

.api-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--accent-bright);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  transition: background-color 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
}

.api-send:hover {
  background: var(--accent-bright);
}

.api-send:active {
  transform: scale(0.96);
}

.api-send:disabled {
  cursor: progress;
  opacity: 0.78;
}

.api-response {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1917;
  overflow: hidden;
  min-height: 228px;
}

.api-resp-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.api-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #8fd3a8;
  color: #15150f;
  font-weight: 800;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.api-response[data-state="empty"] .api-status {
  background: var(--panel-2);
  color: var(--muted);
}

.api-response[data-state="loading"] .api-status {
  background: #4c4a45;
  color: var(--soft);
}

.api-empty {
  display: grid;
  place-items: center;
  min-height: 174px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.api-empty span {
  color: var(--soft);
  font-weight: 800;
}

.api-empty small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.api-loading {
  display: none;
  min-height: 174px;
  padding: 24px;
}

.api-response[data-state="loading"] .api-empty,
.api-response[data-state="loaded"] .api-empty {
  display: none;
}

.api-response[data-state="loading"] .api-loading {
  display: grid;
  gap: 12px;
  align-content: center;
}

.api-loading span {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2), rgba(76, 168, 119, 0.35), var(--panel-2));
  background-size: 220% 100%;
  animation: api-shimmer 0.72s ease-in-out infinite;
}

.api-loading span:nth-child(2) {
  width: 82%;
  animation-delay: 0.08s;
}

.api-loading span:nth-child(3) {
  width: 64%;
  animation-delay: 0.16s;
}

.api-result {
  padding: 14px;
  animation: api-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.api-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.api-page-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}

.api-page-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

@keyframes api-shimmer {
  from { background-position: 110% 0; }
  to { background-position: -110% 0; }
}

@keyframes api-pop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.api-json {
  margin: 0;
  padding: 16px 18px;
  font-family: "Cascadia Code", "Ubuntu Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--soft);
  overflow-x: auto;
}

.api-json-result {
  max-height: 230px;
  padding: 0 4px 2px;
  background: transparent;
  overflow: auto;
  scrollbar-color: #8fd3a8 #232220;
  scrollbar-width: thin;
}

.api-json-result::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.api-json-result::-webkit-scrollbar-track {
  background: #232220;
  border-radius: 999px;
}

.api-json-result::-webkit-scrollbar-thumb {
  background: #8fd3a8;
  border: 2px solid #232220;
  border-radius: 999px;
}

.api-json-result::-webkit-scrollbar-thumb:hover {
  background: #a7dfb9;
}

.api-json .k { color: #9cc0ec; }
.api-json .s { color: #8fd3a8; }
.api-json .n { color: #e6cf8a; }
.api-json .v { color: var(--amber); }

/* ── Features ────────────────────────────────────────────────────────────── */
.band {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 64px);
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article {
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.feature-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(76, 168, 119, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.feature-grid p,
.download p {
  color: var(--muted);
}

/* ── Download ────────────────────────────────────────────────────────────── */
.download {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(56px, 8vw, 90px) clamp(18px, 5vw, 64px);
}

.download div {
  max-width: 720px;
}

.download-container {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 100%;
}

.download-desc {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--soft);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.download-note {
  margin: 12px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

.platform-download {
  gap: 10px;
}

.platform-download img,
.email-link img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.email-link {
  gap: 10px;
}

code {
  color: var(--soft);
  font-family: "Cascadia Code", "Ubuntu Mono", monospace;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

footer a,
.footer-links a {
  color: var(--soft);
}

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

.footer-support-link {
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  color: var(--soft);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.footer-support-link:hover {
  color: var(--text);
}

/* ── Support modal ───────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-title {
  margin-bottom: 10px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.1;
}

.modal-body {
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 15px;
}

.modal-close {
  flex: 0 0 auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text);
}

/* ── Releases page ───────────────────────────────────────────────────────── */
.releases-main {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(18px, 5vw, 48px) 80px;
}

.releases-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.releases-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  margin-bottom: 8px;
}

.releases-subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.releases-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.releases-filters-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  flex-shrink: 0;
}

.os-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.os-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.os-tab img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(0.6);
}

.os-tab:hover {
  color: var(--text);
  border-color: var(--button-border);
}

.os-tab.active {
  background: var(--button);
  border-color: var(--button-border);
  color: var(--text);
}

.os-tab.active img {
  filter: brightness(0) invert(1);
}

.stable-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.stable-toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 34px;
  height: 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}

.stable-toggle input:checked ~ .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s, background 0.18s;
}

.stable-toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(14px);
  background: #fff;
}

.toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.stable-toggle input:checked ~ .toggle-label {
  color: var(--text);
}

.releases-tabs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.tab-button {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab-button:hover {
  color: var(--text);
  border-bottom-color: var(--button-border);
}

.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--accent-bright);
}

.tab-content {
  display: none;
  width: 100%;
  min-width: 0;
}

.tab-content.active {
  display: block;
}

.installation-guide h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px;
}

.install-method {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.install-method h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 0 0 12px 0;
}

.install-method p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--soft);
}

.install-method p:last-child {
  margin-bottom: 0;
}

.install-method pre {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.6;
}

.install-method code {
  color: #a8d3a8;
}

.install-method .install-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

#releases-items {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.release-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.release-item:last-child {
  border-bottom: none;
}

.release-item:nth-child(even) {
  background: var(--panel-2);
}

.release-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.release-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-version {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-family: "Cascadia Code", "Ubuntu Mono", monospace;
}

.badge-latest {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 800;
}

.badge-pre {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #5c4a1e;
  color: #f5c842;
  font-size: 11px;
  font-weight: 800;
}

.release-date {
  font-size: 12px;
  color: var(--muted);
}

.release-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.release-dl-btn {
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.release-dl-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.release-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--soft);
}

.release-gh-link:hover {
  color: var(--text);
}

.releases-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 22px;
  color: var(--muted);
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.releases-state.hidden {
  display: none;
}

.releases-state a {
  color: var(--soft);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.page-btn {
  height: 36px;
  padding: 0 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--button-border);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-label {
  font-size: 13px;
  color: var(--muted);
  min-width: 100px;
  text-align: center;
}

/* ── Motion ──────────────────────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

nav a {
  position: relative;
  transition: color 0.18s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero,
  .download {
    grid-template-columns: 1fr;
  }

  .api-preview {
    justify-self: stretch;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px 18px;
  }

  .hero {
    min-height: auto;
  }

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

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    gap: 14px;
  }

  .releases-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .api-preview,
  .hero-copy,
  [data-reveal] {
    animation: none;
    transition: none;
  }
}
