/* ==========================================================================
   Glenda — reset
   Direction-agnostic. Contains no brand decisions; only neutralises defaults.
   ========================================================================== */

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  min-height: 100svh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img { height: auto; }

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

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

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }

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

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

table { border-collapse: collapse; }

/* Root stacking context so pinned/fixed layers stay predictable */
#root, #__next { isolation: isolate; }

/* --------------------------------------------------------------------------
   Focus — never removed, only restyled. Directions override the colour token.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--c-focus, currentColor);
  outline-offset: 3px;
}

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

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

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  translate: -50% -120%;
  z-index: 999;
  padding: 0.75em 1.25em;
  background: var(--c-ink, #000);
  color: var(--c-canvas, #fff);
  font: 500 0.75rem/1 var(--f-ui, system-ui), system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: translate 200ms ease;
}
.skip-link:focus { translate: -50% 0; }

/* --------------------------------------------------------------------------
   Reduced motion — the global floor.
   Individual directions add their own richer handling via gsap.matchMedia,
   but this guarantees a usable page even if JS never runs.
   -------------------------------------------------------------------------- */
@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;
  }
}
