/* Design v2 (D1): self-hosted variable fonts, precached by the service
   worker so the PWA stays fully offline. font-display: swap + system
   fallbacks mean a missed load never blocks or breaks layout. */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

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

/* Body defaults */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Base typography */
h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

/* Image defaults */
img {
  max-width: 100%;
  display: block;
}

/* Button and input resets */
button,
input,
textarea,
select {
  font-family: inherit;
  font-size: 16px;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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