/* ObsidianNW — additional CSS for upgraded sections */

/* =========================
   TELEMETRY BAND
   ========================= */
.telemetry-band {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(95,229,238,0.05), transparent 70%),
    var(--ob-1);
  position: relative;
  overflow: hidden;
}
.telemetry-band::before {
  /* Decorative topo lines in background */
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 119px, rgba(95,229,238,0.025) 120px),
    repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(95,229,238,0.025) 80px);
  pointer-events: none;
  mask: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

/* The metric grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.metric {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 32px 32px;
  background: rgba(11,14,21,0.6);
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.metric-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}
.metric-pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.metric-value {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--paper);
  font-feature-settings: "tnum";
  margin-top: 4px;
}
.metric-value .unit {
  font-size: 22px;
  color: var(--paper-3);
  letter-spacing: -0.025em;
  margin-left: 4px;
}
.metric-spark {
  width: 100%;
  height: 32px;
  margin-top: auto;
}
.metric-spark .spark-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px var(--cyan-glow));
}
.metric-spark .spark-area {
  fill: url(#sparkGrad);
}
.metric-spark .spark-dot {
  fill: var(--cyan-bri);
  filter: drop-shadow(0 0 6px var(--cyan-glow));
}
.metric-foot {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--paper-3);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.metric-foot .delta { color: var(--cyan); }

/* Log feed */
.log-feed {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  position: relative;
  z-index: 1;
}
.log-feed-head {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.log-feed-head .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  margin-right: 10px;
  vertical-align: 1px;
}
.log-feed-body {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow: hidden;
  mask: linear-gradient(to bottom, black 60%, transparent);
}
.log-line {
  display: grid;
  grid-template-columns: 88px 22px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px solid var(--line-soft);
}
.log-line .lt { color: var(--paper-3); }
.log-line .ls {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.log-line .ls.ok { color: var(--cyan); }
.log-line .ls.warn { color: var(--warm); }
.log-line .lh { color: var(--paper); }
.log-line .lr {
  color: var(--paper-3);
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* =========================
   "WHAT WE BUILD" UPGRADE
   ========================= */
.build-row {
  /* Replace prior columns with editorial layout */
  grid-template-columns: 120px 1.1fr 1.5fr 110px;
  gap: 48px;
  padding: 56px 0 50px;
  align-items: start;
  position: relative;
  overflow: hidden;
}
.build-row .idx {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--paper);
  font-feature-settings: "tnum";
  padding-top: 4px;
  position: relative;
}
.build-row .idx::after {
  /* Small label under the big number */
  content: attr(data-tag);
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 12px;
  opacity: 0.75;
}
.build-row h3 {
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 500;
}
.build-row .body {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--paper-2);
  max-width: 52ch;
  padding-top: 8px;
}
.build-row .tags {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 8px;
}
.build-row .viz {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  height: 110px;
  opacity: 0;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.build-row:hover .viz {
  opacity: 1;
  transform: translateY(-50%) translateX(-8px);
}
.build-row::after {
  /* Left-edge cyan tick that animates in on hover */
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  transition: width 450ms cubic-bezier(.2,.7,.2,1);
}
.build-row:hover::after {
  width: 28px;
}

/* Subtle inline visualizations */
.viz svg { width: 100%; height: 100%; }
.viz .vstroke { stroke: var(--cyan); stroke-width: 1; fill: none; }
.viz .vfill { fill: var(--cyan); }
.viz .vdim { stroke: rgba(236, 234, 217, 0.18); stroke-width: 0.8; fill: none; }

/* =========================
   "HOW WE WORK" UPGRADE — animated progress line
   ========================= */
.process-rail {
  position: relative;
}
.process-rail::after {
  /* Replace the static cyan band with a JS-controlled fill */
  display: none;
}
.process-progress {
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  z-index: 2;
  transition: width 80ms linear;
}
.step {
  position: relative;
  transition: background 400ms ease;
}
.step.is-active {
  background: linear-gradient(180deg, rgba(95,229,238,0.04), transparent);
}
.step.is-active .step-meta .marker {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 24px var(--cyan-glow);
}
.step .step-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  pointer-events: none;
}
.step.is-active .step-pulse {
  animation: stepPulse 1.2s ease-out;
}
@keyframes stepPulse {
  0% { transform: scaleX(0); opacity: 0.8; }
  100% { transform: scaleX(1); opacity: 0; }
}
.step .step-mini {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.step .step-mini-bar {
  flex: 1;
  height: 2px;
  background: var(--ob-4);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.step .step-mini-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: width 600ms cubic-bezier(.2,.7,.2,1);
}

/* =========================
   "BUILT TO KEEP WORKING" UPGRADE
   ========================= */
.support-cell .live {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.support-cell .live .pulse {
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.support-cell .live .pulse::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.support-cell .live .val {
  color: var(--paper);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  font-size: 12px;
  text-transform: none;
}
.support-cell .micro-bar {
  height: 2px;
  background: var(--ob-4);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}
.support-cell .micro-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 80%);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* =========================
   CONTACT — cinematic upgrade
   ========================= */
.contact {
  padding: 200px 0 160px;
}
.contact h2 {
  font-size: clamp(72px, 12vw, 220px);
  line-height: 0.82;
  letter-spacing: -0.055em;
  margin-bottom: 64px;
}
.contact-greeting {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-3);
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.contact-greeting .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.cursor::after {
  content: "▌";
  color: var(--cyan);
  animation: cursorBlink 1.1s steps(1) infinite;
  margin-left: 4px;
  font-weight: 300;
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* =========================
   SCROLL PROGRESS INDICATOR (right edge)
   ========================= */
.page-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 2px;
  height: 100vh;
  background: rgba(236, 234, 217, 0.04);
  z-index: 40;
  pointer-events: none;
}
.page-progress .pp-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: height 100ms linear;
}
.page-progress .pp-marker {
  position: absolute;
  left: -3px;
  width: 8px;
  height: 1px;
  background: var(--paper-3);
}
.page-progress .pp-marker[data-pct] {
  /* JS sets the top position based on data-pct */
}
