* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

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

.logo-mark {
  flex-shrink: 0;
  color: var(--foreground);
}

.logo-mark svg {
  display: block;
  width: 28px;
  height: 28px;
}

.logo-word {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--primary);
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted-foreground);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
}

.lang-switch a[aria-current="true"] {
  color: var(--foreground);
  background: var(--secondary);
}

.nav-toggle {
  display: none;
  background: none;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font: inherit;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--foreground);
  background: var(--secondary);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* pick the light/dark icon from CSS only, so there's no flash while JS loads */
.theme-toggle__icon--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--light {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle__icon--dark {
    display: block;
  }
}

:root[data-theme="dark"] .theme-toggle__icon--light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--dark {
  display: block;
}

:root[data-theme="light"] .theme-toggle__icon--light {
  display: block;
}

:root[data-theme="light"] .theme-toggle__icon--dark {
  display: none;
}

section {
  padding-block: 4.5rem;
}

section.tight {
  padding-block: 2.5rem;
}

.section-heading {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-heading__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.section-heading p {
  color: var(--muted-foreground);
  margin: 0;
}

.hero {
  padding-block: 4rem 5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto 2.5rem;
}

.hero__subhead {
  font-size: 1.15rem;
  color: var(--muted-foreground);
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.grid--3 > * {
  flex: 0 1 calc(33.333% - 1rem);
}

.feature-cards__more {
  text-align: center;
  margin-top: 2.5rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 3rem;
  margin-top: 2rem;
}

.footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin: 0 0 0.85rem;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer__col a {
  text-decoration: none;
  color: var(--foreground);
  font-size: 0.95rem;
}

.footer__col a:hover {
  color: var(--primary);
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__social-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.footer__meta {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted-foreground);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__subhead {
    margin-inline: auto;
    text-align: center;
  }

  .hero__cta {
    justify-content: center;
  }

  .grid--3 > * {
    flex-basis: calc(50% - 0.75rem);
  }

  .site-nav {
    position: relative;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    flex-direction: column;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    min-width: 10rem;
  }

  .site-nav__links.is-open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .grid--3 > * {
    flex-basis: 100%;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta .btn {
    justify-content: center;
  }
}
