/* =====================================================================
   SiliconBlaze — shared design system  (Graphite + Ember)
   Silicon = graphite/steel neutrals · Blaze = one warm ember accent.
   Editorial hairline grid · IBM Plex + Space Grotesk · no gradients.
   ===================================================================== */

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

:root {
  --paper:      #FAF9F7;   /* page background */
  --paper-2:    #F2F0EB;   /* raised panel / alt section */
  --ink:        #15181D;   /* primary text, dark sections */
  --ink-2:      #1B2027;   /* dark panel surface */
  --slate:      #4A5159;   /* secondary text */
  --slate-2:    #6B7178;   /* muted text / captions */
  --line:       #E4E2DD;   /* hairline rules & borders */
  --line-2:     #D6D3CC;   /* stronger hairline */
  --ember:      #DA5B2B;   /* the accent */
  --ember-deep: #B8441C;   /* accent hover/active */
  --ember-soft: rgba(218, 91, 43, 0.10);
  --shadow: 0 1px 2px rgba(21,24,29,.04), 0 8px 24px -12px rgba(21,24,29,.12);
}

/* ---- base ---------------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { line-height: 1.02; }
p  { text-wrap: pretty; }

/* readable body measure */
.measure   { max-width: 62ch; }
.measure-sm{ max-width: 48ch; }

/* tabular figures for any data/metrics */
.tnum { font-variant-numeric: tabular-nums; }

/* ---- kicker: mono micro-label (replaces headline-size all-caps) ---- */
.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-2);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.kicker::before {           /* short ember tick */
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--ember);
}
.kicker--plain::before { display: none; }

/* ---- hairline rule ------------------------------------------------- */
.rule { border: 0; border-top: 1px solid var(--line); }
.rule-2 { border: 0; border-top: 1px solid var(--line-2); }

/* ---- buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 600; font-size: 0.95rem;
  padding: 0.72rem 1.15rem; border-radius: 5px;
  border: 1px solid transparent;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-deep); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; color: var(--ink);
}
.btn-link .arrow { transition: transform .18s ease; color: var(--ember); }
.btn-link:hover .arrow { transform: translateX(4px); }

/* on dark sections */
.on-dark { color: #E9E7E2; }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,.24); }
.on-dark .btn-ghost:hover { border-color: #fff; }
.on-dark .kicker { color: #9AA0A6; }

/* ---- editorial card: no border-glow, hairline + hover lift -------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
/* accent edge appears on hover — restrained blaze */
.card--accent { position: relative; }
.card--accent::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--ember);
  opacity: 0; transition: opacity .2s ease;
  border-radius: 6px 0 0 6px;
}
.card--accent:hover::before { opacity: 1; }

/* list-row alternative to 3-equal-card grids */
.row-item {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  transition: background-color .18s ease;
}
.row-item:hover { background: var(--ember-soft); }
.row-item .idx {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
  color: var(--ember); padding-top: 0.15rem;
}

/* ---- metric / instrument panel (signature) ------------------------ */
.metric { }
.metric .fig {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.metric .fig .unit { color: var(--ember); }
.metric .lbl {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--slate-2); margin-top: 0.5rem;
}
.on-dark .metric .fig { color: #fff; }

/* ---- links / underline draw --------------------------------------- */
.link-underline {
  background-image: linear-gradient(var(--ember), var(--ember));
  background-size: 0% 1.5px; background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .25s ease;
  padding-bottom: 2px;
}
.link-underline:hover { background-size: 100% 1.5px; }

/* ember underline mark under a single hero word */
.mark {
  background: linear-gradient(var(--ember), var(--ember)) no-repeat;
  background-size: 100% 0.14em; background-position: 0 92%;
  padding: 0 0.02em;
}

/* ---- accessibility floor ------------------------------------------ */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 3px;
}
.skip-link {
  position: absolute; left: 0; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* active nav indicator */
.nav-link { color: var(--slate); font-weight: 500; transition: color .18s ease; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--ember);
  margin-top: 3px;
}

/* ---- reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
