:root {
  color-scheme: light;

  --max: 1180px;
  --gutter: clamp(18px, 2.5vw, 32px);
  --radius: 18px;
  --radius-small: 999px;

  --bg: #f3efe7;
  --bg-soft: #faf7f2;
  --surface: #fcfaf7;
  --surface-soft: #f7f2eb;
  --surface-strong: #eee7dc;

  --border: rgba(70, 54, 31, 0.10);
  --border-strong: rgba(133, 100, 43, 0.34);

  --text: #17120e;
  --text-soft: #5f5447;
  --text-muted: #7a6e61;

  --accent: #b07a1f;
  --accent-strong: #8f6116;
  --accent-soft: rgba(176, 122, 31, 0.12);

  --shadow: 0 18px 40px rgba(36, 27, 16, 0.12);

  --header-bg: rgba(243, 239, 231, 0.92);
  --footer-border: rgba(70, 54, 31, 0.10);

  --header-height: 76px;
  --focus-ring: 0 0 0 3px rgba(176, 122, 31, 0.18);

  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #11100d;
  --bg-soft: #171510;
  --surface: #1c1813;
  --surface-soft: #201b16;
  --surface-strong: #262018;

  --border: rgba(255, 244, 227, 0.08);
  --border-strong: rgba(210, 171, 100, 0.32);

  --text: #f3ede3;
  --text-soft: #cec3b2;
  --text-muted: #a89984;

  --accent: #d2ab64;
  --accent-strong: #e0bc7e;
  --accent-soft: rgba(210, 171, 100, 0.14);

  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  --header-bg: rgba(17, 16, 13, 0.90);
  --footer-border: rgba(255, 244, 227, 0.08);
  --focus-ring: 0 0 0 3px rgba(210, 171, 100, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 2000;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  flex: 0 0 auto;
}

.nav {
  justify-self: center;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: color 140ms ease;
}

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

.nav a[aria-current="page"] {
  color: var(--accent-strong);
  font-weight: 600;
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.header-tools {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid transparent;
  background: transparent;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
  flex: 0 0 auto;
}

.header-icon-link:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.header-icon-link svg {
  width: 1.28rem;
  height: 1.28rem;
  display: block;
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  margin-left: 0.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.theme-toggle:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.site-main {
  padding-top: calc(var(--header-height) + 2.25rem);
}

.hero {
  padding: clamp(2.25rem, 4vw, 4rem) 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 42rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--bg-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 {
  margin-top: 1.05rem;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.lead {
  max-width: 35rem;
  margin: 1rem 0 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-weight: 700;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

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

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffdf9;
}

.button-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-soft);
}

section + section {
  margin-top: 3.5rem;
}

.section-intro {
  max-width: 46rem;
  margin-bottom: 1.35rem;
}

.section-intro p {
  margin: 0.75rem 0 0;
  color: var(--text-soft);
}

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

.card {
  min-height: 10.5rem;
  padding: 1.4rem 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card p {
  margin: 0.8rem 0 0;
  color: var(--text-soft);
}

.card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.card-link:hover {
  color: var(--accent-strong);
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.focus-list li {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--footer-border);
  padding: 1.5rem 0 2rem;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.site-footer strong {
  display: inline-block;
  margin-bottom: 0.2rem;
}

.site-footer a {
  color: var(--text);
}

.site-footer a:hover {
  color: var(--accent-strong);
}

@media (max-width: 1120px) {
  .site-header-inner {
    gap: 1rem;
  }

  .nav {
    gap: 0.8rem;
  }

  .nav a {
    font-size: 0.92rem;
  }

  .header-tools {
    gap: 0.2rem;
  }

  .theme-toggle {
    padding: 0 0.8rem;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 108px;
  }

  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand tools"
      "nav nav";
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .brand {
    grid-area: brand;
  }

  .header-tools {
    grid-area: tools;
  }

  .nav {
    grid-area: nav;
    justify-self: start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .nav::-webkit-scrollbar {
    height: 6px;
  }

  .nav::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
  }

  .site-main {
    padding-top: calc(var(--header-height) + 2rem);
  }

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

@media (max-width: 640px) {
  :root {
    --header-height: 116px;
  }

  .wrap {
    width: min(var(--max), calc(100% - 1.25rem));
  }

  .header-icon-link {
    width: 2.2rem;
    height: 2.2rem;
  }

  .header-icon-link svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .theme-toggle {
    min-height: 2.2rem;
    padding: 0 0.75rem;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .card-grid,
  .focus-list,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}