/* ============================================================
   Techsage Inc. — Base
   Element defaults, typography scale and layout primitives.
   Reads tokens only. Contains no colour literals.
   ============================================================ */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- layout primitives ------------------------------------ */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gap);
  padding-block: var(--s-7);
}
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; gap: var(--s-4); padding-block: var(--s-6); }
}

.band { border-bottom: 1px solid var(--line); }
.band--raised { background: var(--surface); }
.band--deep { background: var(--bg-deep); }

/* ---- the section rail ------------------------------------- */

.rail {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-3);
  line-height: 1.5;
}
.rail__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--copper);
  margin-bottom: var(--s-3);
}
@media (max-width: 880px) {
  .rail { display: flex; align-items: center; gap: var(--s-3); }
  .rail__bar { margin-bottom: 0; flex: none; }
  .rail br { display: none; }
}

/* ---- typography ------------------------------------------- */

h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; }

h1 {
  font-weight: 600;
  font-size: clamp(38px, 6.4vw, 62px);
  line-height: 1.04;
  letter-spacing: var(--track-tight);
  margin: 0 0 var(--s-4);
}
h2 {
  font-weight: 600;
  font-size: clamp(25px, 3.4vw, 34px);
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin: 0 0 var(--s-3);
}
h3 {
  font-weight: 600;
  font-size: var(--t-lg);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

p { margin: 0 0 var(--s-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--t-lg); color: var(--fg-2); max-width: 62ch; }
.lede--gap { margin-bottom: var(--s-5); }
.muted { color: var(--fg-2); }

.label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--fg-3);
}

a { color: var(--copper-lift); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--copper-lift);
  outline-offset: 3px;
  border-radius: var(--radius);
}

img, svg, video { max-width: 100%; }
img { height: auto; }

::selection { background: var(--copper-deep); color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
