/* NGI — New Generation Instruments
   Type system + base styles */

:root {
  --bone: #F2EEE6;
  --bone-2: #EAE5DA;
  --paper: #FAF7F1;
  --ink: #111110;
  --ink-2: #1C1C1A;
  --ink-soft: #3A3A36;
  --ink-mute: #6B6B63;
  --rule: #D9D3C5;
  --rule-soft: #E5DFD0;
  --accent: #B45309; /* muted lab amber */
  --accent-hi: #D97706;
  --accent-soft: #F5E6CC;
  --signal: #0E5C4E; /* deep teal for chart accents */

  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

/* Typography utilities */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.sans { font-family: var(--sans); }

/* Eyebrow / label */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

/* Section scaffolding */
.section {
  padding: 120px 48px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

@media (max-width: 1100px) {
  .section { padding: 96px 36px; }
}
@media (max-width: 760px) {
  .section { padding: 72px 20px; }
}
@media (max-width: 420px) {
  .section { padding: 60px 16px; }
}

.rule { height: 1px; background: var(--rule); width: 100%; }
.rule-soft { height: 1px; background: var(--rule-soft); width: 100%; }

/* Subtle reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms cubic-bezier(.2,.6,.2,1), transform 800ms cubic-bezier(.2,.6,.2,1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Selection */
::selection { background: var(--ink); color: var(--bone); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 200ms cubic-bezier(.2,.6,.2,1);
}
.btn-primary {
  background: var(--ink);
  color: var(--bone);
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); }

/* Arrow */
.arrow {
  display: inline-block;
  width: 12px; height: 12px;
  position: relative;
}
.arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6 H10 M7 3 L10 6 L7 9' stroke='black' stroke-width='1.2' fill='none' stroke-linecap='square'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6 H10 M7 3 L10 6 L7 9' stroke='black' stroke-width='1.2' fill='none' stroke-linecap='square'/></svg>") center/contain no-repeat;
}

/* Grid background utility */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Data tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* Section number */
.sec-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

/* Headings */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.h-display {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h-section {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(32px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.h-sub {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.lede {
  font-family: var(--sans);
  font-size: clamp(15px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 36ch;
}

/* Italic accents within serif */
.serif em, .h-display em, .h-section em {
  font-style: italic;
  font-weight: 380;
}

/* Marker */
.marker {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 8px 4px 0;
}
