:root {
  --bg: #f3ecdf;
  --paper: #fbf7ee;
  --ink: #17140f;
  --muted: #6f6658;
  --line: #d9cdbb;
  --selection-bg: #d7ff5f;
  --selection-ink: #17140f;
  --max: 1040px;
}

[data-theme="dark"] {
  --bg: #11100d;
  --paper: #191712;
  --ink: #f3ecdf;
  --muted: #b8ad9d;
  --line: #302c25;
  --selection-bg: #d7ff5f;
  --selection-ink: #11100d;
}

* { box-sizing: border-box; }

::selection {
  background: var(--selection-bg);
  color: var(--selection-ink);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 180ms ease, color 180ms ease;
}

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

p, h1, h2, h3 { margin-top: 0; }

header { border-bottom: 1px solid var(--line); }

.nav {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

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

.logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

nav a { text-decoration: none; }
nav a:hover { color: var(--ink); }

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--ink); }

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}

h1 {
  max-width: 860px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.075em;
  font-weight: 650;
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 650;
  margin-bottom: 18px;
}

h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.lede {
  max-width: 650px;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.38;
  letter-spacing: -0.025em;
  color: var(--muted);
  margin-bottom: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
}

.legal {
  max-width: 760px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.legal-title {
  color: var(--muted);
  margin-bottom: 36px;
}

.legal h3 {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.legal h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal ul { padding-left: 22px; }
.legal li { margin: 7px 0; }

footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 46px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

footer a { color: var(--muted); }

@media (max-width: 760px) {
  .nav { align-items: flex-start; }
  .nav-right { align-items: flex-end; flex-direction: column; gap: 12px; }
  nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px 16px; }
  .hero { min-height: auto; padding: 64px 0 56px; }
}
