*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --surface-3: #ececf0;
  --line: rgba(29,29,31,0.11);
  --line-strong: rgba(29,29,31,0.18);
  --fg: #1d1d1f;
  --fg-2: #424245;
  --fg-3: #6e6e73;
  --fg-4: #86868b;
  --accent: #ff7a1a;
  --accent-strong: #e46300;
  --accent-soft: rgba(255,122,26,0.12);
  --shadow-soft: 0 18px 50px rgba(29,29,31,0.08);
  --radius: 22px;
  --radius-sm: 12px;
}
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(29,29,31,0.16); border-radius: 4px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Type */
.display {
  font-size: clamp(40px, 4.6rem, 80px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 500;
  margin: 0;
}
.display .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
.h2 {
  font-size: clamp(28px, 2.7rem, 44px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 500;
  margin: 0;
}
.h2 .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.lead {
  font-size: clamp(15px, 1rem, 17px);
  line-height: 1.55;
  color: var(--fg-2);
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: "ss01";
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-light { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(255,122,26,0.22); }
.btn-light:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.48); color: var(--fg); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: rgba(29,29,31,0.28); background: rgba(255,255,255,0.82); }
.btn-dark { background: #1d1d1f; color: #fff; border: 1px solid #1d1d1f; }
.btn-dark:hover { background: #000; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ NAVBAR ============ */
nav.top {
  position: fixed;
  top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 64px);
  max-width: 1420px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(29,29,31,0.08);
  transition: width 0.45s cubic-bezier(0.16,1,0.3,1), max-width 0.45s cubic-bezier(0.16,1,0.3,1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
nav.top.scrolled {
  width: calc(100% - 28px);
  max-width: 1100px;
  background: rgba(255,255,255,0.9);
  border-color: var(--line-strong);
}
.nav-inner {
  height: 56px;
  padding: 0 18px 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 0;
  font-size: 15px; font-weight: 500; letter-spacing: 0;
  width: fit-content;
  line-height: 0;
}
.brand-logo {
  display: block;
  width: auto;
  height: 30px;
  object-fit: contain;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 22px;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.nav-links { display: flex; gap: 4px; justify-content: center; }
.nav-links a {
  font-size: 13px; color: var(--fg-2);
  padding: 8px 14px; border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: rgba(29,29,31,0.05); }
.nav-cta { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 880px) {
  .nav-inner { display: flex; justify-content: space-between; }
  .nav-links { display: none; }
  nav.top { top: 8px; width: calc(100% - 16px); }
  nav.top.scrolled { width: calc(100% - 16px); }
}
@media (max-width: 480px) { .nav-cta .btn-ghost { display: none; } }

/* ============ PAGE HEAD ============ */
.page-head {
  position: relative;
  padding: 160px 24px 60px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-head-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.55) 50%, #000 100%),
    url('https://framerusercontent.com/images/x1ioW6hoCO0EWJfApnLyqDWxrs.png?scale-down-to=2048&width=6740&height=3332') center 40%/cover no-repeat;
}
.page-head-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, transparent 0%, rgba(0,0,0,0.55) 100%);
}
.page-head-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.page-head-content,
.page-head-content .display,
.page-head .eyebrow {
  color: #f5f5f7;
}
.page-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 500;
  margin-bottom: 28px;
}
.page-pill .tag {
  background: var(--accent); color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.page-head .lead {
  margin: 22px auto 0; max-width: 540px;
  color: rgba(245,245,247,0.78);
  font-size: 17px;
}

/* Filter strip */
.filter-strip {
  position: sticky;
  top: 84px;
  z-index: 50;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover { color: var(--fg); border-color: var(--line-strong); }
.filter-btn.active { background: var(--fg); color: #fff; border-color: var(--fg); }
.filter-btn .count { opacity: 0.5; font-variant-numeric: tabular-nums; }
.search-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  flex: 1;
  width: 100%;
}
.search-box input::placeholder { color: var(--fg-3); }
.search-box svg { color: var(--fg-3); flex-shrink: 0; }

/* ============ TIMELINE ============ */
.timeline {
  padding: 80px 0 120px;
  position: relative;
}
.timeline-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  position: relative;
}
.timeline-spine {
  position: absolute;
  left: 200px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--line) 6%, var(--line) 94%, transparent 100%);
  transform: translateX(-0.5px);
}
.release {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  margin-bottom: 72px;
  position: relative;
}
.release:last-child { margin-bottom: 0; }
.release-meta {
  position: sticky;
  top: 160px;
  height: fit-content;
  align-self: flex-start;
}
.release-date {
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.release-version {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fg);
  margin-bottom: 14px;
  line-height: 1;
}
.release-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.release-tag.major {
  background: var(--accent-soft);
  border: 1px solid rgba(255,122,26,0.24);
  color: var(--fg);
}
.release-tag.minor {
  background: rgba(110,231,168,0.08);
  border: 1px solid rgba(110,231,168,0.2);
  color: #6ee7a8;
}
.release-tag.patch {
  background: rgba(29,29,31,0.04);
  border: 1px solid var(--line);
  color: var(--fg-2);
}
.release-tag .tdot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}

.release-body { position: relative; }
.release-body::before {
  content: '';
  position: absolute;
  left: -64px;
  top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line-strong);
  transform: translateX(-5.5px);
}
.release-body.minor::before { background: #6ee7a8; }
.release-body.patch::before { background: var(--fg-3); }

.release-title {
  font-size: clamp(28px, 2.35rem, 38px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 12px;
}
.release-title .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}
.release-summary {
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 620px;
}

/* Hero entry visual */
.release-hero {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 0 0 32px;
  position: relative;
  overflow: hidden;
}
.release-hero.photo-mountain {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5)),
    url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&q=80') center/cover;
}
.release-hero.photo-forest {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5)),
    url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1600&q=80') center/cover;
}
.release-hero.photo-fjord {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5)),
    url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1600&q=80') center/cover;
}
.release-hero .hero-caption {
  position: absolute;
  left: 24px; bottom: 22px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--fg-2);
  max-width: 360px;
}
.release-hero .hero-caption strong { color: var(--fg); font-weight: 500; }

/* Bento for release entries */
.release-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.change-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}
.change-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.change-card .label {
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.change-card .label .ldot {
  width: 5px; height: 5px; border-radius: 50%;
  display: inline-block;
}
.change-card .label.new .ldot { background: #6ee7a8; }
.change-card .label.improved .ldot { background: var(--fg-2); }
.change-card .label.fixed .ldot { background: #fbbf24; }
.change-card h4 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--fg);
}
.change-card p {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
}
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }

@media (max-width: 880px) {
  .timeline-wrap, .release { grid-template-columns: 1fr; gap: 24px; }
  .timeline-spine { display: none; }
  .release-body::before { display: none; }
  .release-meta { position: static; }
  .col-3, .col-2, .col-4, .col-6 { grid-column: span 6; }
}

/* Patch list (compact rows) */
.patch-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.patch-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.patch-row:last-child { border-bottom: none; }
.patch-row .pl-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}
.patch-row .pl-tag.new { background: rgba(110,231,168,0.08); border: 1px solid rgba(110,231,168,0.2); color: #6ee7a8; }
.patch-row .pl-tag.improved { background: rgba(29,29,31,0.04); border: 1px solid var(--line-strong); color: var(--fg); }
.patch-row .pl-tag.fixed { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.2); color: #fbbf24; }
.patch-row .pl-text { color: var(--fg-2); }
.patch-row .pl-text strong { color: var(--fg); font-weight: 500; }

/* Inline mock — token meter */
.meter-mock {
  background: rgba(29,29,31,0.035);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
}
.meter-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.meter-row:first-child { margin-top: 0; }
.meter-bar {
  height: 5px; border-radius: 999px;
  background: rgba(29,29,31,0.08); overflow: hidden;
}
.meter-bar .fill { height: 100%; background: var(--fg); border-radius: 999px; }

/* Sub-list */
.sub-list { list-style: none; padding: 0; margin: 14px 0 0; }
.sub-list li {
  font-size: 13px;
  color: var(--fg-2);
  padding: 6px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sub-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--fg-3);
  margin-top: 8px;
  flex-shrink: 0;
}

/* Footer */
footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-brand p {
  font-size: 13px; color: var(--fg-3);
  line-height: 1.6; margin: 18px 0 0; max-width: 280px;
}
.footer-col h5 {
  font-size: 12px; color: var(--fg-3);
  font-weight: 500; letter-spacing: 0.04em;
  margin: 0 0 16px;
}
.footer-col a {
  display: block; font-size: 13px; color: var(--fg-2);
  padding: 6px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px; color: var(--fg-4);
  flex-wrap: wrap; gap: 12px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* Empty filter state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--fg-3);
  font-size: 14px;
  display: none;
}
.empty-state.show { display: block; }
.changelog-footer { margin-top: 96px; }

.meter-bar .fill-30 { width: 30%; }
.meter-bar .fill-70 { width: 70%; }
