/* ============================================================
   MUFFINBERRY STUDIOS — base (fonts, reset, type, a11y)
   Fonts are self-hosted: no third-party requests (§18/§21).
   ============================================================ */

@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo-2-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo-2-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo-2-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--purple-deep);
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }

p { max-width: 62ch; }

a { color: var(--pink-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--purple-deep); }

ul[class], ol[class] { list-style: none; padding: 0; }

strong { color: var(--purple-deep); }

::selection { background: var(--sun); color: var(--purple-ink); }

/* --- Accessibility foundations --- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--purple-deep); color: #fff;
  padding: 12px 22px; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 800; text-decoration: none; transition: top var(--speed) ease;
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Respect reduced motion everywhere (§17) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* the launch switch relies on the hidden attribute always winning */
[hidden] { display: none !important; }
