*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #faf9f6;
  --bg-sunken: #F5F4ED;
  --bg-elevated: #ffffff;
  --text-primary: #0a0a0a;
  --text-secondary: #373737;
  --text-muted: #8C8780;
  --text-light: #A9A9A9;
  --accent-green: #2eb876;
  --accent-yellow: #fcd900;
  --brand-emerald: #19975B;
  --font-headline: 'BioRhyme', serif;
  --font-cursive: 'Calligraffitti', cursive;
  --font-body: 'Inter', sans-serif;
  --site-content-width: 950px;
  --max-width: var(--site-content-width);
  --doc-max-width: var(--site-content-width);
  --radius-pill: 9999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 83px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── Nav ─── */
.nav {
  background: var(--bg-primary);
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  will-change: transform;
  transform: translateZ(0);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo-lockup {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  object-position: left center;
}

.nav-cta {
  background: transparent;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-cta:hover { opacity: 0.8; }

/* ─── Hero ─── */
.hero {
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  margin-top: -83px;
}

.hero .container {
}

/* Stacked card icon */
.hero-icon-stack {
  position: relative;
  width: 130px;
  height: 140px;
  margin: 0 auto 78px;
  perspective: 600px;
}

.hero-icon-card {
  position: absolute;
  left: 50%;
  border-radius: 22px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-icon-card-back {
  transform: translateX(-50%);
  width: 76px;
  height: 76px;
  background: #F6F6F6;
  top: 0;
}

.hero-icon-card-mid {
  transform: translateX(-50%);
  width: 92px;
  height: 92px;
  background: #FBFAF8;
  top: 9px;
}

.hero-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 112px;
  background: var(--bg-elevated);
  border-radius: 22px;
  top: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center bottom;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: none;
}

.hero-card.is-top {
  box-shadow:
    inset 0 1px 0 rgba(0, 0, 0, 0.01),
    0 4px 8px rgba(0, 0, 0, 0.12);
}

.hero-icon-img {
  object-fit: contain;
}

/* Headline */
.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-line-1 {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 76px;
  color: var(--text-primary);
  font-style: normal;
  display: block;
  line-height: 0.93;
  margin-bottom: 20px;
}

.hero-line-2 {
  font-family: var(--font-cursive);
  font-weight: 400;
  font-size: 64px;
  color: var(--text-secondary);
  font-style: normal;
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-line-3 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 72px;
  color: var(--text-primary);
  font-style: normal;
  display: block;
  line-height: 0.98;
}

.hero-underline-wrap {
  position: relative;
  display: inline-block;
}

.hero-underline-text {
  position: relative;
  z-index: 1;
}

.hero-underline {
  position: absolute;
  left: 0;
  top: 0.76em;
  height: 0.16em;
  z-index: 0;
  border-radius: 2px;
}

.hero-underline--green { background: #96E1BD; width: 4.5em; }
.hero-underline--yellow { background: #CFCEC5; width: 3.0em; left: 0.08em; }

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.hero-description {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.95;
  letter-spacing: -0.02em;
  max-width: min(765px, 100%);
  margin: 0 auto 48px;
}

.hero-description strong {
  font-weight: inherit;
  color: #333232;
}

/* CTA group */
.hero-cta-group {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--text-primary);
  color: var(--bg-elevated);
  padding: 0 28px;
  height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.hero-cta-btn:hover { opacity: 0.8; }

.hero-cta-arrow {
  width: 11px;
  height: 11px;
  color: white;
}

.hero-chrome-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* ─── Sections ─── */
.section {
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.section .container {
  width: 100%;
}



.section h2 {
  font-family: var(--font-headline);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.changelog-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}

.changelog-section-header > h1,
.changelog-section-header > h2 {
  margin-bottom: 0;
}

.changelog-more-link {
  flex-shrink: 0;
  color: var(--brand-emerald);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.changelog-more-link:hover {
  opacity: 0.8;
}

/* Feature cards */
.features-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.feature-card {
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 32px;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── FAQ ─── */
.faq-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.faq-card {
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 28px 32px;
}

.faq-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.faq-q {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--brand-emerald);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.faq-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-card code {
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ─── Doc pages (legal, changelog) ─── */
.doc-page {
  padding: 48px 0 0;
}

.doc-page .container {
  max-width: var(--doc-max-width);
}

.doc-page .legal-title {
  font-family: var(--font-headline);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.doc-page .legal-updated {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.doc-page .legal-divider {
  border: none;
  border-top: 1px solid #E8E6DC;
  margin-bottom: 40px;
}

.changelog-page .legal-divider {
  margin-bottom: 52px;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-page li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal-page a {
  color: var(--brand-emerald);
}

.legal-page a:hover {
  opacity: 0.7;
}

.legal-page code {
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ─── Changelog page ─── */
.changelog-page {
  /* layout shared via .doc-page */
}

.changelog-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-entry {
  position: relative;
  --changelog-entry-gap: 60px;
  --changelog-row-gap: 20px;
  display: grid;
  grid-template-columns: 88px 10px 1fr;
  column-gap: 16px;
  row-gap: var(--changelog-row-gap);
  align-items: start;
  padding-bottom: 0;
}

.changelog-entry:not(:last-child) {
  padding-bottom: var(--changelog-entry-gap);
}

.changelog-date {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 13px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}

.changelog-node {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.changelog-node-line {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  align-self: stretch;
  position: relative;
  z-index: 1;
  width: 0.5px;
  min-height: 12px;
  margin-top: calc(-1 * (var(--changelog-row-gap) + 9px));
  background: #D8D6CE;
  opacity: 0.9;
  pointer-events: none;
}

.changelog-header-main {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.changelog-body {
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
}

.changelog-content {
  min-width: 0;
}

.changelog-version {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.changelog-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid #F0EEE6;
  background: transparent;
  color: var(--text-muted);
}

.changelog-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}

.changelog-status--published {
  border-color: color-mix(in srgb, var(--brand-emerald) 45%, #F0EEE6);
  color: var(--brand-emerald);
}

.changelog-status--published .changelog-status-dot,
.changelog-status-dot--published {
  background: var(--brand-emerald);
}

.changelog-status--review {
  border-color: color-mix(in srgb, var(--text-muted) 50%, #F0EEE6);
  color: var(--text-secondary);
}

.changelog-status--review .changelog-status-dot,
.changelog-status-dot--review {
  background: #F5C400;
}

.changelog-status--developing {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--text-light) 50%, #F0EEE6);
  color: var(--text-light);
}

.changelog-status--developing .changelog-status-dot,
.changelog-status-dot--developing {
  background: #D35400;
}

.changelog-entry .changelog-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--brand-emerald);
  text-align: left;
}

#changelog .changelog-title {
  font-size: 17px;
}

.changelog-letter {
  margin-top: 16px;
}

.changelog-letter p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.changelog-highlight {
  color: var(--brand-emerald);
}

.changelog-review-link {
  color: var(--brand-emerald);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.changelog-review-link:hover {
  opacity: 0.8;
}

.changelog-emphasis {
  color: var(--text-primary);
  font-weight: 600;
}

.changelog-entry--letter .changelog-letter-signoff {
  text-align: right;
  margin-bottom: 0;
}

.changelog-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-primary);
}

.changelog-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.changelog-section li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ─── Page Footer ─── */
.section:last-of-type {
  padding-bottom: 0;
}

.page-footer {
  border-top: 1px solid #E8E6DC;
  padding: 20px 32px;
  margin-top: 97px;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--site-content-width);
  text-align: center;
}

.page-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 8px;
  font-size: 14px;
}

.page-footer-links a {
  color: var(--brand-emerald);
}

.page-footer-links a.current {
  color: var(--text-light);
  pointer-events: none;
  cursor: default;
}

.page-footer-copy {
  font-size: 13px;
  color: var(--text-light);
}

.page-footer-copy--nowrap {
  white-space: nowrap;
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
  .hero-line-1 { font-size: 58px; margin-bottom: 16px; }
  .hero-line-2 { font-size: 48px; }
  .hero-line-3 { font-size: 54px; }
}

@media (max-width: 640px) {
  .changelog-entry {
    grid-template-columns: auto 10px 1fr;
    column-gap: 10px;
    row-gap: 17px;
  }

  .changelog-header-main {
    gap: 10px;
  }

  .changelog-date {
    font-size: 12px;
  }

  .changelog-version {
    font-size: 18px;
  }
}

@media (max-width: 767px) {
  .hero {
    align-items: flex-start;
    min-height: 100svh;
    padding: 142px 0 72px;
  }

  .hero-icon-stack {
    width: 100px;
    height: 128px;
    margin: 0 auto 78px;
  }

  .hero-icon-card-back { width: 58px; height: 58px; }
  .hero-icon-card-mid { width: 72px; height: 72px; top: 7px; }
  .hero-card { top: 16px; }
  .hero-icon-img { width: 50px; height: 51px; }

  .hero-line-1 { font-size: 42px; margin-bottom: 14px; }
  .hero-line-2 { font-size: 36px; }
  .hero-line-3 { font-size: 40px; }

  .hero-subtitle { font-size: 16px; margin-bottom: 68px; }

  .hero-description {
    font-size: 16px;
    margin-bottom: 36px;
  }

  .nav .container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-logo-lockup { height: 26px; max-width: min(168px, 48vw); }

  .section { padding: 60px 0; }
  .section:last-of-type { padding-bottom: 0; }
  .section h2 { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479px) {
  .hero { padding-top: 134px; }

  .hero-line-1 { font-size: 32px; margin-bottom: 10px; }
  .hero-line-2 { font-size: 26px; }
  .hero-line-3 { font-size: 30px; }

  .hero-description { line-height: 1.7; }

  .hero-cta-btn {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
  }

  .hero-chrome-icon { width: 34px; height: 34px; }
}
