:root {
  color-scheme: light dark;
  --bg: #f7f2ea;
  --panel: #fffaf2;
  --text: #241c18;
  --muted: #665951;
  --line: rgba(36, 28, 24, 0.18);
  --accent: #7d3cff;
  --accent-2: #0d6b71;
  --shadow: 0 18px 48px rgba(36, 28, 24, 0.10);
}

:root[data-theme="dark"] {
  --bg: #111014;
  --panel: #1b1820;
  --text: #f3eadf;
  --muted: #c6b8ad;
  --line: rgba(243, 234, 223, 0.18);
  --accent: #b38cff;
  --accent-2: #6bd4d8;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Abadi, Aptos, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.skip-link:focus { left: 8px; z-index: 20; }

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

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.site-title, .brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-block;
}

.site-nav, .nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-nav a, .nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.site-nav a:hover, .nav a:hover,
.site-nav a[aria-current="page"], .nav a[aria-current="page"] {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.theme-toggle, .button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.button {
  background: var(--accent);
  color: white;
  border-color: transparent;
  font-weight: 700;
}

.button.secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.site-main { padding: 48px 0 72px; }

.hero {
  padding: 52px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; }

h1 { font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: -0.06em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.035em; }
h3 { font-size: 1.25rem; }

.lede, .lead {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  max-width: 780px;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.page-section, section { margin: 34px 0; }

.grid, .two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card p, .panel p { color: var(--muted); }

.card-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-2);
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .site-nav, .nav { justify-content: flex-start; }
}
