/* ==========================================================================
   WINTEAM — BASE LAYER
   Element defaults and the two self-hosted families. Anything reusable
   belongs in 4-utilities.css; anything type-related in 3-typography.css.
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts */

/*  Instrument Serif and Inter, both SIL Open Font License, served from this
    origin. Subsets are latin and latin-ext: the site publishes in English,
    Dutch and Finnish, all of which are covered by those two.               */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+00??, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+00??, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+00??, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/*  Metric-matched fallbacks. Without these the swap from Times to Instrument
    Serif shifts every headline; with them the reflow is imperceptible.     */

@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Times New Roman");
  ascent-override: 117.94%;
  descent-override: 36.93%;
  line-gap-override: 0%;
  size-adjust: 83.94%;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ----------------------------------------------------------------- Reset */

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

* {
  margin: 0;
  /* Thin, unobtrusive scrollbar that reads as part of the frame. */
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

html {
  /* Lenis owns scrolling. Native smooth scroll would fight it. */
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  /* Reserve the scrollbar gutter permanently.
     The intro locks scrolling, and Lenis implements the lock as
     `overflow: clip` on this element. Without a reserved gutter that removes
     the scrollbar, the viewport gets ~15px wider, and the entire page jumps
     sideways — once on lock and again on release. */
  scrollbar-gutter: stable;
}

body {
  background-color: var(--surface);
  color: var(--content);
  font-family: var(--font-sans), "Inter Fallback";
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: -0.006em;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: common-ligatures contextual;
  overflow-x: clip;
  transition: background-color var(--duration-slow) var(--ease-editorial),
    color var(--duration-slow) var(--ease-editorial);
}

/* Scheme changes should feel like a lighting change, not a repaint. */
[data-scheme] {
  background-color: var(--surface);
  color: var(--content);
}

::selection {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Remove the focus ring for pointer users without harming keyboard users. */
:focus:not(:focus-visible) {
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

button,
[role="button"] {
  cursor: pointer;
}

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

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

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

fieldset {
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--line-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Lenis — required runtime styles, mirroring lenis/dist/lenis.css. Inlined
   so the stylesheet stays self-contained.
   -------------------------------------------------------------------------- */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Reduced motion. The scroll runtime already declines to start Lenis and the
   reveal primitives resolve to their end state; this is the final backstop
   for anything animated purely in CSS.
   -------------------------------------------------------------------------- */

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

/* -------------------------------------------------------------- Keyframes */

@keyframes wt-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes wt-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -2.5%, 0) scale(1.04);
  }
}

@keyframes wt-line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
