/*
 * ── Color tokens ──────────────────────────────────────────────
 *   bg         #111111   page background
 *   yellow     #f5c800   accent / tape fill
 *   gold       #c9a400   tape border / dark yellow
 *   white      #ffffff   primary text
 *   white-dim  rgba(255,255,255,.5)   secondary text
 *   overlay    rgba(0,0,0,.7)         dark overlay
 */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  overflow: hidden;
}

/* Grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 75px 75px;
  pointer-events: none;
  z-index: 0;
}

/* Radial vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 60%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Stage: clips both tapes to the viewport ──────────────── */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

/* ── Caution tape strip — Neo-Brutalist ───────────────────── */
.tape {
  position: absolute;
  width: 120vw;
  overflow: hidden;
  padding: 10px 0;
  background-color: #f5c800;
  background-image: 
    linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px),
    repeating-linear-gradient(
      -45deg,
      #f5c800 0px,
      #f5c800 100px,
      #f0f0f0 100px,
      #f0f0f0 200px
    );
  background-size: 20px 20px, 20px 20px, 100% 100%;
  border-top:    6px solid #000000;
  border-bottom: 6px solid #000000;
  box-shadow: 0 0 20px rgba(245, 200, 0, 0.15);
  pointer-events: auto;
  transition: background-color 0.3s ease;
}

.tape:hover {
  background-color: #ffffff;
}

/*
 * TOP tape — pivot at left center, rotate(-20deg) swings right side UP.
 *   Left-edge crossing  ≈ (0, ~15 vh)
 *   Top-edge crossing   ≈ (12 vw, 0)
 */
.tape--top {
  left: -10vw;
  top:  15vh;
  transform: rotate(-20deg);
  transform-origin: left center;
}

/*
 * BOTTOM tape — mirror. Pivot at right center, rotate(20deg) swings left side DOWN.
 *   Right-edge crossing ≈ (100 vw, ~92 vh)
 *   Bottom-edge crossing ≈ (88 vw, 100 vh)
 */
.tape--bottom {
  right:  -10vw;
  bottom: -20vh;
  transform: rotate(20deg);
  transform-origin: right center;
}

/* ── Scrolling text track ─────────────────────────────────── */
.tape__track {
  display: flex;
  white-space: nowrap;
  width: max-content;
}

.tape--top    .tape__track { animation: scroll-left  40s linear infinite; }
.tape--bottom .tape__track { animation: scroll-right 50s linear infinite; }

/* shared base — inline-flex so the span stays inline in the track */
.tape__text,
.tape__text_info {
  display: inline-flex;
  align-items: center;
  padding: 0;
  line-height: 1;
  font-family: 'Stick No Bills', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* primary — crisp outline with webkit-text-stroke */
.tape__text {
  color: #000000;
}

/* secondary: same but dimmed */
.tape__text_info {
  color: rgba(0,0,0,.45);
}

/* separator — neo-brutalist diamond */
.tape__text::after,
.tape__text_info::after {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0 40px;
  background-color: #000000;
  border: 2px solid #f5c800;
  border-radius: 0;
  transform: rotate(45deg);
}

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ── Center card ──────────────────────────────────────────── */
.card {
  text-align: left;
  padding: 40px;
  background-color: #f0f0f0;
  background-image: 
    linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 6px solid #000000;
  border-radius: 0;
  box-shadow: 15px 15px 0 #f5c800;
  max-width: 600px;
  width: 90%;
  position: relative;
  z-index: 10;
  transform: translateY(-10vh);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: crosshair;
}

.card:hover {
  box-shadow: 25px 25px 0 #000000;
}

.card::before {
  content: "REF: KNY-000";
  position: absolute;
  top: -35px;
  right: 0;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 800;
  color: #f5c800;
  letter-spacing: 0.2em;
}

.card__header {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card__brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: #000000;
  background-color: #f5c800;
  display: inline-block;
  padding: 4px 12px;
  border: 4px solid #000000;
  box-shadow: 4px 4px 0 #000000;
}

.card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #000000;
  text-decoration: none;
  background-color: #ffffff;
  padding: 4px 12px;
  border: 4px solid #000000;
  box-shadow: 4px 4px 0 #f5c800;
  transition: all 0.1s ease;
  backface-visibility: hidden;
}

.arrow {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.arrow--left {
  animation: arrow-push-right 0.6s infinite alternate;
}

.arrow--right {
  animation: arrow-push-left 0.6s infinite alternate;
}

.card__link:hover .arrow {
  /* keep moving */
}

.card__link:hover .arrow--left {
  /* animation handles movement */
}

.card__link:hover .arrow--right {
  /* animation handles movement */
}

@keyframes arrow-push-right {
  from { transform: translateX(0); }
  to   { transform: translateX(4px); }
}

@keyframes arrow-push-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-4px); }
}

.card__link:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #f5c800;
}

.card__heading {
  font-family: 'Stick No Bills', sans-serif;
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 800;
  color: #000000;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.card__heading::after {
  content: '_';
  margin-left: 4px;
  animation: blink .8s step-end infinite;
}

/* ── Boot Overlay Style ───────────────────────────────────── */
.boot-overlay {
  position: fixed;
  inset: 0;
  background-color: #000000;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: monospace;
  transition: opacity 0.5s ease-out, visibility 0.5s;
  padding-top: 20vh;
}

.boot-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-overlay__content {
  color: #ffffff;
  width: 90%;
  max-width: 450px;
}

.boot-line {
  margin-bottom: 4px;
  font-size: 0.85rem;
  opacity: 0;
  display: none;
}

.boot-line.show {
  opacity: 1;
  display: block;
}

.boot-line__tag {
  font-weight: bold;
  margin-right: 8px;
}

.tag--ok { color: #00ff00; }
.tag--warn { color: #f5c800; }
.tag--info { color: #00e0ff; }

.boot-cursor {
  display: inline-block;
  color: #00ff00;
  font-size: 1rem;
  animation: blink 0.8s step-end infinite;
  margin-top: 10px;
}

.card__heading .amp {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  background: #eeeeee;
  border: 2px solid #000000;
  padding: 0 8px;
  font-size: 0.8em;
  vertical-align: middle;
}

/* ── Card Footer & Status Bar ────────────────────────────── */
.card__footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed #000000;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.status-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-bar__label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #666666;
}

.status-bar__value {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #000000;
  background: #00ff00;
  padding: 2px 8px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  width: fit-content;
}

.card__meta {
  font-size: 0.7rem;
  font-weight: 700;
  color: #999999;
  font-family: monospace;
}

@keyframes pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

.dot {
  display: inline-block;
  opacity: 0;
  animation: dot-jump 1.5s ease-in-out infinite;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.25s; }
.dot:nth-child(3) { animation-delay: 0.5s; }

@keyframes dot-jump {
  0%,  60%, 100% { transform: translateY(0);    opacity: 0; }
  20%            { transform: translateY(-5px); opacity: 1; }
  40%            { transform: translateY(0);    opacity: 1; }
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .tape {
    width: 140vw;
  }
  .tape--top {
    left: -20vw;
  }
  .tape--bottom {
    bottom: -10vh;
    right: -20vw;
  }
  .card { 
    padding: 24px; 
    border-width: 5px;
    box-shadow: 10px 10px 0 #f5c800;
  }
  .card__heading { 
    font-size: clamp(1.8rem, 12vw, 3rem); 
  }
  .card__header {
    flex-direction: column;
    gap: 12px;
  }
  .card__brand {
    font-size: 0.8rem;
    padding: 2px 8px;
  }
  .card__link {
    font-size: 0.7rem;
    padding: 2px 8px;
    width: fit-content;
  }
}
