/* ============================================================================
   Base - reset, elements, typography defaults, motion policy.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchors clear the fixed header. */
  scroll-padding-top: calc(var(--header-h) + var(--s-6));
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--mist-200);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Drawer / modal open: lock the page behind. */
body.is-locked {
  overflow: hidden;
  /* Preserve scroll position without the jump a plain overflow:hidden causes. */
  position: fixed;
  inline-size: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--white);
}

h1 { font-size: var(--fs-d1); letter-spacing: var(--tr-d1); line-height: var(--lh-d1); text-transform: uppercase; text-wrap: balance; }
h2 { font-size: var(--fs-h2); letter-spacing: var(--tr-h2); line-height: var(--lh-h2); text-transform: uppercase; text-wrap: balance; }
h3 { font-size: var(--fs-h3); letter-spacing: var(--tr-h3); line-height: var(--lh-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); letter-spacing: var(--tr-h4); line-height: var(--lh-h4); font-weight: 600; }

p {
  margin: 0 0 var(--s-4);
  max-inline-size: 68ch;
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--blue-400);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover { color: var(--white); }

ul, ol { margin: 0 0 var(--s-4); padding-inline-start: var(--s-5); }
li { margin-block-end: var(--s-2); }

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

svg { fill: currentColor; }

strong, b { font-weight: 600; color: var(--white); }

small { font-size: var(--fs-small); }

hr {
  border: 0;
  block-size: 1px;
  margin: var(--s-8) 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}

blockquote {
  margin: var(--s-7) 0;
  padding-inline-start: var(--s-6);
  border-inline-start: 2px solid var(--blue-500);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.4;
  color: var(--mist-200);
}

blockquote p { max-inline-size: none; }

code, pre, kbd, samp { font-family: var(--font-mono); font-size: .92em; }

code {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  background: var(--ink-700);
  color: var(--blue-100);
}

pre {
  overflow-x: auto;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--ink-800);
}

pre code { padding: 0; background: none; }

table { inline-size: 100%; border-collapse: collapse; }

mark {
  background: rgba(46, 107, 255, .28);
  color: var(--white);
  padding: 0 3px;
  border-radius: var(--r-xs);
}

::selection {
  background: var(--blue-500);
  color: var(--white);
}

/* ---------------------------------------------------------------- focus
   Visible focus is never removed. Pointer clicks do not paint a ring;
   keyboard focus always does. */

:focus { outline: none; }

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

/* ---------------------------------------------------------------- form elements */

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

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

/* ---------------------------------------------------------------- a11y helpers */

.visually-hidden,
.sr-only {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--gutter);
  z-index: var(--z-modal);
  padding: var(--s-3) var(--s-5);
  background: var(--blue-500);
  color: var(--white);
  font-size: var(--fs-btn);
  font-weight: 600;
  letter-spacing: var(--tr-btn);
  text-transform: uppercase;
  border-radius: var(--r-xs);
  transition: inset-block-start var(--t-fast) var(--ease);
}

.skip-link:focus {
  inset-block-start: var(--s-3);
  color: var(--white);
}

/* Honeypot: hidden with CSS, never type="hidden", so bots still fill it. */
.hp {
  position: absolute !important;
  inset-inline-start: -9999px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- scroll reveal
   Applied by reveal.js via IntersectionObserver. The unrevealed state is only
   set when JS is running (html.js), so a no-JS visitor sees the final state. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-reveal) var(--ease-out-expo),
    transform var(--t-reveal) var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- reduced motion
   Mandatory, not optional: every transform, marquee, counter and transition
   collapses to its final state. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------------------- print */

@media print {
  .site-header, .site-footer, .cookie-bar, .float-bubble, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 11px; }
}
