/* ==========================================================================
   base.css — reset, @font-face, base elements, typography defaults
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand fonts
   --------------------------------------------------------------------------
   No brand files ship in assets/fonts/ yet, so the stack in variables.css
   currently resolves to the platform humanist sans (Segoe UI on Windows,
   which is the same Frutiger-lineage face the mid-2000s aqua UIs used).
   That keeps the page self-contained with zero network requests.

   To swap in self-hosted brand faces: drop the subset .woff2 files into
   assets/fonts/ and uncomment the two rules below. The family names already
   sit at the front of --font-heading / --font-body, so nothing else changes.

@font-face {
  font-family: "Dante Display";
  src: url("../assets/fonts/dante-display.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Dante Text";
  src: url("../assets/fonts/dante-text.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
-------------------------------------------------------------------------- */

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--spacing-md));
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

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

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

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* --- Page ----------------------------------------------------------------- */

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--color-abyss-900);
  background-image: var(--gradient-page);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: 0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Locked while the project modal is open (set by main.js). */
body.is-locked {
  overflow: hidden;
}

/* --- Typography ----------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--spacing-sm);
}

strong {
  font-weight: var(--weight-semibold);
  color: var(--color-aqua-200);
}

a {
  color: var(--color-aqua-400);
  text-decoration-color: rgba(110, 231, 255, 0.4);
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease),
    text-decoration-color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--color-aqua-300);
  text-decoration-color: currentColor;
}

::selection {
  background: rgba(110, 231, 255, 0.32);
  color: var(--color-aqua-100);
}

/* --- Focus ---------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-aqua-300);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Utilities ------------------------------------------------------------ */

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

.skip-link {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  z-index: var(--z-skip);
  padding: var(--spacing-2xs) var(--spacing-sm);
  border-radius: var(--radius-pill);
  background-color: var(--color-aqua-400);
  color: var(--color-text-invert);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease-out);
}

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

/* --- Reduced motion -------------------------------------------------------
   The backdrop stays visible but stops moving — a still image is not a motion
   problem. Everything else drops to a near-instant transition so state changes
   stay legible without movement. */

@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;
    scroll-behavior: auto !important;
  }
}
