/* ============================================================
   XAINT — "THE LINE"  ·  schematic / signal-flow system
   Layered on top of xaint.css
   ============================================================ */

/* ---- Clean, near-flat backdrop (replaces the blueprint grid) ---- */
.blueprint {
  background:
    radial-gradient(135% 75% at 50% -15%,
      color-mix(in srgb, var(--accent) 6%, transparent) 0%,
      transparent 58%);
}
.blueprint-fade { /* no-op now; kept so existing markup is harmless */ }

/* ---- Eyebrow with station code ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow .bar { width: 30px; height: 1px; background: var(--accent); }
.eyebrow b { color: var(--accent); font-weight: 500; }

/* ============================================================
   SIGNAL LINE — horizontal schematic of stations
   ============================================================ */
.line-wrap { position: relative; }

.signal {
  --node: 56px;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: start;
  gap: 0;
}

/* the bus (track) the signal rides */
.signal::before {
  content: "";
  position: absolute;
  left: calc(100% / 12); right: calc(100% / 12);
  top: calc(var(--node) / 2);
  height: 2px;
  transform: translateY(-1px);
  background:
    repeating-linear-gradient(90deg,
      var(--line-2) 0 8px, transparent 8px 14px);
}
/* the moving energy pulse on the bus */
.signal::after {
  content: "";
  position: absolute;
  left: calc(100% / 12); right: calc(100% / 12);
  top: calc(var(--node) / 2);
  height: 2px; transform: translateY(-1px);
  background: linear-gradient(90deg,
    transparent 0%,
    transparent 38%,
    var(--accent) 50%,
    transparent 62%,
    transparent 100%);
  background-size: 220% 100%;
  opacity: 0.9;
  -webkit-mask: linear-gradient(90deg,#000,#000);
}
@media (prefers-reduced-motion: no-preference) {
  .signal[data-run="1"]::after { animation: flow 5.5s linear infinite; }
}
@keyframes flow { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.station { position: relative; text-align: center; padding-inline: 6px; }

/* node marker */
.station .node {
  width: var(--node); height: var(--node);
  margin: 0 auto;
  position: relative;
  display: grid; place-items: center;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
  z-index: 1;
}
.station .node .ring {
  position: absolute; inset: -7px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: .5;
}
.station .node .code {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 0.9rem; color: var(--ink-2);
  transition: color .4s var(--ease);
}
/* sequential activation = signal arriving */
@media (prefers-reduced-motion: no-preference) {
  .signal[data-run="1"] .station .node { animation: arrive 5.5s var(--ease) infinite; }
  .signal[data-run="1"] .station:nth-child(1) .node { animation-delay: 0.0s; }
  .signal[data-run="1"] .station:nth-child(2) .node { animation-delay: 0.45s; }
  .signal[data-run="1"] .station:nth-child(3) .node { animation-delay: 0.9s; }
  .signal[data-run="1"] .station:nth-child(4) .node { animation-delay: 1.35s; }
  .signal[data-run="1"] .station:nth-child(5) .node { animation-delay: 1.8s; }
  .signal[data-run="1"] .station:nth-child(6) .node { animation-delay: 2.25s; }
}
@keyframes arrive {
  0%, 100% { border-color: var(--line-2); box-shadow: none; }
  6%, 20% {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 24px -2px var(--glow);
  }
}
@keyframes arriveCode { 0%,100%{color:var(--ink-2)} 6%,20%{color:var(--accent)} }
@media (prefers-reduced-motion: no-preference) {
  .signal[data-run="1"] .station:nth-child(1) .code { animation: arriveCode 5.5s var(--ease) infinite 0s; }
  .signal[data-run="1"] .station:nth-child(2) .code { animation: arriveCode 5.5s var(--ease) infinite .45s; }
  .signal[data-run="1"] .station:nth-child(3) .code { animation: arriveCode 5.5s var(--ease) infinite .9s; }
  .signal[data-run="1"] .station:nth-child(4) .code { animation: arriveCode 5.5s var(--ease) infinite 1.35s; }
  .signal[data-run="1"] .station:nth-child(5) .code { animation: arriveCode 5.5s var(--ease) infinite 1.8s; }
  .signal[data-run="1"] .station:nth-child(6) .code { animation: arriveCode 5.5s var(--ease) infinite 2.25s; }
}

.station .s-label {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-top: 16px;
}
.station .s-name {
  font-family: var(--font-head); font-weight: 700; font-size: 0.98rem;
  letter-spacing: -0.01em; margin-top: 7px; line-height: 1.2;
}
.station .s-desc {
  font-size: 0.8rem; color: var(--ink-3); margin-top: 8px; line-height: 1.45;
  max-width: 18ch; margin-inline: auto;
}

/* loop-closes tail */
.loop-tail {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  margin-top: 26px;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
}
.loop-tail .seg {
  width: 46px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 10px);
}

/* vertical variant for mobile */
.signal-v { display: none; }

/* ============================================================
   DEEP STATION ROWS (Platform page)
   ============================================================ */
.st-row {
  display: grid; grid-template-columns: 88px 1.1fr 1fr; gap: clamp(20px,4vw,56px);
  align-items: center; padding-block: clamp(34px, 5vw, 62px);
  border-top: 1px solid var(--line);
}
.st-row:last-child { border-bottom: 1px solid var(--line); }
.st-index {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 1.5rem; color: var(--ink-3);
  display: flex; flex-direction: column; gap: 8px;
}
.st-index .tick { width: 28px; height: 2px; background: var(--accent); }
.st-visual {
  position: relative; aspect-ratio: 4 / 3;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--bg-2); overflow: hidden;
}
/* ============================================================
   DIFFERENTIATOR CLAIM CARDS
   ============================================================ */
.claim {
  position: relative; padding: clamp(26px,3vw,38px);
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--surface); overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.claim:hover { border-color: var(--accent); transform: translateY(-3px); }
.claim .big {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase;
}
.claim h3 { font-size: clamp(1.25rem,1.9vw,1.6rem); margin-top: 16px; }
.claim p { color: var(--ink-2); margin-top: 12px; font-size: 0.96rem; line-height: 1.6; }
.claim .watermark {
  position: absolute; right: -6px; bottom: -22px;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 6rem; line-height: 1; color: var(--ink);
  opacity: 0.04; pointer-events: none;
}

/* ============================================================
   ROADMAP HORIZON
   ============================================================ */
.horizon {
  position: relative;
  border: 1px solid var(--line); border-radius: 4px;
  background:
    linear-gradient(90deg, var(--bg-2), color-mix(in oklch, var(--accent) 5%, var(--bg-2)));
  overflow: hidden;
}
.horizon-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr);
}
.horizon-cell {
  padding: clamp(22px,3vw,34px);
  border-left: 1px solid var(--line);
  position: relative;
  min-height: 180px;
  display: flex; flex-direction: column; gap: 22px;
}
.horizon-cell:first-child { border-left: 0; }
.horizon-cell.live { background: color-mix(in oklch, var(--accent) 6%, transparent); }
.horizon-status {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 2px; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--ink-3); align-self: flex-start;
}
.horizon-status.on { color: var(--accent); border-color: var(--accent); }
.horizon-cell h4 { font-size: 1.1rem; margin-top: 0; }
.horizon-cell p { font-size: 0.85rem; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.horizon-dot {
  position: absolute; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-2); transform: translate(-3px, -3px);
}
.horizon-cell.live .horizon-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--glow); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .signal { display: none; }
  .signal-v { display: block; position: relative; padding-left: 8px; }
  .sv-item { position: relative; padding: 0 0 28px 40px; }
  .sv-item::before {
    content: ""; position: absolute; left: 13px; top: 26px; bottom: -4px; width: 2px;
    background: repeating-linear-gradient(var(--line-2) 0 6px, transparent 6px 12px);
  }
  .sv-item:last-child::before { display: none; }
  .sv-node {
    position: absolute; left: 0; top: 2px;
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--accent); background: var(--bg);
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--accent);
  }
  .sv-label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--accent); }
  .sv-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
  .sv-desc { font-size: 0.88rem; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }

  .st-row { grid-template-columns: 1fr; gap: 20px; }
  .st-index { flex-direction: row; align-items: center; }
  .st-index .tick { width: 40px; }
  .horizon-track { grid-auto-flow: row; grid-auto-columns: auto; }
  .horizon-cell { border-left: 0; border-top: 1px solid var(--line); }
  .horizon-cell:first-child { border-top: 0; }
}
