/* ---------------------------------------------------------------------
   Design tokens
--------------------------------------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5f7;
  --color-text: #1a1d21;
  --color-text-muted: #565d66;
  --color-accent: #1f5fd6;
  --color-border: #dde1e6;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;

  --content-width: 42rem;
  --page-width: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14161a;
    --color-bg-alt: #1c1f24;
    --color-text: #eceef1;
    --color-text-muted: #9aa2ad;
    --color-accent: #7ea6ff;
    --color-border: #2c3038;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
}

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

a {
  color: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------
   Layout primitives
--------------------------------------------------------------------- */
.wrap {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

main.wrap {
  max-width: var(--content-width);
  padding-block: var(--space-5);
}

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.site-header__brand {
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-accent);
}

@media (min-width: 40rem) {
  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-6);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.site-footer__social {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

@media (min-width: 40rem) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------------------------------------------------------------------
   Typography
--------------------------------------------------------------------- */
h1 {
  font-size: var(--text-2xl);
  line-height: 1.2;
  margin-block: 0 var(--space-3);
}

h2 {
  font-size: var(--text-xl);
  line-height: 1.3;
  margin-block: var(--space-5) var(--space-2);
}

p {
  margin-block: 0 var(--space-3);
  color: var(--color-text);
}

.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------
   Forms (contact page)
--------------------------------------------------------------------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

label {
  font-size: var(--text-sm);
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  padding: var(--space-2);
}

button {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 0.25rem;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

/* Honeypot field: hidden from sighted users, still present in the DOM for bots to fill in */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
