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

:root {
  --serif: "Fraunces", serif;
  --sans: "DM Sans", sans-serif;

  --bg: hsl(40 30% 97%);
  --fg-heading: hsl(30 12% 12%);
  --fg-body: hsl(30 10% 20%);
  --fg-caption: hsl(30 8% 50%);
  --primary: hsl(25 60% 38%);
  --primary-hover: hsl(25 60% 32%);
  --primary-fg: hsl(40 30% 97%);
  --border: hsl(35 15% 85%);
  --border-subtle: hsl(35 10% 90%);
  --card: hsl(40 25% 95%);
  --code-bg: hsl(40 20% 93%);
  --code-comment: hsl(30 8% 60%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(30 10% 10%);
    --fg-heading: hsl(40 15% 92%);
    --fg-body: hsl(40 12% 82%);
    --fg-caption: hsl(30 8% 55%);
    --primary: hsl(25 55% 55%);
    --primary-hover: hsl(25 55% 48%);
    --primary-fg: hsl(30 10% 10%);
    --border: hsl(30 8% 22%);
    --border-subtle: hsl(30 6% 18%);
    --card: hsl(30 10% 13%);
    --code-bg: hsl(30 10% 14%);
    --code-comment: hsl(30 8% 45%);
  }
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--fg-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-nav {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 1.25rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-caption);
  text-decoration: none;
  transition: color 200ms ease-out;
}

.nav-link:hover {
  color: var(--fg-heading);
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-cta {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--primary-fg);
  background-color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 200ms ease-out;
}

.nav-cta:hover {
  background-color: var(--primary-hover);
}

.nav-cta:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ── Rules ── */

.rule {
  width: 4rem;
  height: 1px;
  background-color: var(--border);
}

.section-rule {
  border: none;
  height: 1px;
  background-color: var(--border);
  margin: 0;
}


/* ── Hero ── */

.hero {
  padding-top: clamp(5rem, 18vh, 10rem);
  padding-bottom: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  line-height: 1;
}

.hero-logo {
  height: clamp(8rem, 20vw, 12rem);
  width: auto;
}

.hero .rule {
  margin-top: 1.75rem;
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--fg-caption);
  margin-top: 1.75rem;
  line-height: 1.5;
  font-variation-settings: "opsz" 20;
}

.hero-subtitle {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--fg-body);
  margin-top: 1.5rem;
  max-width: 28rem;
  line-height: 1.7;
}


/* ── Sections ── */

.section {
  padding: 3.5rem 0;
}

.section-heading {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg-heading);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}


/* ── About ── */

.about-lede {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--fg-heading);
  font-weight: 300;
  font-variation-settings: "opsz" 14;
}

.about-lede::first-letter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.25em;
  line-height: 0.8;
  float: left;
  margin-right: 0.06em;
  margin-top: 0.05em;
  color: var(--primary);
  font-variation-settings: "opsz" 144;
}

.about-body {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-top: 1.25rem;
  color: var(--fg-body);
}


/* ── Features ── */

.feature-list {
  list-style: none;
}

.feature {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature:last-child {
  border-bottom: none;
}

.feature-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.feature-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fg-body);
}


/* ── Demo ── */

.demo-body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-body);
}

.demo-body strong {
  color: var(--fg-heading);
  font-weight: 500;
}

.demo-body a {
  color: var(--fg-heading);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 200ms ease-out, border-color 200ms ease-out;
}

.demo-body a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.demo-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--fg-caption);
  font-style: italic;
}

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.625rem 1.75rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--primary-fg);
  background-color: var(--primary);
  border-radius: 0.375rem;
  transition: background-color 200ms ease-out;
}

.cta-button:hover {
  background-color: var(--primary-hover);
}

.cta-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ── Self-host ── */

.selfhost-body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-body);
}

.selfhost-body + .selfhost-body {
  margin-top: 1rem;
}

.code-block {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--code-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--fg-body);
  overflow-x: auto;
  white-space: pre;
}

.code-comment {
  color: var(--code-comment);
}

.cta-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 0.125rem;
  transition: border-color 200ms ease-out, color 200ms ease-out;
}

.cta-link:hover {
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.cta-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ── Footer ── */

.footer {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer .rule {
  width: 100%;
  margin-bottom: 2rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--fg-caption);
}

.footer-text a {
  color: var(--fg-body);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 200ms ease-out, border-color 200ms ease-out;
}

.footer-text a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.footer-text a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ── Mobile adjustments ── */

@media (max-width: 480px) {
  .hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .about-lede::first-letter {
    font-size: 2.5em;
  }

  .nav-links {
    gap: 1rem;
  }

  .code-block {
    padding: 1rem;
    font-size: 0.75rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
}
