/* ── the cabinet: marquee, bezel, CRT glass, plate ───────────────
   Two worlds on purpose. The cabinet is physical — Bungee lettering,
   plastic, screws, hairline edges. The screen is emitted light —
   pixel type, phosphor bloom, scanlines.
   ──────────────────────────────────────────────────────────────── */

/* ── marquee ─────────────────────────────────────────────────── */

.marquee {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, var(--cabinet-hi), var(--cabinet));
  border-bottom: 1px solid var(--bezel-edge);
  padding-block: clamp(0.85rem, 0.6rem + 0.9vw, 1.35rem);
}

.marquee__light {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red) 22%, var(--red) 78%, transparent);
  box-shadow: 0 0 18px rgba(255, 45, 60, 0.7), 0 0 46px rgba(255, 45, 60, 0.3);
}

.marquee__inner {
  display: flex;
  align-items: baseline;
  gap: clamp(0.75rem, 0.4rem + 1.4vw, 1.6rem);
  flex-wrap: wrap;
}

.marquee__word {
  font-family: var(--font-marquee);
  font-size: var(--t-marquee);
  line-height: 1;
  text-transform: uppercase;
  color: var(--red);
  text-shadow: var(--bloom-red);
}

.marquee__rule {
  flex: 1 1 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--bezel-edge), transparent);
  transform: translateY(-0.35em);
}

.marquee__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marquee__chip {
  padding: 0.28em 0.55em;
  background: var(--red);
  color: var(--void);
}

.marquee__chain { color: var(--paper-dim); }

.marquee__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.875rem;
}

.marquee__price-label {
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.marquee__price-value {
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

/* ── bezel ───────────────────────────────────────────────────── */

.bezel {
  padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem) var(--space-section);
}

/* ── screen ──────────────────────────────────────────────────── */

.screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(18px, 2.5vw, 34px);
  background:
    radial-gradient(120% 110% at 50% 32%, #1A0A10 0%, #0B0508 68%, #050205 100%);
  border: 1px solid var(--bezel-edge);
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 30px 90px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(255, 45, 60, 0.07);
}

.screen__body {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 1rem + 3.4vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 1rem + 3.5vw, 5rem);
  align-content: start;
}

.hud { grid-column: 1 / -1; }

.screen__title,
.screen__lede,
.rec,
.screen__action { grid-column: 1; }

/* aligned with the bar and the button, the two things it describes */
.side { grid-column: 2; grid-row: 4 / span 2; }

/* glass overlay sits above the content — scanlines fall on the pixels */
.screen__glass {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 18%),
    radial-gradient(105% 95% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.72) 100%),
    repeating-linear-gradient(180deg, transparent 0 2px, var(--scanline) 2px 3px);
}

/* boot: the tube warms, a line strikes, then the raster opens */
.screen__flash {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 3;
  height: 3px;
  background: var(--paper);
  box-shadow: 0 0 26px rgba(239, 230, 214, 0.9);
  transform: translateY(-50%) scaleX(0);
  animation: strike var(--dur-boot) var(--ease-snap) forwards;
}

@keyframes strike {
  0%   { transform: translateY(-50%) scaleX(0);   opacity: 1; }
  40%  { transform: translateY(-50%) scaleX(1);   opacity: 1; }
  100% { transform: translateY(-50%) scaleX(1);   opacity: 0; }
}

.screen__body > * {
  opacity: 0;
  animation: raster 520ms var(--ease-out) forwards;
}
.screen__body > *:nth-child(1) { animation-delay: 300ms; }
.screen__body > *:nth-child(2) { animation-delay: 380ms; }
.screen__body > *:nth-child(3) { animation-delay: 470ms; }
.screen__body > *:nth-child(4) { animation-delay: 540ms; }
.screen__body > *:nth-child(5) { animation-delay: 600ms; }
.screen__body > *:nth-child(6) { animation-delay: 660ms; }

@keyframes raster {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── HUD ─────────────────────────────────────────────────────── */

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 45, 60, 0.16);
}

.hud__left { color: var(--red); }

.hud__right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper-dim);
}

.hud__dot {
  width: 7px;
  height: 7px;
  background: var(--amber);
  box-shadow: 0 0 10px currentColor;
}
.hud__dot[data-state='live']    { background: var(--cyan); }
.hud__dot[data-state='closed']  { background: var(--red); }

/* ── title with channel split ────────────────────────────────── */

.screen__title {
  position: relative;
  margin-top: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: var(--t-screen);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-shadow: 0 0 24px rgba(239, 230, 214, 0.28);
}

.screen__title::before,
.screen__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}
.screen__title::before { color: var(--red);  transform: translate(-3px, 1px); }
.screen__title::after  { color: var(--cyan); transform: translate(3px, -1px); opacity: 0.7; }

.screen__lede {
  margin-top: 1.2rem;
  max-width: 46ch;
  color: var(--paper-dim);
}

/* ── record bar ──────────────────────────────────────────────── */

.rec {
  position: relative;
  margin-top: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  height: 20px;
  max-width: 34rem;
  background: rgba(122, 12, 20, 0.4);
  border: 1px solid rgba(255, 45, 60, 0.35);
  overflow: hidden;
}

.rec__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  box-shadow: 0 0 16px rgba(255, 45, 60, 0.65);
  transition: width 900ms var(--ease-out);
}

.rec__cells {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 10px, var(--void) 10px 13px);
}

/* ── progress readout ────────────────────────────────────────────
   Sits in the second column so the raster is not half empty on wide
   screens, and the hairline reads as a divider on the glass.
   ──────────────────────────────────────────────────────────────── */

.side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.1rem;
  padding-left: clamp(1.25rem, 0.9rem + 1.2vw, 2rem);
  border-left: 1px solid rgba(255, 45, 60, 0.16);
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side__label { color: var(--paper-faint); }

.side__list { display: grid; gap: 0.7rem; }

.side__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper-faint);
  transition: color var(--dur-normal) linear;
}

.side__cursor {
  color: var(--red);
  opacity: 0;
  transition: opacity var(--dur-normal) linear;
}

.side__item.is-active { color: var(--paper); }
.side__item.is-active .side__cursor { opacity: 1; }

.side__note {
  max-width: 18ch;
  line-height: 1.7;
  color: var(--amber);
}

/* ── primary action ──────────────────────────────────────────── */

.screen__action { margin-top: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }

.btn {
  --lift: 6px;
  position: relative;
  display: inline-block;
  padding: 0;
  border: 0;
  background: var(--red-ink);
  cursor: pointer;
  font: inherit;
  border-radius: 2px;
}

.btn__face {
  display: block;
  padding: 1.05rem 2.4rem;
  background: var(--red);
  color: var(--void);
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.7rem + 0.5vw, 1.0625rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transform: translate(0, calc(var(--lift) * -1));
  transition: transform var(--dur-fast) var(--ease-snap),
              filter var(--dur-fast) linear;
}

.btn:hover .btn__face  { transform: translate(0, -9px); filter: brightness(1.12); }
.btn:active .btn__face { transform: translate(0, -1px); filter: brightness(0.95); }
.btn:focus-visible     { outline-offset: 5px; }

.blink {
  margin-top: 1.1rem;
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  animation: blink 1.15s steps(1, end) infinite;
}

@keyframes blink {
  0%, 55%  { opacity: 1; }
  56%, 100% { opacity: 0.15; }
}

/* ── contract plate ──────────────────────────────────────────── */

.plate {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 0.4rem + 1vw, 1.25rem);
  flex-wrap: wrap;
  margin-top: clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
  padding: 0.85rem clamp(0.9rem, 0.6rem + 1.4vw, 1.5rem);
  background: linear-gradient(180deg, var(--cabinet-hi), var(--cabinet));
  border: 1px solid var(--bezel-edge);
  border-radius: 4px;
}

.plate__label {
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.plate__ca {
  flex: 1 1 16rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(0.75rem, 0.68rem + 0.35vw, 0.9375rem);
  color: var(--paper);
}

.plate__copy {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font-pixel);
  font-size: var(--t-hud);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-fast) linear, color var(--dur-fast) linear;
}

.plate__copy:hover { background: var(--red); color: var(--void); }
.plate__copy[data-state='done'] { border-color: var(--cyan); color: var(--cyan); }
.plate__copy[data-state='done']:hover { background: var(--cyan); color: var(--void); }

/* ── small screens ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .screen__body { grid-template-columns: minmax(0, 1fr); }

  .side {
    grid-column: 1;
    grid-row: auto;
    margin-top: clamp(2rem, 1.4rem + 2.4vw, 3rem);
    padding-left: 0;
    padding-top: 1.25rem;
    border-left: 0;
    border-top: 1px solid rgba(255, 45, 60, 0.16);
  }

  .side__note { max-width: 32ch; }
}

@media (max-width: 640px) {
  .marquee__rule { display: none; }
  .marquee__price { margin-left: 0; width: 100%; }
  .btn__face { width: 100%; text-align: center; }
  .btn { display: block; width: 100%; }
}
