/* ============================================================================
   InfraTech LLC — Base
   Reset · typography base · layout primitives · accessibility · utilities
   ========================================================================== */

/* ---- Self-hosted fonts (variable; weight set via font-variation-settings
   range, declared per static weight so `font-weight` shorthand still works) */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-variable.woff2') format('woff2');
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--edge) var(--void);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv01";
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
img { border-style: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible {
  outline: 2px solid var(--filament);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---- Headings --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--pure);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.08; }
h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }

p  { text-wrap: pretty; }
strong { color: var(--ink-bright); font-weight: 600; }
em { font-style: italic; color: var(--ink-bright); }

/* ---- Blueprint grid (ambient drafting paper, fixed behind everything) -- */
.bp-grid {
  position: fixed;
  inset: 0;
  z-index: var(--z-grid);
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 96px);
  -webkit-mask-image: radial-gradient(120% 120% at 50% 0%, #000 0%, transparent 78%);
          mask-image: radial-gradient(120% 120% at 50% 0%, #000 0%, transparent 78%);
  opacity: .9;
}

/* ---- Layout primitives ------------------------------------------------ */
.shell { position: relative; z-index: var(--z-base); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); position: relative; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

/* a section whose top edge carries a hairline + corner ticks */
.ruled { border-top: 1px solid var(--line); }

/* generic asymmetric two-column grid: narrow label rail + wide content */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

/* ---- Eyebrow / section header system (mono, indexed) ------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--mist);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: var(--filament-line);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.index {
  font-family: var(--font-mono);
  font-size: var(--fs-index);
  letter-spacing: .1em;
  color: var(--filament);
}

/* the standard section heading block */
.sec-head { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 30ch; }
.sec-head .eyebrow { margin-bottom: var(--sp-1); }
.sec-head p { color: var(--ink); max-width: 46ch; }

/* ---- Mono caption / spec text ----------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--mist);
}
.mono--bright { color: var(--ink-bright); }
.mono--accent { color: var(--filament); }

/* ---- Lead paragraph --------------------------------------------------- */
.lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink-bright);
  letter-spacing: -.01em;
  max-width: 46ch;
}

/* ---- Filament keyword inside copy -------------------------------------- */
.kw { color: var(--filament); }
.text-pure { color: var(--pure); }

/* ---- Accessibility ---------------------------------------------------- */
.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: 50%; top: 0;
  transform: translate(-50%, -120%);
  background: var(--filament); color: #04130d;
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: var(--track-mono); text-transform: uppercase;
  padding: .7em 1.2em; border-radius: 0 0 var(--r-sm) var(--r-sm);
  z-index: 1000; transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---- Reduced motion: neutralise reveal transforms --------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---- Utility ---------------------------------------------------------- */
.no-scroll { overflow: hidden; }
.hide-touch { }              /* shown by default; hidden on coarse pointers */
@media (pointer: coarse) { .hide-touch { display: none !important; } }
