/* ============================================================
   Hatdragon Gaming — gaming.hatdragon.studio
   Ported from the "Hatdragon Gaming" design canvas.
   ============================================================ */

:root {
  /* surfaces */
  --void:      #0a0f0a;
  --panel:     #0e150d;
  --panel-alt: #0b110b;
  --vault:     #150c08;

  /* ink */
  --ink:       #dfe7db;
  --ink-soft:  #8fa389;
  --ink-mute:  #7f907a;
  --ink-faint: #5c6d57;

  /* brand */
  --neon:      #56d364;
  --neon-hot:  #16f39a;
  --neon-text: #eafff5;
  --fire:      #E55A19;
  --gold:      #F6C500;
  --on-neon:   #06110a;
  --on-fire:   #160a06;

  /* hairlines */
  --edge:      rgba(86, 211, 100, 0.16);
  --edge-mid:  rgba(86, 211, 100, 0.25);
  --edge-hi:   rgba(86, 211, 100, 0.35);

  /* type */
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body:    'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'Space Mono', ui-monospace, monospace;
  --script:  'Caveat', cursive;

  /* metrics */
  --gutter: 44px;
  --measure: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  position: relative;
  z-index: 5;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--neon);
  color: var(--on-neon);
  font-family: var(--display);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* CRT scanline overlay ---------------------------------------- */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  mix-blend-mode: overlay;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 3px,
    rgba(0, 0, 0, 0.10) 4px
  );
}

/* keyframes --------------------------------------------------- */

@keyframes hd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hd-pulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes hd-flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: 0.72; } 95% { opacity: 1; } 97% { opacity: 0.85; } }

/* shared bits ------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.26em;
  color: var(--neon);
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}
.tag-neon { color: var(--neon); letter-spacing: 0.16em; }

.script {
  font-family: var(--script);
  font-size: 20px;
  color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 28px;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-sm { font-size: 14px; padding: 12px 20px; border-radius: 8px; }

.btn-neon {
  background: var(--neon);
  color: var(--on-neon);
  box-shadow: 0 0 30px rgba(86, 211, 100, 0.35);
}
.btn-neon:hover { transform: translateY(-2px); box-shadow: 0 0 42px rgba(86, 211, 100, 0.55); }

.btn-ghost {
  border: 1px solid var(--edge-hi);
  color: var(--ink);
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--neon); color: var(--neon); }

/* header ------------------------------------------------------ */

.site-header { border-bottom: 1px solid var(--edge); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}

.brand img { height: 42px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-nav > a:hover { color: var(--neon); }

.nav-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--edge-hi);
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 600;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(86, 211, 100, 0.08);
  border: 1px solid var(--edge-mid);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* live state — toggled by js/main.js */
.live-pill.is-live {
  background: var(--fire);
  border-color: var(--fire);
  color: var(--on-fire);
}
.live-pill.is-live .live-dot {
  background: var(--on-fire);
  animation: hd-pulse 1.4s infinite;
}

/* hero -------------------------------------------------------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: 62px 54px;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(680px 420px at 50% 34%, rgba(86, 211, 100, 0.12), transparent 68%);
}
/* sits above .hero-glow */
.hero-inner { position: relative; z-index: 5; }
.hero .eyebrow { margin-bottom: 22px; }

.hero-video {
  position: relative;
  max-width: 680px;
  margin: 0 auto 30px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--edge-hi), 0 0 70px rgba(86, 211, 100, 0.16);
}
.hero-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 500px;
  margin: 22px auto 30px;
}

.button-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* fire marquee (full-bleed) ----------------------------------- */

.marquee {
  position: relative;
  z-index: 5;
  background: var(--fire);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  padding-block: 11px;
  animation: hd-marquee 20s linear infinite;
}
.marquee-item {
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-fire);
}

/* games ------------------------------------------------------- */

.games { padding-block: 56px; }

.games h2 {
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 6px;
}
.section-tag { text-align: center; margin-bottom: 34px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.game-card {
  background: var(--panel);
  border: 1px solid rgba(86, 211, 100, 0.18);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.game-card:hover { border-color: var(--edge-hi); transform: translateY(-3px); }
.game-card-locked {
  background: var(--vault);
  border-color: rgba(229, 90, 25, 0.35);
}
.game-card-locked:hover { border-color: rgba(229, 90, 25, 0.6); }

.game-art {
  aspect-ratio: 2 / 1;
  overflow: hidden;
}
.game-art img { width: 100%; height: 100%; object-fit: cover; }

.game-art-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #1a0f0a, #1a0f0a 12px, var(--vault) 12px, var(--vault) 24px);
}
.locked-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fire);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: hd-flicker 4s infinite;
}

.game-body { padding: 18px; }
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.game-head h3 { font-size: 18px; text-transform: uppercase; }

.status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-shipped { color: var(--neon); }
.status-soon    { color: var(--fire); }

.game-blurb {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  margin: 8px 0 12px;
}

.game-cta {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fire);
}
.game-cta-muted { color: var(--ink-faint); }

/* streaming band ---------------------------------------------- */

.stream {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-bottom: 56px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, var(--panel), var(--panel-alt));
}

.stream-copy { padding: 40px; }

.stream-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--neon);
  margin-bottom: 16px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
  animation: hd-pulse 1.4s infinite;
}

.stream h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.stream-blurb {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 360px;
  margin-bottom: 22px;
}
.stream .button-row { justify-content: flex-start; gap: 12px; margin-bottom: 16px; }

.stream-handles {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.stream-video {
  position: relative;
  min-height: 300px;
  border-left: 1px solid var(--edge);
  overflow: hidden;
}
.stream-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* about strip -------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 56px;
  padding: 38px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 16px;
}
.about .tag { margin-bottom: 12px; }
.about-title {
  font-size: 25px;
  text-transform: uppercase;
}
.about-copy {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* footer ------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 5;
  padding-block: 34px;
  border-top: 1px solid var(--edge);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.copyright {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-social a:hover { color: var(--neon-text); }

/* the glowing ring around each brand mark */
.social-ring {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--neon-hot);
  border-radius: 50%;
  color: var(--neon-text);
  box-shadow: 0 0 8px rgba(0, 255, 150, 0.85);
  filter: drop-shadow(0 0 4px rgba(0, 255, 150, 0.6));
}
.social-ring svg { width: 10px; height: 10px; }

/* ============================================================
   responsive — the canvas was desktop-only; these are new
   ============================================================ */

@media (max-width: 980px) {
  :root { --gutter: 32px; }

  .stream { grid-template-columns: 1fr; }
  .stream-copy { padding: 32px; order: 2; }
  .stream-blurb { max-width: none; }
  .stream-video {
    order: 1;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-left: 0;
    border-bottom: 1px solid var(--edge);
  }

  .game-grid { grid-template-columns: repeat(2, 1fr); }

  .about { grid-template-columns: 1fr; gap: 20px; padding: 30px; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; }

  .header-inner {
    flex-direction: column;
    gap: 16px;
    padding-block: 20px;
  }
  .site-nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
  }

  .hero { padding-block: 44px 40px; }
  .hero .eyebrow { font-size: 11px; letter-spacing: 0.18em; }

  .games { padding-block: 44px; }
  .game-grid { grid-template-columns: 1fr; }

  .btn { width: 100%; }
  .button-row { width: 100%; }

  .stream-copy { padding: 24px; }
  .about { padding: 24px; margin-bottom: 44px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-social { gap: 14px; }
}

/* accessibility ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .marquee-track { transform: none; }
}
