:root,
[data-theme="light"] {
  --canvas: #f3ede2;
  --surface: #faf6ef;
  --header: #2b2622;
  --text: #1f1a16;
  --muted: #6b635a;
  --on-header: #f3ede2;
  --seal: #a33b2b;
  --class: #2f5d50;
  --rule: #c9bdb0;
  --wash: radial-gradient(
      100% 70% at 0% 0%,
      rgba(163, 59, 43, 0.08),
      transparent 55%
    ),
    radial-gradient(
      80% 60% at 100% 10%,
      rgba(47, 93, 80, 0.1),
      transparent 50%
    );
}

[data-theme="dark"] {
  --canvas: #1a1612;
  --surface: #26211c;
  --header: #0f0d0b;
  --text: #e8e0d4;
  --muted: #9a9084;
  --on-header: #e8e0d4;
  --seal: #c45a48;
  --class: #4a8a78;
  --rule: #3d3530;
  --wash: radial-gradient(
      100% 70% at 0% 0%,
      rgba(196, 90, 72, 0.12),
      transparent 55%
    ),
    radial-gradient(
      80% 60% at 100% 10%,
      rgba(74, 138, 120, 0.12),
      transparent 50%
    );
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Libre Baskerville", "Songti SC", Georgia, serif;
  color: var(--text);
  background: var(--canvas);
  background-image: var(--wash);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.shell {
  width: min(920px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

[data-theme="dark"] .grain {
  opacity: 0.06;
  mix-blend-mode: soft-light;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--header) 92%, transparent);
  border-bottom: 2px solid var(--seal);
  backdrop-filter: blur(10px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--on-header);
}

.brand img {
  border-radius: 3px;
}

.brand__name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
}

.nav a {
  color: color-mix(in srgb, var(--on-header) 78%, transparent);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav a:hover {
  color: var(--on-header);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--on-header);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: color-mix(in srgb, var(--on-header) 12%, transparent);
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

.hero {
  padding: clamp(3.25rem, 10vw, 5.75rem) 0 2.75rem;
}

.hero__inner {
  animation: rise 0.75s ease both;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--seal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero__brand {
  margin: 0;
  font-size: clamp(3rem, 11vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.hero__lead {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.3vw, 1.2rem);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.hero__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 2rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.hero__tags li::before {
  content: "·";
  margin-right: 0.55rem;
  color: var(--class);
}

.hero__tags li:first-child::before {
  content: none;
  margin: 0;
}

.section {
  padding: 2.75rem 0;
}

.section__head {
  margin-bottom: 1.15rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  letter-spacing: 0.03em;
}

.prose {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 0.95rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.feature-list h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
}

.feature-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.download {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 0 0.25rem;
}

.download__copy h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
}

.download__copy p {
  margin: 0;
  max-width: 32rem;
  color: var(--muted);
}

.download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.download__status {
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  border: 1.4px solid transparent;
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--seal {
  background: var(--seal);
  color: #f7efe6;
  border-color: var(--seal);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: color-mix(in srgb, var(--rule) 85%, var(--text));
}

.footer {
  margin-top: 2rem;
  border-top: 2px solid var(--seal);
  background: var(--header);
  color: var(--on-header);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1.4rem 0 1.7rem;
}

.footer__brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer__meta {
  margin: 0;
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  opacity: 0.78;
}

.footer__meta a {
  text-decoration: none;
}

.footer__meta a:hover {
  text-decoration: underline;
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .download {
    grid-template-columns: 1.35fr auto;
    align-items: end;
  }

  .feature-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    row-gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .shell {
    width: min(920px, calc(100% - 2rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__inner,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}
