@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..700&family=Instrument+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #ece3d1;
  --fg: #1c1713;
  --card: #fdf9ed;
  --muted: #6b6155;
  --accent: #8a6d2a;
  --accent-fg: #fbf6ec;
  --rule: rgba(28, 23, 19, 0.08);
  --rule-strong: rgba(28, 23, 19, 0.14);
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141110;
    --fg: #f1e8dc;
    --card: #26201a;
    --muted: #c7bcae;
    --accent: #c8a05a;
    --accent-fg: #1c1713;
    --rule: rgba(241, 232, 220, 0.08);
    --rule-strong: rgba(241, 232, 220, 0.16);
  }
}

:root[data-theme="dark"] {
  --bg: #141110;
  --fg: #f1e8dc;
  --card: #26201a;
  --muted: #c7bcae;
  --accent: #c8a05a;
  --accent-fg: #1c1713;
  --rule: rgba(241, 232, 220, 0.08);
  --rule-strong: rgba(241, 232, 220, 0.16);
}

:root[data-theme="light"] {
  --bg: #ece3d1;
  --fg: #1c1713;
  --card: #fdf9ed;
  --muted: #6b6155;
  --accent: #8a6d2a;
  --accent-fg: #fbf6ec;
  --rule: rgba(28, 23, 19, 0.08);
  --rule-strong: rgba(28, 23, 19, 0.14);
}

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

html {
  color-scheme: light dark;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11", "calt", "tnum";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(184, 140, 66, 0.32);
  color: var(--fg);
}

a {
  color: inherit;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  white-space: nowrap;
  transition: background 120ms ease, opacity 120ms ease, color 120ms ease;
}
.nav .lang {
  border: 1px solid var(--rule-strong);
  color: var(--muted);
}
.nav .lang:hover {
  color: var(--fg);
  border-color: var(--muted);
}
.nav .login {
  border: 1px solid var(--fg);
  color: var(--fg);
  background: transparent;
}
.nav .login:hover {
  background: var(--fg);
  color: var(--bg);
  opacity: 1;
}
.nav .theme {
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav .theme:hover {
  color: var(--fg);
  border-color: var(--muted);
}
.nav .theme svg {
  display: block;
  width: 16px;
  height: 16px;
}
.theme-icon-sun {
  display: none;
}
.theme-icon-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
}
:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}
:root[data-theme="light"] .theme-icon-sun {
  display: none;
}
:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

.hero {
  padding: 5rem 0 4.5rem;
  max-width: 720px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin-bottom: 1.5rem;
  font-variation-settings: "opsz" 144;
}
.hero p {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2.25rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: opacity 120ms ease;
}
.cta:hover {
  opacity: 0.92;
}
.hero-cta-secondary {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 120ms ease;
}
.hero-cta-secondary:hover {
  color: var(--fg);
}

.section-head {
  margin: 4rem 0 1.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.card {
  background: var(--card);
  padding: 1.75rem 1.75rem 2rem;
}
.card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0 0;
}
.prose {
  padding: 5rem 0;
  max-width: 640px;
}
.prose h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.75rem;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  font-variation-settings: "opsz" 144;
}
.prose h2 + .group {
  margin-bottom: 2.75rem;
}
.prose p {
  color: var(--muted);
  margin-bottom: 0.9rem;
  font-size: 1rem;
  line-height: 1.6;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

footer {
  text-align: center;
  padding: 2rem 0 3rem;
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
}

@media (max-width: 600px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }
  header {
    padding: 1.125rem 0;
  }
  .nav {
    gap: 0.375rem;
  }
  .nav a {
    padding: 0.5rem 0.75rem;
  }
  .section-head {
    margin: 3rem 0 1.5rem;
    padding-top: 2rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .prose {
    padding: 3rem 0;
  }
}
