/* ==========================================================================
   SUPERLOOM – Base
   Reset, @font-face, type rendering, global element defaults.
   No component or layout styles here.
   ========================================================================== */


/* --------------------------------------------------------------------------
   @font-face
   All fonts served locally – no external requests (DSGVO compliance).
   font-display: swap – text visible immediately in system fallback font.
-------------------------------------------------------------------------- */

/* Fraunces – variable font, covers all weights and optical sizes */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-VariableFont_SOFT,WONK,opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Inclusive Sans – variable font, covers weight 300–600 */
@font-face {
  font-family: 'Inclusive Sans';
  src: url('../fonts/InclusiveSans-VariableFont_wght.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

/* Departure Mono – single weight, not variable */
@font-face {
  font-family: 'Departure Mono';
  src: url('../fonts/DepartureMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* --------------------------------------------------------------------------
   Box model reset
-------------------------------------------------------------------------- */

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


/* --------------------------------------------------------------------------
   Root & body
-------------------------------------------------------------------------- */

html {
font-size: clamp(
  1rem,
  calc(1rem + 0.333 * ((100vw - 360px) / 400
  )),
  1.333rem
); 
}

body {
  font-family: var(--font-sans);
  font-size: var(--size-sm);
  font-weight: 300;
  line-height: var(--leading-125);
  color: var(--color-text);
  background-color: var(--color-bg);

  /* Type rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* OpenType: kerning pairs */
  font-feature-settings: 'kern' 1;
  font-kerning: normal;

  /* Prevent horizontal scroll */
  overflow-x: hidden;
}


/* --------------------------------------------------------------------------
   Skip link – keyboard navigation
   Visually hidden until focused, then appears top-left.
-------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: var(--size-xs);
  left: var(--size-xs);
  z-index: 9999;
  padding: var(--size-xs) var(--size-sm);
  background-color: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  text-decoration: none;

  /* Hidden until focused */
  transform: translateY(calc(-100% - var(--size-xs)));
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}


/* --------------------------------------------------------------------------
   Focus – WCAG 2.1 SC 2.4.11
   Visible for keyboard, hidden for mouse.
-------------------------------------------------------------------------- */

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
  border-radius: 1px;
}

:focus:not(:focus-visible) {
  outline: none;
}


/* --------------------------------------------------------------------------
   Links – global defaults
-------------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
}

/* Inline links within body text – always underlined for WCAG compliance */
p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* --------------------------------------------------------------------------
   Utility: screen reader only
-------------------------------------------------------------------------- */

.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;
}


/* --------------------------------------------------------------------------
   Utility: mono span – used for mixed-font elements
   e.g. "&" in headline, "@" in email address
-------------------------------------------------------------------------- */

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
}
