/* ==========================================================================
   Monolith — Success Stories index page
   The archive as a broadcast console: a compact channel guide (dotted
   leaders, TV-guide style) beside one fixed CRT monitor that tunes to
   whichever row is hovered/focused, with a static burst between channels.
   Idle, it runs attract mode and zaps through the archive on its own
   (js/pages/success-stories.js). CH 10 is a dead channel — pure static,
   NO SIGNAL — reserved for the next client, linking to contact. Replaced
   the old typography-first index whose 150px row names cost ~5000px of
   scroll for nine projects; this fits the whole archive on one screen.
   ========================================================================== */

.lime { color: #BCFF56; }

/* ============ page keyframes ============ */
@keyframes ssMonScan {
  0%   { top: -6%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 106%; opacity: 0; }
}

/* ============ hero ============ */
.ss-hero { max-width: 1440px; margin: 0 auto; padding: 110px 80px 64px; box-sizing: border-box; }
.ss-hero-inner { display: flex; flex-direction: column; gap: 32px; }
.ss-eyebrow {
  font-family: 'VCR OSD Mono', monospace; font-size: 13px; letter-spacing: 0.12em;
  color: #747474; text-transform: uppercase;
}
.ss-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.ss-h1 {
  margin: 0; font-weight: 400; font-size: clamp(48px, 6vw, 88px); line-height: 0.98;
  letter-spacing: -0.04em; color: #FFFFFF;
}
.ss-status {
  display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px;
  font-family: 'VCR OSD Mono', monospace; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #565656; text-align: right;
}
.ss-status em { font-style: normal; color: #9C9C9C; }
.ss-status em.lime, .ss-status .lime { color: #BCFF56; }
.ss-hero-copy { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.45; color: #9C9C9C; }

/* ============ the console ============ */
.ss-console-section { max-width: 1440px; margin: 0 auto; padding: 8px 80px 0; box-sizing: border-box; }
.ss-console {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 34vw, 470px);
  gap: clamp(40px, 5vw, 80px); align-items: start;
}

/* ---- channel guide ---- */
.ss-channels { border-top: 1px solid #2E2E2E; }
.ss-ch {
  display: flex; align-items: baseline; gap: 16px;
  padding: 19px 10px 19px 14px; border-bottom: 1px solid #2E2E2E;
  text-decoration: none; color: inherit; cursor: pointer;
  transition: background-color 0.2s ease;
}
.ss-ch-num {
  font-family: 'VCR OSD Mono', monospace; font-size: 12px; letter-spacing: 0.1em;
  color: #565656; flex: none; transition: color 0.2s ease;
}
.ss-ch-name {
  font-weight: 400; font-size: clamp(19px, 1.8vw, 26px); letter-spacing: -0.02em;
  line-height: 1.1; color: #D1D1D1; white-space: nowrap;
  transition: color 0.2s ease;
}
/* the dotted leader — TV-guide / table-of-contents connective tissue */
.ss-ch-leader {
  flex: 1 1 24px; min-width: 24px; align-self: center;
  border-bottom: 2px dotted #333333; transform: translateY(-0.2em);
  transition: border-color 0.2s ease;
}
.ss-ch-sector {
  font-family: 'VCR OSD Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  color: #565656; text-transform: uppercase; white-space: nowrap; flex: none;
  transition: color 0.2s ease;
}

/* tuned = the channel currently on the monitor (hover, focus, arrow keys,
   or attract mode). Hover/focus and the JS class behave identically so
   attract mode lights rows exactly like a real hover would. */
.ss-ch:hover, .ss-ch:focus-visible, .ss-ch.is-tuned { background: #202020; }
.ss-ch:hover .ss-ch-name, .ss-ch:focus-visible .ss-ch-name, .ss-ch.is-tuned .ss-ch-name { color: #BCFF56; }
.ss-ch:hover .ss-ch-num, .ss-ch:focus-visible .ss-ch-num, .ss-ch.is-tuned .ss-ch-num { color: #BCFF56; }
.ss-ch:hover .ss-ch-leader, .ss-ch:focus-visible .ss-ch-leader, .ss-ch.is-tuned .ss-ch-leader { border-color: #4A5B2E; }
.ss-ch:hover .ss-ch-sector, .ss-ch:focus-visible .ss-ch-sector, .ss-ch.is-tuned .ss-ch-sector { color: #9C9C9C; }
.ss-ch:focus-visible { outline: 1px solid #BCFF56; outline-offset: -1px; }

/* the dead channel reads dimmer until you land on it */
.ss-ch-dead .ss-ch-name { color: #6E6E6E; }
.ss-ch-dead:hover .ss-ch-name, .ss-ch-dead:focus-visible .ss-ch-name, .ss-ch-dead.is-tuned .ss-ch-name { color: #BCFF56; }

/* ---- the monitor ---- */
.ss-monitor-col { position: sticky; top: 92px; }
.ss-monitor {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: #0E0E0E; text-decoration: none;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(188,255,86,0.15);
}
.ss-mon-img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.95);
}
.ss-mon-duotone { position: absolute; inset: 0; background: #BCFF56; mix-blend-mode: multiply; opacity: 0.5; }
.ss-mon-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.22) 0, rgba(0,0,0,0.22) 1px, transparent 1px, transparent 3px);
}
.ss-mon-sweep {
  position: absolute; left: 0; right: 0; top: -6%; height: 3px; background: #D6FE99;
  box-shadow: 0 0 16px rgba(214,254,153,0.9);
  animation: ssMonScan 2.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ss-mon-sweep { display: none; }
}
/* the static between channels — canvas noise, faded in/out by JS via
   [data-on]; stays on permanently while the dead channel is tuned */
.ss-mon-static {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; opacity: 0; transition: opacity 0.12s linear;
  pointer-events: none;
}
.ss-mon-static[data-on="1"] { opacity: 0.9; }
.ss-mon-nosignal {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-family: 'VCR OSD Mono', monospace; font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.3em; text-indent: 0.3em; color: #FFFFFF;
  text-shadow: 0 0 14px rgba(255,255,255,0.55); animation: blink 1.4s steps(1) infinite;
}
.ss-mon-nosignal[data-on="1"] { display: flex; }

.ss-mon-top {
  position: absolute; left: 0; right: 0; top: 0; display: flex;
  justify-content: space-between; align-items: center; padding: 8px 10px;
}
.ss-mon-rec {
  display: flex; align-items: center; gap: 6px;
  font-family: 'VCR OSD Mono', monospace; font-size: 10px; letter-spacing: 0.12em; color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.ss-rec-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #FF4D4D;
  box-shadow: 0 0 6px rgba(255,77,77,0.9);
  animation: blink 1.1s steps(1) infinite;
}
.ss-mon-ch {
  font-family: 'VCR OSD Mono', monospace; font-size: 15px; letter-spacing: 0.14em;
  color: #D6FE99; text-shadow: 0 0 10px rgba(214,254,153,0.6);
}
.ss-mon-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex;
  justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 10px;
  background: linear-gradient(to top, rgba(10,10,10,0.85), rgba(10,10,10,0));
  font-family: 'VCR OSD Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase;
}
.ss-mon-name { font-size: 12px; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-mon-sector { font-size: 10px; color: #9C9C9C; white-space: nowrap; flex: none; }

.ss-mon-hint {
  margin: 14px 0 0; font-family: 'VCR OSD Mono', monospace; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #565656;
}

/* ============ cta ============ */
.ss-cta { max-width: 1440px; margin: 0 auto; padding: 140px 80px 120px; box-sizing: border-box; }
.ss-cta-eyebrow { display: block; font-family: 'VCR OSD Mono', monospace; font-size: 13px; letter-spacing: 0.12em; color: #747474; text-transform: uppercase; }
.ss-cta-link {
  display: inline-block; margin-top: 32px; font-family: 'VCR OSD Mono', monospace;
  font-size: clamp(28px, 5vw, 72px); color: #FFFFFF; text-decoration: none; text-transform: uppercase; line-height: 1.1;
  transition: color 0.2s ease;
}
.ss-cta-link:hover { color: #BCFF56; }

/* ============ mobile + tablet ============ */
@media (max-width: 980px) {
  /* single column: monitor first (the TV), guide under it (the listings).
     No sticky — it would pin the TV over the list it's meant to sit above. */
  .ss-console { grid-template-columns: 1fr; gap: 40px; }
  .ss-monitor-col { position: static; order: -1; max-width: 560px; }
  .ss-mon-hint { display: none; }
}
@media (max-width: 900px) {
  .ss-hero, .ss-console-section, .ss-cta { padding-left: 22px !important; padding-right: 22px !important; }
  .ss-status { display: none; }
}
@media (max-width: 620px) {
  /* name + sector can't share a line with leaders at phone widths —
     stack them and let the leader go; the row stays one tap target */
  .ss-ch { flex-wrap: wrap; row-gap: 4px; padding: 15px 8px 15px 10px; }
  .ss-ch-leader { display: none; }
  .ss-ch-name { white-space: normal; }
  .ss-ch-sector { flex-basis: 100%; padding-left: 52px; /* aligns under the name, past "CH 01" + gap */ }
}
