/* ═══════════════════════════════════════════════════════════════
   UNCANNY ALLEY — a glitch in the metaverse
   ═══════════════════════════════════════════════════════════════ */

:root {
  --black: #000000;
  --void: #050506;
  --panel: rgba(8, 8, 10, 0.72);
  --white: #f2f2f2;
  --dim: #9a9aa2;
  --faint: #55555e;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff2a2a;            /* alley red */
  --accent-rgb: 255, 42, 42;
  --mono: 'Share Tech Mono', monospace;
  --display: 'Teko', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  transition: --accent 0.6s;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

::selection { background: rgba(var(--accent-rgb), 0.85); color: #000; }

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.9);
  outline-offset: 3px;
}

/* ═══ BACKGROUND SIGNAL ═══ */
.signal-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden; background: var(--black);
}
.video-feed-wrapper {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 100vh;
  transform: translate(-50%, -50%) scale(1.12);
  filter: grayscale(100%) contrast(1.5) brightness(0.32);
  opacity: 0.55;
  transition: opacity 0.7s ease;
}
.video-feed-wrapper.tuning { opacity: 0; }
.video-feed-wrapper iframe {
  position: absolute; top: 50%; left: 50%;
  /* oversize so 16:9 always covers the viewport */
  width: max(100vw, 177.78vh); height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%);
  border: none; pointer-events: none;
}
.tint-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--accent-rgb), 0.14), transparent 65%);
  mix-blend-mode: screen;
  transition: background 1.2s ease;
}
.crt-lines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0, 0, 0, 0.28) 3px, rgba(0, 0, 0, 0.28) 4px
  );
}
.noise-overlay {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  animation: noise-shift 0.6s steps(4) infinite;
}
@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}
.vignette-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.88) 100%);
}

/* ═══ NAV ═══ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(24px, 4vw);
  background: linear-gradient(to bottom, rgba(0,0,0,0.97), rgba(0,0,0,0.82) 55%, transparent);
}
.nav-logo img { display: block; width: 108px; height: auto; }
.nav-links {
  display: flex; gap: 26px; margin-left: auto;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav-links a {
  text-decoration: none; color: var(--dim);
  transition: color 0.2s;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--white); text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.9); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

.btn {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 10px 20px;
  border: 1px solid var(--line);
  color: var(--white); background: transparent;
  transition: all 0.2s; white-space: nowrap; display: inline-block;
}
.btn-ghost:hover { border-color: var(--white); }
.btn-solid {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.25), inset 0 0 12px rgba(var(--accent-rgb), 0.1);
}
.btn-solid:hover {
  background: var(--accent); color: #000;
  box-shadow: 0 0 32px rgba(var(--accent-rgb), 0.6);
}
.btn-lg { padding: 14px 32px; font-size: 15px; }

.nav-burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 1px solid var(--line); padding: 10px;
  cursor: pointer;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--white); }

/* ═══ LAYOUT / TYPE ═══ */
main { position: relative; z-index: 1; }

.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
  margin: 0 0 10px;
  transition: color 0.6s, text-shadow 0.6s;
}
h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.92;
  margin: 0;
}
h1 { font-size: clamp(44px, 12.5vw, 190px); letter-spacing: 0.02em; }
h2 { font-size: clamp(44px, 7vw, 96px); }
.tagline {
  font-size: 15px; color: var(--dim); margin: 8px 0 0;
  letter-spacing: 0.04em;
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  position: relative;
}
.hero-sub {
  max-width: 620px; color: var(--dim);
  font-size: 15px; margin: 22px auto 0;
}
.hero-ctas { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.hero-laurels {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  align-items: center;
  margin-top: 46px; max-width: 760px;
  position: relative;
  padding: 0 76px;
}
/* branchy things — laurel fronds flanking the honours */
.hero-laurels::before, .hero-laurels::after {
  content: '';
  position: absolute; top: 50%;
  width: 66px; height: 126px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 110'%3E%3Cpath d='M50 104 C 24 86, 14 56, 24 6' fill='none' stroke='%23f2f4f8' stroke-width='2'/%3E%3Cg fill='%23f2f4f8'%3E%3Cellipse cx='48' cy='96' rx='3.2' ry='9' transform='rotate(-52 48 96)'/%3E%3Cellipse cx='40' cy='86' rx='3.2' ry='9' transform='rotate(-40 40 86)'/%3E%3Cellipse cx='33' cy='75' rx='3.2' ry='9' transform='rotate(-28 33 75)'/%3E%3Cellipse cx='28' cy='63' rx='3.2' ry='9' transform='rotate(-16 28 63)'/%3E%3Cellipse cx='25' cy='51' rx='3.2' ry='9' transform='rotate(-6 25 51)'/%3E%3Cellipse cx='24' cy='39' rx='3.2' ry='9' transform='rotate(2 24 39)'/%3E%3Cellipse cx='25' cy='27' rx='3.2' ry='9' transform='rotate(10 25 27)'/%3E%3Cellipse cx='27' cy='15' rx='3.2' ry='9' transform='rotate(18 27 15)'/%3E%3Cellipse cx='56' cy='88' rx='3' ry='8.2' transform='rotate(-84 56 88)'/%3E%3Cellipse cx='49' cy='76' rx='3' ry='8.2' transform='rotate(-72 49 76)'/%3E%3Cellipse cx='43' cy='64' rx='3' ry='8.2' transform='rotate(-60 43 64)'/%3E%3Cellipse cx='38' cy='52' rx='3' ry='8.2' transform='rotate(-50 38 52)'/%3E%3Cellipse cx='35' cy='40' rx='3' ry='8.2' transform='rotate(-42 35 40)'/%3E%3Cellipse cx='34' cy='28' rx='3' ry='8.2' transform='rotate(-32 34 28)'/%3E%3Cellipse cx='35' cy='16' rx='3' ry='8.2' transform='rotate(-22 35 16)'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.9;
  pointer-events: none;
}
.hero-laurels::before { left: 0; }
.hero-laurels::after { right: 0; transform: translateY(-50%) scaleX(-1); }
.hero-laurels span {
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--dim); border: 1px solid var(--line);
  padding: 7px 14px; background: rgba(0,0,0,0.4);
}
.hero-laurels span:first-child {
  color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5);
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
}
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--accent); text-decoration: none; font-size: 18px;
  animation: cue-bob 2s ease-in-out infinite;
}
@keyframes cue-bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* ═══ GLITCH HEADLINE ═══ */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  overflow: hidden; opacity: 0.8;
  pointer-events: none;
}
.glitch::before {
  color: rgba(var(--accent-rgb), 0.9);
  animation: glitch-a 3.2s steps(1) infinite;
}
.glitch::after {
  color: rgba(200, 200, 210, 0.7);
  animation: glitch-b 2.7s steps(1) infinite;
}
@keyframes glitch-a {
  0%, 91%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  92% { transform: translate(-6px, 2px); clip-path: inset(12% 0 56% 0); }
  94% { transform: translate(4px, -2px); clip-path: inset(64% 0 8% 0); }
  96% { transform: translate(-3px, 1px); clip-path: inset(38% 0 40% 0); }
}
@keyframes glitch-b {
  0%, 88%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  89% { transform: translate(5px, -1px); clip-path: inset(70% 0 12% 0); }
  93% { transform: translate(-5px, 2px); clip-path: inset(8% 0 74% 0); }
  97% { transform: translate(3px, 1px); clip-path: inset(44% 0 30% 0); }
}

/* ═══ CHAPTER SLIDESHOWS ═══ */
.chapter-slides {
  display: none;
  position: relative;
  margin-top: 54px;
  aspect-ratio: 21 / 9;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.chapter-slides.active { display: block; }
.chapter-slides img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
/* incoming slide fades in ON TOP of the previous one (which holds at
   full opacity underneath) — no dip to black between dark frames */
.chapter-slides img.cur { opacity: 1; z-index: 2; }
.chapter-slides img.was { opacity: 1; z-index: 1; transition: none; }
.chapter-slides::after {
  /* light CRT pass so screenshots sit in the site's world */
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  z-index: 3;
  background:
    repeating-linear-gradient(to bottom,
      transparent 0 3px, rgba(0, 0, 0, 0.09) 3px 4px),
    radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.28) 100%);
}

/* ═══ LAUREL TICKER ═══ */
.laurel-ticker {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.72);
  overflow: hidden;
  padding: 22px 0;
  position: relative; z-index: 1;
}
.laurel-ticker.active { display: block; }
.laurel-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-run 40s linear infinite;
  will-change: transform;
}
.laurel-set { display: inline-flex; align-items: center; gap: 96px; padding-right: 96px; }
.laurel-set img {
  height: 80px; width: auto; max-width: 220px;
  object-fit: contain; display: block;
  opacity: 0.92;
}
@media (max-width: 560px) { .laurel-set img { height: 58px; max-width: 160px; } .laurel-set { gap: 72px; padding-right: 72px; } }

/* ═══ TICKER ═══ */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.65);
  overflow: hidden; padding: 10px 0;
  position: relative; z-index: 1;
}
.ticker-track {
  display: inline-flex; gap: 60px; white-space: nowrap;
  font-size: 12px; letter-spacing: 0.2em; color: var(--faint);
  text-transform: uppercase;
  animation: ticker-run 90s linear infinite;
}
.ticker-track b { color: var(--accent); font-weight: normal; }
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══ CHAPTERS ═══ */
.chapter, .log, .gallery { padding: 130px 24px; position: relative; }
.chapter-inner { max-width: 1180px; margin: 0 auto; }
.chapter-head {
  display: flex; align-items: flex-start; gap: 30px;
  margin-bottom: 54px;
}
.chapter-num {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(90px, 12vw, 170px); line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.55);
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.2);
  transition: -webkit-text-stroke 0.6s, text-shadow 0.6s;
  user-select: none;
}
.chapter-body {
  display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 48px; align-items: start;
}
.chapter-copy p { margin: 0 0 22px; color: #cfcfd6; }
.chapter-copy strong { color: var(--white); text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.35); }
.chapter-copy em { color: var(--dim); }
.chapter-copy a {
  color: inherit;
  text-decoration-color: rgba(var(--accent-rgb), 0.7);
  text-underline-offset: 4px;
}
.chapter-copy a:hover { color: var(--accent); }

.chapter-meta {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(3px);
  padding: 22px;
  position: sticky; top: 110px;
}
.meta-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.09);
  font-size: 12.5px;
}
.meta-row:last-child { border-bottom: none; }
.meta-row span { color: var(--faint); letter-spacing: 0.14em; }
.meta-row strong { color: var(--white); font-weight: normal; text-align: right; }
.meta-row.emmy strong {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8);
}

/* ═══ CLASSIFIED / REDACTED ═══ */
.redact {
  background: #3c3c44;
  color: transparent !important;
  user-select: none;
  padding: 0 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: none !important;
  cursor: not-allowed;
  transition: background 0.15s;
}
.redact::selection { color: transparent; background: #3c3c44; }
.redact:hover { background: #4a4a54; }
.classified-copy { position: relative; }
.stamp {
  position: absolute; top: -18px; right: -6px;
  transform: rotate(-12deg);
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 4.5vw, 54px);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.85);
  border: 3px solid rgba(var(--accent-rgb), 0.7);
  padding: 0 20px;
  pointer-events: none; user-select: none;
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.25), inset 0 0 18px rgba(var(--accent-rgb), 0.12);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='60'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.12' numOctaves='2'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 .6 1 1 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3CfeComposite operator='in' in2='SourceGraphic'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-size: cover;
}
.log-next {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px; letter-spacing: 0.14em;
  margin-left: 10px;
}
.log-next:hover { text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8); }

/* ═══ TRANSMISSION LOG ═══ */
.log-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.log-list li {
  display: flex; gap: 34px; align-items: baseline;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.log-list li:hover { background: rgba(var(--accent-rgb), 0.05); }
.log-year {
  font-family: var(--display); font-size: 30px; font-weight: 500;
  color: var(--accent); min-width: 118px;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.4);
}
.log-what { color: #cfcfd6; font-size: 14.5px; }
.log-what strong { color: var(--white); font-weight: normal; }
.log-list li.award .log-what { color: var(--white); }
.log-list li.emmy {
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.06);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.12), inset 0 0 24px rgba(var(--accent-rgb), 0.05);
  margin-top: -1px;
}

/* ═══ GALLERY ═══ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.gallery-tile {
  position: relative; aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.gallery-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05) contrast(1.05);
  transition: transform 0.5s ease, filter 0.4s;
}
.gallery-tile:hover img { transform: scale(1.05); filter: saturate(1.2); }
.gallery-tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 12px 8px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.gallery-tile.is-static {
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 11px; letter-spacing: 0.24em;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 8px, transparent 8px 16px),
    var(--panel);
}

/* ═══ ENTER CTA ═══ */
.enter-cta {
  padding: 160px 24px;
  text-align: center;
}
.enter-cta h2 { font-size: clamp(40px, 8.5vw, 120px); }

/* ═══ FOOTER ═══ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(4px);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 44px; padding: 60px 24px;
}
.footer-brand img { width: 130px; margin-bottom: 16px; }
.footer-brand p { color: var(--faint); font-size: 13px; max-width: 380px; margin: 0; }
.footer-vwc { margin-top: 14px !important; }
.footer-vwc a {
  color: var(--dim);
  text-decoration-color: rgba(var(--accent-rgb), 0.7);
  text-underline-offset: 3px;
}
.footer-vwc a:hover { color: var(--accent); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 {
  font-family: var(--mono); font-size: 12px; font-weight: normal;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}
.footer-col a {
  color: var(--dim); text-decoration: none; font-size: 13.5px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-legal {
  border-top: 1px solid var(--line);
  max-width: 1180px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--faint); letter-spacing: 0.08em;
}

/* ═══ REVEAL ON SCROLL ═══ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.on { opacity: 1; transform: none; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .chapter-body { grid-template-columns: 1fr; }
  .chapter-meta { position: static; }
  /* comfortable thumb targets (Apple HIG ~44px) */
  .footer-col a { padding: 10px 0; }
  .footer-col { gap: 2px; }
  .scroll-cue { padding: 12px 18px; }
  .log-next { display: inline-block; padding: 10px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(0,0,0,0.96);
    border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
  .nav-burger { display: flex; }
  .nav .btn-ghost { display: none; }
}
@media (max-width: 560px) {
  .chapter-head { flex-direction: column; gap: 8px; }
  .hero-laurels { padding: 0 42px; }
  .hero-laurels::before, .hero-laurels::after { width: 36px; height: 72px; }
  .stamp { position: static; display: inline-block; margin-bottom: 18px; }
  .chapter, .log, .gallery { padding: 90px 18px; }
  .log-list li { flex-direction: column; gap: 4px; }
  .nav-logo img { width: 88px; }
  .nav { gap: 12px; }
  .btn { padding: 9px 14px; font-size: 12px; }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { animation: none; opacity: 0; }
  .noise-overlay, .scroll-cue { animation: none; }
  .ticker-track { animation-duration: 300s; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
