/* Base styles: reset, typography, links, focus ring and the generic building
 * blocks (.btn, .chip, .eyebrow, .panel). Uses only the variables from tokens.css. */

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }
ul[class], ol[class] { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-weight: 900;
  font-stretch: var(--stretch-display);
  letter-spacing: var(--track-display);
  line-height: 0.92;
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

/* Links */
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }

/* Focus: always visible for keyboard users. On effect-colored panels the ring is near-black. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.on-fx :focus-visible { outline-color: var(--on-fx); }

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

.skip-link {
  position: absolute;
  left: var(--sp-4); top: -100px;
  z-index: 100;
  background: var(--fx-io);
  color: var(--on-fx);
  font-weight: 800;
  padding: var(--sp-3) var(--sp-4);
}
.skip-link:focus { top: var(--sp-4); }

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* Mono uppercase label */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  line-height: 1.4;
}

/* Buttons: flat, square, bold */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 14px 24px;
  border: var(--border) solid var(--paper);
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--fx-io); border-color: var(--fx-io); color: var(--on-fx); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }

/* Chips: small mono tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 9px;
  border: var(--border) solid currentColor;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
}
.chip--solid { background: var(--fx-io); border-color: var(--fx-io); color: var(--on-fx); }

/* Panels */
.panel {
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: var(--sp-6);
}

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