/* ============================================================
   diehardisaxmasmovie.com — retro 8-bit Christmas system
   Palette carries the original placeholder: night sky, gold,
   snow. Extended with punch-red CTA + mono body type.
   ============================================================ */

:root {
  --sky-top: #070b18;
  --sky-bot: #101a33;
  --gold: #ffd166;
  --gold-dim: #b98c2e;
  --punch: #ff5d6a;
  --punch-dark: #c33b48;
  --snow: #e8f0ff;
  --muted: #8ea0c4;
  --win: #ffca5f;
  --win-off: #2a3a5e;
  --rule: #22304f;
  --green: #6fcf97;
  --panel: #0c1224;
  --panel-2: #111a30;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --pixel: "Press Start 2P", var(--mono);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 100%);
  background-attachment: fixed;
  color: var(--snow);
  font: 16px/1.7 var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--punch); }

/* CRT paper grain — 1px base64 noise at very low opacity */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23fff'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23fff'/%3E%3C/svg%3E");
}

/* ---------- star + snow layers ---------- */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #ffffff99 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 32% 9%,  #ffffff77 50%, transparent 51%),
    radial-gradient(2px 2px   at 58% 14%, #ffffff88 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 7%,  #ffffff66 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 22%, #ffffff88 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 38%,  #ffffff55 50%, transparent 51%),
    radial-gradient(2px 2px   at 44% 30%, #ffffff44 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 52%, #ffffff66 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 44%, #ffffff55 50%, transparent 51%);
  background-size: 100% 100%;
}
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.snow i {
  position: absolute; top: -4vh;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--snow); opacity: .85;
  animation: fall linear infinite;
}
@keyframes fall { to { transform: translateY(112vh); } }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px;
  border-bottom: 2px solid var(--rule);
  background: rgba(7, 11, 24, .82);
  backdrop-filter: blur(4px);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--pixel); font-size: 11px; letter-spacing: .05em;
  color: var(--gold); white-space: nowrap;
}
.brand:hover { color: var(--gold); }
.brand .cube { width: 22px; height: 22px; flex: 0 0 auto; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--pixel); font-size: 10px; padding: 10px 12px;
  color: var(--muted); border: 2px solid transparent;
}
.topbar nav a:hover { color: var(--snow); border-color: var(--rule); background: var(--panel); }
.topbar nav a[aria-current="page"] { color: var(--gold); border-color: var(--rule); }
.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--pixel); font-size: 10px;
  color: var(--snow); background: var(--panel);
  border: 2px solid var(--rule); padding: 9px 12px; cursor: pointer;
}
.cart-btn:hover { border-color: var(--gold); color: var(--gold); }
.cart-btn .count {
  background: var(--punch); color: #20070a; font-size: 9px;
  padding: 3px 6px; min-width: 18px; text-align: center;
}
.cart-btn[data-empty="true"] .count { display: none; }

/* mobile menu toggle — hidden on desktop, the only way to reach the nav on phones */
.menu-toggle { display: none; }

/* music toggle — lit gold while a track plays */
.music-btn[data-playing="true"] { border-color: var(--gold); color: var(--gold); }
.music-btn[data-playing="true"] span[aria-hidden] { animation: note-pulse 1s steps(2, end) infinite; }
@keyframes note-pulse { 50% { opacity: .35; } }

/* hero music row under the tower caption */
.plaza-music { font-family: var(--pixel); font-size: 8px; letter-spacing: .2em; color: var(--muted); text-align: center; }
.plaza-music a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--rule); padding-bottom: 2px; }
.plaza-music a:hover { color: var(--gold); }
.plaza-music a[data-active="true"] { color: var(--gold); border-bottom-color: var(--gold); }

/* the flashed picture — shown for one second when the person on the roof is clicked */
.guy-flash {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 14, .84);
}
.guy-flash[hidden] { display: none; }
.guy-flash img {
  max-width: min(88vw, 1000px); max-height: 74vh; width: auto; height: auto;
  image-rendering: pixelated;
  border: 4px solid #14141f;
  box-shadow: 0 0 0 2px #000, 0 0 70px rgba(255, 209, 102, .16), 0 24px 60px rgba(0, 0, 0, .7);
}

/* ---------- marquee ---------- */
.marquee {
  position: relative; z-index: 19; overflow: hidden;
  border-bottom: 2px solid var(--rule);
  background: var(--panel); padding: 8px 0;
}
.marquee-track {
  display: inline-block; white-space: nowrap;
  font-family: var(--pixel); font-size: 10px; letter-spacing: .08em;
  color: var(--gold-dim);
  animation: scroll 38s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .hot { color: var(--punch); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1;
  min-height: calc(100vh - 120px);
  display: grid; grid-template-rows: auto 1fr auto;
  align-items: center; justify-items: center;
  text-align: center;
  padding: 5vh 20px 3vh;
  overflow: hidden;
}
.hero-title {
  margin: 0 0 14px;
  font-family: var(--pixel);
  font-size: clamp(15px, 3.4vw, 30px);
  line-height: 1.9; letter-spacing: .06em;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 209, 102, .35), 0 3px 0 #4a3a10;
  animation: flicker 6s ease-in-out infinite;
}
@keyframes flicker {
  0%,100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: .7; }
  94% { opacity: 1; } 96% { opacity: .85; } 97% { opacity: 1; }
}
.hero-sub { margin: 0 auto 6px; max-width: 40em; color: var(--snow); font-size: clamp(14px, 1.9vw, 18px); }
.hero-tag { margin: 0 0 22px; color: var(--muted); font-size: 13px; font-style: italic; }
.hero-tag b { color: var(--gold-dim); font-style: normal; }

/* ---------- the tower — live 8-bit canvas (plaza.js) ---------- */
.plaza-frame { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px auto 8px; }
.plaza-frame canvas {
  image-rendering: pixelated;
  border: 4px solid #14141f;
  box-shadow: 0 0 0 2px #000, 0 20px 60px rgba(0,0,0,.7), 0 0 34px rgba(120,160,255,.08);
  max-width: 100%; height: auto;
  cursor: crosshair;
  display: block;
}
.plaza-cap { font-family: var(--pixel); font-size: 9px; letter-spacing: .24em; color: var(--gold-dim); }
.plaza-cap.dim { color: var(--muted); letter-spacing: .14em; text-align: center; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.btn {
  display: inline-block; font-family: var(--pixel); font-size: 11px;
  padding: 14px 18px; cursor: pointer; text-align: center;
  border: 2px solid var(--gold); color: var(--gold); background: transparent;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5);
  transition: transform .08s, background .15s, color .15s;
}
.btn:hover { background: var(--gold); color: #241a04; transform: translate(-1px, -1px); box-shadow: 6px 6px 0 rgba(0,0,0,.5); }
.btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.btn-punch { border-color: var(--punch); color: var(--punch); }
.btn-punch:hover { background: var(--punch); color: #20070a; }
.btn-quiet { border-color: var(--rule); color: var(--muted); }
.btn-quiet:hover { background: var(--rule); color: var(--snow); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: 4px 4px 0 rgba(0,0,0,.5) !important; }
.btn[disabled]:hover { background: transparent; color: var(--gold); }
.btn-punch[disabled]:hover { background: transparent; color: var(--punch); }

/* visitor ticker + hint */
.tiny-hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
.tiny-hint kbd {
  font-family: var(--mono); font-size: 11px; color: var(--gold);
  border: 1px solid var(--rule); padding: 1px 5px; background: var(--panel);
}

/* ---------- sections ---------- */
main { position: relative; z-index: 1; }
section { padding: 64px 20px; max-width: 1080px; margin: 0 auto; }
.section-title {
  font-family: var(--pixel); font-size: clamp(13px, 2vw, 18px);
  color: var(--gold); letter-spacing: .06em; margin: 0 0 8px;
  text-shadow: 0 2px 0 #4a3a10;
}
.section-sub { color: var(--muted); margin: 0 0 34px; font-size: 14px; max-width: 46em; }
.rule { border: 0; border-top: 2px solid var(--rule); margin: 0; }

/* evidence cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  border: 2px solid #2b3b61; background: var(--panel);
  padding: 20px; box-shadow: 5px 5px 0 rgba(0,0,0,.45);
}
.card.in-view { opacity: 1; transform: none; }
.card:hover { border-color: var(--gold-dim); }
.card .icon { width: 40px; height: 40px; margin-bottom: 12px; display: block; }
.card h3 { font-family: var(--pixel); font-size: 11px; color: var(--gold); margin: 0 0 10px; line-height: 1.7; }
.card p { margin: 0; color: var(--snow); font-size: 14px; }

/* product cards */
.grid-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.product {
  border: 2px solid #2b3b61; background: var(--panel);
  padding: 16px; box-shadow: 5px 5px 0 rgba(0,0,0,.45);
  display: flex; flex-direction: column; gap: 10px;
}
.product.in-view { opacity: 1; transform: none; }
.product:hover { border-color: var(--gold-dim); }
.product .thumb {
  border: 2px solid var(--rule); background: var(--panel-2);
  aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
}
.product .thumb svg { width: 72%; height: 72%; }
.product h3 { font-family: var(--pixel); font-size: 10px; line-height: 1.7; color: var(--snow); margin: 0; }
.product .cat { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.product .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product .price { color: var(--gold); font-family: var(--pixel); font-size: 12px; }
.badge {
  display: inline-block; font-family: var(--pixel); font-size: 8px;
  padding: 4px 7px; border: 2px solid var(--rule); color: var(--muted);
}
.badge.soon { color: var(--punch); border-color: var(--punch-dark); }

/* construction banner */
.construction {
  border: 2px dashed var(--gold-dim); background: repeating-linear-gradient(
    45deg, #151b30 0 14px, #101526 14px 28px);
  padding: 18px; text-align: center;
  font-family: var(--pixel); font-size: 10px; color: var(--gold); line-height: 2;
}
.construction .blink { animation: blink 1.2s steps(2) infinite; }

/* manifesto */
.manifold { max-width: 720px; margin: 0 auto; }
.manifold p { font-size: 15px; color: var(--snow); }
.manifold h2 { font-family: var(--pixel); font-size: 13px; color: var(--gold); margin: 42px 0 12px; line-height: 1.8; }
.pull {
  border-left: 4px solid var(--gold); padding: 4px 0 4px 18px;
  color: var(--gold-dim); font-style: italic; margin: 26px 0;
}
.signed-wall { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.signed-wall span {
  border: 2px solid var(--rule); padding: 8px 10px;
  font-size: 12px; color: var(--muted); background: var(--panel);
}
.signed-wall span.you { color: var(--gold); border-color: var(--gold-dim); }

/* footer */
footer.site {
  position: relative; z-index: 1;
  border-top: 2px solid var(--rule);
  padding: 40px 20px 60px; text-align: center; color: var(--muted); font-size: 12px;
}
footer.site .row { margin: 4px 0; }
footer.site .links a { margin: 0 8px; font-family: var(--pixel); font-size: 9px; }
footer.site .legal { margin-top: 18px; font-size: 11px; opacity: .8; }
footer.site .star { color: #6f8f6f; }

/* ---------- cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(2, 4, 10, .62);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(400px, 94vw);
  background: var(--panel);
  border-left: 3px solid var(--rule);
  box-shadow: -10px 0 0 rgba(0,0,0,.35);
  transform: translateX(103%); transition: transform .26s cubic-bezier(.2,.9,.25,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 2px solid var(--rule);
}
.cart-head h2 { font-family: var(--pixel); font-size: 11px; color: var(--gold); margin: 0; }
.cart-close {
  font-family: var(--pixel); font-size: 10px; color: var(--muted);
  background: none; border: 2px solid var(--rule); padding: 8px 10px; cursor: pointer;
}
.cart-close:hover { color: var(--punch); border-color: var(--punch-dark); }
.cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.cart-empty .big { font-family: var(--pixel); font-size: 11px; color: var(--snow); line-height: 2; margin-bottom: 12px; }
.cart-item { display: flex; gap: 12px; border: 2px solid var(--rule); background: var(--panel-2); padding: 12px; margin-bottom: 12px; }
.cart-item .mini { width: 56px; height: 56px; flex: 0 0 auto; border: 2px solid var(--rule); display: grid; place-items: center; }
.cart-item .name { font-size: 13px; color: var(--snow); margin: 0 0 4px; }
.cart-item .meta { color: var(--muted); font-size: 12px; margin: 0; }
.cart-item .qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-item .qty button {
  font-family: var(--pixel); font-size: 9px; width: 26px; height: 26px;
  background: var(--panel); color: var(--snow); border: 2px solid var(--rule); cursor: pointer;
}
.cart-item .qty button:hover { border-color: var(--gold); color: var(--gold); }
.cart-item .qty span { font-size: 13px; min-width: 20px; text-align: center; }
.cart-item .rm { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.cart-item .rm:hover { color: var(--punch); }
.cart-foot { border-top: 2px solid var(--rule); padding: 16px; }
.cart-sub { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 11px; color: var(--snow); margin-bottom: 12px; }
.cart-foot .btn { width: 100%; }
.cart-foot .note { color: var(--muted); font-size: 11px; margin: 10px 0 0; text-align: center; }

/* reveal-on-scroll handles JS-off gracefully */
.card, .product, .reveal { opacity: 1; transform: none; }
html.js .card, html.js .product, html.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
html.js .card.in-view, html.js .product.in-view, html.js .reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .card, html.js .product, html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-title, .win, .chopper, .chopper .rotor, .chopper .blink { animation: none; }
  .chopper-a { left: 10%; top: 16%; }
  .chopper-b { right: 10%; top: 34%; }
}

/* small screens */
@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 12px 14px; }
  .brand { font-size: 9px; }
  .brand span { display: none; }   /* icon-only brand — the full bar can't fit both */
  .brand .cube { width: 18px; height: 18px; }
  .menu-toggle { display: inline-flex; }
  .topbar [data-music-toggle] { margin-left: auto; }   /* controls hug the right edge */
  /* the nav collapses into a dropdown panel under the bar */
  .topbar nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; margin: 0; gap: 0; flex-wrap: nowrap;
    background: var(--panel); border-bottom: 2px solid var(--rule);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .55);
  }
  .topbar.menu-open nav { display: flex; }
  .topbar nav a { padding: 14px 18px; border: 0; border-top: 1px solid var(--rule); }
  .topbar nav a[aria-current="page"] { border-color: var(--rule); background: rgba(255, 209, 102, .06); }
  .music-btn [data-music-label] { display: none; }   /* icon only on mobile */
  .music-btn { padding: 10px 11px; }
  .topbar .cart-btn { padding: 8px 10px; }
  .plaza-frame canvas { border-width: 3px; }
  .plaza-cap { font-size: 8px; letter-spacing: .16em; }
}
