:root {
  color-scheme: light;
  --bg: #f0f6f4;
  --surface: rgba(252, 255, 254, 0.74);
  --surface-strong: #fbfefd;
  --text: #17312f;
  --muted: #627a77;
  --line: rgba(30, 74, 69, 0.14);
  --accent: #397d73;
  --accent-strong: #26665e;
  --accent-soft: rgba(57, 125, 115, 0.11);
  --grid-line: rgba(43, 100, 92, 0.02);
  --serif: "Iowan Old Style", "Songti SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

:root[data-theme="paper"] {
  color-scheme: light;
  --bg: #f8f3e9;
  --surface: rgba(255, 252, 244, 0.78);
  --surface-strong: #fffdf7;
  --text: #34291d;
  --muted: #796b5c;
  --line: rgba(86, 64, 40, 0.16);
  --accent: #a25b36;
  --accent-strong: #814425;
  --accent-soft: rgba(162, 91, 54, 0.11);
  --grid-line: rgba(114, 85, 52, 0.02);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  transition: color 180ms ease, background-color 180ms ease;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button,
select {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
}

.header-inner {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 66px;
  margin-inline: auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(26, 38, 75, 0.20);
}

.theme-switcher {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.theme-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
}

.theme-choice {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--surface-strong) 70%, var(--text));
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.theme-choice.mist { background: linear-gradient(135deg, #ecf5f2 50%, #548d84 50%); }
.theme-choice.paper { background: linear-gradient(135deg, #fbf4e4 50%, #b87049 50%); }

.theme-choice[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  display: grid;
  min-height: 680px;
  padding-block: 96px 86px;
  align-items: center;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(50px, 6.8vw, 66px);
  line-height: 1.06;
}

.hero-lead {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  margin-top: 34px;
  align-items: center;
  gap: 18px;
}

.hero-actions span {
  color: var(--muted);
  font-size: 13px;
}

.download-button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent);
  opacity: 0.48;
  cursor: not-allowed;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-image {
  display: block;
  width: min(100%, 760px);
  height: auto;
  object-fit: contain;
}

.section {
  padding-block: 92px;
}

.section-heading {
  display: grid;
  margin-bottom: 42px;
  grid-template-columns: 1.4fr 0.6fr;
  column-gap: 48px;
  align-items: end;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.12;
}

.section-heading > p:last-child {
  margin: 0 0 5px;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.feature-card h3 {
  margin: 42px 0 12px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.25;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.feature-index {
  color: var(--accent-strong);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.footer-inner {
  display: flex;
  min-height: 170px;
  padding-block: 42px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
}

.footer-inner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-copyright,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.footer-copyright {
  text-decoration: none;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .hero-image {
    width: min(100%, 620px);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 30px, 1120px);
  }

  .header-inner {
    width: calc(100% - 24px);
    min-height: 60px;
    gap: 14px;
  }

  .brand img { width: 32px; height: 32px; }
  .theme-switcher { margin-left: auto; padding-left: 0; border-left: 0; }
  .theme-label { display: none; }

  .hero {
    padding-block: 58px 60px;
  }

  h1 {
    font-size: clamp(45px, 14vw, 64px);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .section {
    padding-block: 70px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 220px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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