/* ============================================================
   K3YH0L3 / XRAY SUPPLY CO. — design system
   Single source of truth. Linked by every page except /cert.

   Palette: #000000 (black) + #F0EAD6 (off-white) only.
   Font:    IBM Plex Mono — 700 display, 400 body.
   Rules:   no gradients, no shadows, no rounded corners.

   Type scale:
     14px  body copy / spec values
     11px  nav, sub-nav, labels, section headings
     10px  interactive minor labels (buttons, pending notes)
      9px  marginalia only — doc-control codes, footer codes, stamps
   Contrast tiers (--ink/--ink-2/--ink-3) carry hierarchy; never hue.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');

:root {
  --black:    #000000;
  --offwhite: #F0EAD6;
  --mono:     'IBM Plex Mono', 'Courier New', monospace;

  /* text tiers — anything READ is high-contrast; only marginalia dims */
  --ink:    rgba(240, 234, 214, 0.92);
  --ink-2:  rgba(240, 234, 214, 0.62);
  --ink-3:  rgba(240, 234, 214, 0.34);
  --line:   rgba(240, 234, 214, 0.16);
  --line-2: rgba(240, 234, 214, 0.08);
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── RT-film background ─────────────────────────────────────
   One definition. Mobile lowers opacity for legibility.
   No gradient vignette — body::after is unused on purpose. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/rt_film_bg.jpg') center / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 640px) {
  body::before { opacity: 0.07; }
}

a { color: inherit; text-decoration: none; }

/* ── Top nav strip ──────────────────────────────────────── */
.nav-strip {
  background: rgba(0, 0, 0, 0.9);
  padding: 0 16px;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.nav-strip a { color: var(--offwhite); }
.nav-home { color: var(--ink-2); }
.nav-home:hover { color: var(--ink); }
.nav-co { color: var(--ink-3); font-size: 9px; }

/* ── Sub-nav ────────────────────────────────────────────── */
.sub-nav {
  background: rgba(0, 0, 0, 0.8);
  padding: 0 16px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 40px;
  z-index: 49;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
}
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav a {
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.sub-nav a:hover { color: var(--ink-2); }
.sub-nav a.active { color: var(--ink); }

/* ── Page body / document layout ────────────────────────── */
.page-body {
  flex: 1;
  padding: 24px 16px 64px;
  position: relative;
  z-index: 1;
  width: 100%;
}
@media (min-width: 640px) {
  .page-body { padding: 36px 32px 80px; max-width: 900px; }
}

/* ── Type scale primitives ──────────────────────────────── */
.page-title {
  font-size: clamp(30px, 8vw, 46px);
  letter-spacing: 0.02em;
  line-height: 1.04;
  margin-bottom: 8px;
}
.page-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.page-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
  margin-bottom: 28px;
  line-height: 1.7;
}
.section-head {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-2);
  border-bottom: 2px solid var(--line);
  padding-bottom: 7px;
  margin-bottom: 4px;
  margin-top: 32px;
}
.section-head:first-of-type { margin-top: 0; }

.footnotes {
  font-size: 10px;
  color: var(--ink-3);
  border-top: 1px solid var(--line-2);
  padding-top: 15px;
  margin-top: 32px;
  line-height: 1.95;
  font-weight: 400;
}
.footnotes sup { font-weight: 700; }

/* ── Footers (marginalia tier — 9px sanctioned) ─────────── */
.doc-footer {
  background: rgba(0, 0, 0, 0.6);
  color: var(--ink-3);
  padding: 9px 16px;
  font-size: 9px;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--line-2);
  position: relative;
  z-index: 1;
}
.page-footer {
  background: rgba(0, 0, 0, 0.7);
  color: var(--ink-2);
  padding: 12px 16px;
  font-size: 9px;
  letter-spacing: 0.12em;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 4px;
}
.page-footer a { color: inherit; }
.page-footer a:hover { color: var(--offwhite); }

/* ── Status mark (square, never round) ──────────────────── */
.mark,
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes mark-blink { 50% { opacity: 0; } }
.mark.blink,
.dot.blink { animation: mark-blink 2s step-end infinite; }

/* ── Stamps — monochrome, fill vs outline conveys state ── */
.stamp {
  display: inline-block;
  border: 2px solid var(--offwhite);
  color: var(--offwhite);
  font-size: 9px;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 0.13em;
  opacity: 0.22;
}
.stamp:nth-child(even) { transform: rotate(2.5deg); }
.stamp:nth-child(odd)  { transform: rotate(-2deg); }
.stamp.active,
.stamp.on {
  opacity: 1;
  background: var(--offwhite);
  color: var(--black);
}

/* ── Redaction — pending-documentation fields ─────────────
   Fixed block. Flat. Paired with a small-caps PENDING note.
   Genuine placeholder for missing data, not decorative noise. */
.redact,
.redacted {
  display: inline-block;
  vertical-align: middle;
  width: 116px;
  height: 13px;
  background: rgba(240, 234, 214, 0.13);
  color: transparent;
  user-select: none;
}
.pending-note,
.redact-note {
  display: inline-block;
  vertical-align: middle;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-left: 10px;
}
/* Legacy variant — used on /edc for hidden prices inside cards.
   Inline block, sized to its content; not the pending-doc block. */
.redacted-block {
  display: inline-block;
  background: rgba(240, 234, 214, 0.07);
  color: transparent;
  padding: 1px 6px;
  min-width: 80px;
  user-select: none;
}

/* ── Corner marks (used by landing page) ────────────────── */
.corner {
  position: fixed;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.2;
  pointer-events: none;
  z-index: 50;
  color: var(--offwhite);
}
.corner-tl { top: 20px;    left: 24px;  }
.corner-tr { top: 20px;    right: 24px; }
.corner-bl { bottom: 20px; left: 24px;  }
.corner-br { bottom: 20px; right: 24px; }

@media (max-width: 640px) {
  .corner { display: none; }
}
