/* ============================================================
   MEMTEST INDUSTRIAL — Layout primitives
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad-gutter);
  position: relative;
}

.container--narrow { max-width: var(--container-narrow); }

section {
  padding-block: var(--pad-section);
  position: relative;
}

/* Section header block */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-head__left { display: flex; flex-direction: column; gap: 1.25rem; }
.section-head__title { max-width: 14ch; }
.section-head__title em { font-style: italic; color: var(--copper-bright); }
.section-head__desc { color: var(--paper-dim); max-width: 52ch; font-size: 1.05rem; line-height: 1.55; }

@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Dividers */
.rule {
  height: 1px;
  background: var(--ink-line);
  width: 100%;
}
.rule--copper { background: linear-gradient(90deg, var(--copper) 0%, transparent 100%); }

/* Index marker — section number in margin */
.idx-marker {
  position: absolute;
  top: var(--pad-section);
  left: var(--pad-gutter);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  color: var(--paper-faint);
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  pointer-events: none;
}
.idx-marker span:first-child { color: var(--copper); }

/* corner ticks (technical drawing feel) */
.ticks {
  position: relative;
}
.ticks::before, .ticks::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--copper);
  pointer-events: none;
}
.ticks::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.ticks::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* Utility */
.flex { display: flex; }
.grid { display: grid; }
.between { justify-content: space-between; }
.center { align-items: center; }
.col { flex-direction: column; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 4rem; }
.text-copper { color: var(--copper); }
.text-dim { color: var(--paper-dim); }
.text-faint { color: var(--paper-faint); }

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

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
