/* Fonts load via <link> + preconnect in Twig bases (avoids CSS @import waterfalls). */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--gradient-canvas);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image: var(--pattern-grain);
  mix-blend-mode: multiply;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
}

h1 { font-size: var(--text-3xl); font-optical-sizing: auto; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); letter-spacing: 0; }

p {
  margin: 0 0 var(--space-4);
  color: var(--color-ink-secondary);
}

/* Content links: no underline by default; underline on hover (Apple-like). */
a {
  color: var(--color-accent);
  text-decoration: none;
  text-decoration-thickness: var(--link-decoration-thickness);
  text-underline-offset: var(--link-underline-offset);
  transition:
    color var(--duration-fast) var(--ease-soft),
    text-decoration-color var(--duration-fast) var(--ease-soft);
}

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

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: calc(var(--z-overlay) + 10);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: var(--weight-semibold);
}

.skip-link:focus {
  top: var(--space-3);
}
