/* ============================================================
   ALT-TEXT — Base styles
   Modern CSS reset + typography + layout primitives.
   ============================================================ */

/* Self-hosted fonts — no third-party request, aligns with the privacy policy.
   WOFF2 is supported by ~97% of browsers; we use it exclusively. */
@font-face {
  font-family: "VT323";
  src: url("../fonts/VT323-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inconsolata";
  src: url("../fonts/Inconsolata-Variable.woff2") format("woff2-variations"),
       url("../fonts/Inconsolata-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; tab-size: 4; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-text-rg);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Typography ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

small, .text-xs { font-size: var(--fs-text-xs); }
.text-sm { font-size: var(--fs-text-sm); }
.text-md { font-size: var(--fs-text-md); }
.text-lg { font-size: var(--fs-text-lg); }
.text-muted { color: var(--fg-muted); }
.text-subtle { color: var(--fg-subtle); }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.tagline {
  font-family: var(--font-body);
  font-size: var(--fs-tagline);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-4); }
li + li { margin-top: var(--space-2); }
hr { border: 0; border-top: 1px solid var(--divider); margin: var(--space-12) 0; }

blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--accent);
  font-size: var(--fs-text-lg);
  color: var(--fg);
}

code, pre, kbd, samp {
  font-family: var(--font-body);
  font-size: 0.95em;
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}
pre { padding: var(--space-4); overflow: auto; }
pre code { padding: 0; background: transparent; }

/* --- Layout primitives --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container-narrow {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-20); }
.section-sm { padding-block: var(--space-12); }
.section-lg { padding-block: var(--space-32); }

.section-head {
  text-align: center;
  margin-bottom: var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.section-head .eyebrow {
  width: 32px; height: 32px;
  display: inline-block;
  background: var(--accent);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.section-head .tagline { margin: 0; }
.section-head h2 { margin: var(--space-2) 0 0; }
.section-head p { color: var(--fg-muted); margin-top: var(--space-2); }

.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-6 > * + * { margin-top: var(--space-6); }

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px; left: 8px;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* Image placeholder block (used everywhere in wireframes) */
.image-placeholder {
  background: var(--bg-image);
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--fg-subtle);
  overflow: hidden;
}
.image-placeholder.is-square { aspect-ratio: 1 / 1; }
.image-placeholder.is-wide { aspect-ratio: 16 / 9; }
.image-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* Honour reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
