/* ==========================================================================
   Opal & Ivy — Base: reset, fonts, document defaults, a11y utilities
   ========================================================================== */

/* Metric-matched fallbacks so text doesn't jump when the web fonts land. */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 103%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 99%;
  ascent-override: 96%;
  descent-override: 26%;
  line-gap-override: 0%;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}
html.is-intro,
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, blockquote, address, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
h1 em, h2 em, h3 em, blockquote em {
  font-style: italic;
  font-weight: 300;
}

p { text-wrap: pretty; }

img, svg, video { display: block; max-width: 100%; height: auto; }
img { font-style: italic; color: var(--ink-muted); }

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
::selection {
  background: color-mix(in srgb, var(--gold-soft) 55%, transparent);
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  border-radius: var(--pill);
  background: var(--espresso);
  color: var(--cream);
  font-size: var(--fs-small);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; outline-color: var(--gold-soft); }
