/* ====================================================
   PAGE LAYOUTS (changelog, docs, legal, download)
==================================================== */

.page-hero {
  position: relative;
  padding: clamp(120px, 14vw, 180px) 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.page-hero .aurora-blob {
  width: 600px; height: 600px; opacity: 0.4;
  filter: blur(100px);
}
.page-hero .b1 { left: -10%; top: -20%; background: radial-gradient(circle, var(--aurora-1) 0%, transparent 65%); }
.page-hero .b2 { right: -10%; top: -10%; background: radial-gradient(circle, var(--aurora-3) 0%, transparent 65%); }
.page-hero-inner {
  position: relative;
  z-index: 2;
  text-align: left;
}
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: var(--fs-xs);
  color: var(--fg-2);
  margin-bottom: 22px;
  white-space: nowrap;
}
.page-title {
  font-size: var(--fs-4xl);
  letter-spacing: -0.04em;
  line-height: 0.96;
  font-weight: 540;
  margin-bottom: 22px;
}
.page-sub {
  font-size: var(--fs-lg);
  color: var(--fg-2);
  max-width: 64ch;
  line-height: 1.45;
}

/* ====================================================
   PROSE — long-form content
==================================================== */
.prose {
  max-width: 72ch;
  color: var(--fg-1);
  font-size: var(--fs-base);
  line-height: 1.65;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-size: var(--fs-2xl);
  font-weight: 540;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  scroll-margin-top: 96px;
}
.prose h3 {
  font-size: var(--fs-xl);
  font-weight: 540;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 1.4em;
  margin-bottom: 0.35em;
}
.prose h4 { font-size: var(--fs-lg); font-weight: 540; margin-top: 1.2em; }
.prose p { color: var(--fg-1); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in oklch, var(--accent), transparent 65%); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--fg); font-weight: 560; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; padding-left: 6px; }
.prose li::marker { color: var(--fg-3); }
.prose code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0;
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.prose pre code { background: transparent; border: none; padding: 0; font-size: inherit; }
.prose blockquote {
  border-left: 2px solid var(--border-bright);
  margin-left: 0;
  padding: 6px 0 6px 20px;
  color: var(--fg-2);
  font-style: italic;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2.4em;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.prose th { color: var(--fg-2); font-weight: 500; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; }

/* ====================================================
   DOCS LAYOUT (sidebar + content)
==================================================== */
.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(72px, 9vw, 144px);
}
@media (max-width: 880px) { .docs-shell { grid-template-columns: 1fr; gap: 32px; } }

.docs-side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
@media (max-width: 880px) {
  .docs-side { position: static; max-height: none; border-right: none; padding-right: 0; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
}
.docs-side .group h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin-bottom: 10px;
  font-weight: 500;
}
.docs-side .group ul { display: flex; flex-direction: column; gap: 2px; }
.docs-side a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
  transition: background 0.2s, color 0.2s;
}
.docs-side a:hover { background: var(--surface); color: var(--fg); }
.docs-side a.active { background: var(--surface-strong); color: var(--fg); }

.docs-content { min-width: 0; }
.docs-content h1 {
  font-size: var(--fs-3xl);
  letter-spacing: -0.03em;
  font-weight: 540;
  margin-bottom: 16px;
  line-height: 1.02;
}

/* ====================================================
   CHANGELOG
==================================================== */
.changelog { display: flex; flex-direction: column; gap: 48px; }
.release {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) { .release { grid-template-columns: 1fr; gap: 16px; } }
.release-meta { position: sticky; top: 96px; align-self: start; }
@media (max-width: 760px) { .release-meta { position: static; } }
.release-version {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.release-version .v {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-2xl);
  letter-spacing: -0.02em;
  font-weight: 560;
  color: var(--fg);
}
.release-version .tag {
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
}
.release-date { color: var(--fg-3); font-size: var(--fs-sm); font-family: "Geist Mono", monospace; }
.release-codename { color: var(--fg-2); font-size: var(--fs-sm); margin-top: 6px; font-style: italic; }
.release-body h3 {
  font-size: var(--fs-base);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--fg-2);
  margin-top: 24px;
  margin-bottom: 10px;
}
.release-body h3:first-child { margin-top: 0; }
.release-body ul { display: flex; flex-direction: column; gap: 8px; }
.release-body li {
  font-size: var(--fs-sm);
  color: var(--fg-1);
  padding-left: 22px;
  position: relative;
  line-height: 1.55;
}
.release-body li::before {
  content: "";
  position: absolute;
  left: 8px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.release-body li.add::before { background: #5ED49C; }
.release-body li.fix::before { background: #E2B65E; }
.release-body li.change::before { background: var(--accent); }
.release-body li.remove::before { background: #E25E5E; }
.release-body code { font-family: "Geist Mono", monospace; font-size: 0.92em; background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; }

/* ====================================================
   DOWNLOAD PAGE
==================================================== */
.download-hero {
  position: relative;
  padding: clamp(120px, 14vw, 180px) 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
  text-align: center;
}
.download-hero .container { position: relative; z-index: 2; }
.download-card {
  max-width: 520px;
  margin: 40px auto 0;
  padding: 36px;
  border-radius: var(--r-xl);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: left;
}
@media (max-width: 680px) { .download-card { grid-template-columns: 1fr; } }
.download-opt {
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.download-opt h3 { font-size: var(--fs-lg); font-weight: 540; letter-spacing: -0.015em; }
.download-opt p { color: var(--fg-2); font-size: var(--fs-sm); }
.download-meta { display: flex; gap: 8px; font-size: var(--fs-xs); color: var(--fg-3); font-family: "Geist Mono", monospace; flex-wrap: wrap; }
.download-meta span { padding: 3px 8px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg-2); }

/* ====================================================
   LEGAL TOC SIDEBAR
==================================================== */
.legal-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(72px, 9vw, 144px);
}
@media (max-width: 880px) { .legal-shell { grid-template-columns: 1fr; gap: 24px; } }
.legal-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: var(--fs-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 880px) { .legal-toc { position: static; } }
.legal-toc h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin-bottom: 10px;
  font-weight: 500;
}
.legal-toc a {
  display: block;
  padding: 5px 0;
  color: var(--fg-2);
  transition: color 0.2s;
}
.legal-toc a:hover { color: var(--fg); }
.legal-updated { color: var(--fg-3); font-size: var(--fs-xs); margin-top: 16px; font-family: "Geist Mono", monospace; }

/* ====================================================
   SECURITY pillars
==================================================== */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 56px;
}
@media (max-width: 820px) { .security-grid { grid-template-columns: 1fr; } }
.sec-tile {
  padding: 26px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.sec-tile .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  color: white;
  margin-bottom: 14px;
}
.sec-tile h3 { font-size: var(--fs-base); font-weight: 540; letter-spacing: -0.01em; margin-bottom: 6px; }
.sec-tile p { color: var(--fg-2); font-size: var(--fs-sm); line-height: 1.55; }


/* ====================================================
   BLOG
==================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 32px;
}
@media (max-width: 760px) { .blog-grid { grid-template-columns: 1fr; } }
.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post-card .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-3);
  font-size: var(--fs-xs);
  font-family: "Geist Mono", monospace;
}
.post-card .post-meta .tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}
.post-card h3 {
  font-size: var(--fs-xl);
  font-weight: 540;
  letter-spacing: -0.02em;
  line-height: 1.18;
  text-wrap: balance;
}
.post-card p { color: var(--fg-2); font-size: var(--fs-sm); line-height: 1.5; }
.post-card .post-foot {
  margin-top: auto;
  padding-top: 4px;
  color: var(--fg-3);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-card .post-foot::after { content: "→"; transition: transform 0.2s var(--ease-out); }
.post-card:hover .post-foot::after { transform: translateX(4px); }

.post-card.featured {
  grid-column: span 2;
  background:
    radial-gradient(60% 100% at 0% 0%, rgba(107,91,255,0.10), transparent 70%),
    var(--bg-2);
}
@media (max-width: 760px) { .post-card.featured { grid-column: span 1; } }
.post-card.featured h3 { font-size: var(--fs-2xl); letter-spacing: -0.025em; }

/* Single-post layout */
.post-hero {
  position: relative;
  padding: clamp(120px, 14vw, 180px) 0 clamp(24px, 4vw, 48px);
  overflow: hidden;
}
.post-hero .grid-bg { z-index: 1; }
.post-hero-inner { position: relative; z-index: 2; max-width: 72ch; }
.post-hero .post-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg-3);
  font-size: var(--fs-sm);
  font-family: "Geist Mono", monospace;
  margin-bottom: 22px;
}
.post-hero h1 {
  font-size: var(--fs-3xl);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 540;
  margin-bottom: 18px;
  text-wrap: balance;
}
.post-hero .post-lede {
  font-size: var(--fs-lg);
  color: var(--fg-2);
  line-height: 1.45;
  max-width: 62ch;
}
.author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.author-row .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
}
.author-row .name { font-size: var(--fs-sm); font-weight: 500; }
.author-row .role { font-size: var(--fs-xs); color: var(--fg-3); }

/* ====================================================
   PRESS
==================================================== */
.press-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0 48px;
}
@media (max-width: 760px) { .press-stats { grid-template-columns: 1fr 1fr; } }
.press-stat {
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.press-stat .num {
  font-family: "Geist", sans-serif;
  font-size: var(--fs-2xl);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg);
}
.press-stat .label {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 760px) { .press-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .press-grid { grid-template-columns: 1fr; } }
.press-asset {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.press-asset .preview {
  height: 160px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 100% at 30% 30%, rgba(107,91,255,0.18), transparent 70%),
    radial-gradient(60% 100% at 70% 70%, rgba(226,71,156,0.16), transparent 70%),
    var(--bg-3);
}
.press-asset .preview img { width: 86px; height: 86px; border-radius: 20px; }
.press-asset .preview.dark { background: #0A0A12; }
.press-asset .preview.light { background: #F7F6F2; }
.press-asset .info {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.press-asset .info .name { font-size: var(--fs-sm); font-weight: 500; }
.press-asset .info .meta { font-size: 11px; color: var(--fg-3); font-family: "Geist Mono", monospace; }

/* ====================================================
   CONTACT
==================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-card h3 { font-size: var(--fs-lg); font-weight: 540; letter-spacing: -0.015em; }
.contact-card p { color: var(--fg-2); font-size: var(--fs-sm); line-height: 1.5; }
.contact-card .email {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-sm);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

