/* ==========================================================
   WUB WEDNESDAY  |  css/style.css

   1. Brand settings (colors and fonts) - change these first
   2. Basics
   3. Top navigation
   4. Hero: the stage
   5. Hero: words under the stage
   6. Watch (Twitch player)
   7. The show
   8. O-Ninja (bio)
   9. Footer
   10. Small screens and reduced motion
   ========================================================== */


/* ---------- 1. BRAND SETTINGS ---------- */

@font-face {
  font-family: "Anybody";
  src: url("../fonts/anybody-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}

/* The neon script used for O-Ninja's name */
@font-face {
  font-family: "Mr Dafoe";
  src: url("../fonts/mr-dafoe.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Colors are taken from O-Ninja's sunset artwork. */
:root {
  --night:  #0B0420;   /* page background: deep purple night */
  --dusk:   #150835;   /* slightly lighter purple, behind the player and footer */
  --bone:   #F8EEFF;   /* main text */
  --ash:    #BBA9DB;   /* quieter text */
  --pink:   #FF4FC3;   /* sunset pink: glow, borders, on-air dot, grid */
  --neon:   #FFA42B;   /* neon orange: buttons, links, O-Ninja's name */
  --laser:  #C86BFF;   /* laser violet: focus rings */

  --line: rgba(248, 238, 255, 0.18);   /* thin divider lines */
  --font: "Anybody", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --script: "Mr Dafoe", "Brush Script MT", cursive;
}


/* ---------- 2. BASICS ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
}

.wrap {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.05;
}

p { margin: 0 0 1rem; max-width: 34em; }

a { color: var(--neon); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 3px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--laser);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--neon);
  color: var(--night);
}
.skip-link:focus { left: 0.5rem; }

.button {
  display: inline-block;
  padding: 0.9rem 1.9rem;
  border-radius: 6px;
  background: var(--neon);
  color: var(--night);
  font-weight: 800;
  font-stretch: 115%;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(255, 140, 30, 0.5);
}
.button:hover { background: var(--bone); }


/* ---------- 3. TOP NAVIGATION ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 2rem;
  padding-top: 1.25rem;
}

.site-nav a {
  color: var(--bone);
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 0 10px var(--night), 0 0 4px var(--night);
}
.site-nav a:hover { color: var(--neon); }


/* ---------- 4. HERO: THE STAGE ---------- */

.hero { position: relative; }

/* The picture of the stage lives in js/stage-art.js and is dropped into
   this box. It always fills the box and stays centred on the main wall. */
.stage {
  position: relative;
  height: max(30rem, 44vw, min(60vw, 100vh - 13rem));
  overflow: hidden;
  background: #06021A;
}

.stage-art {
  display: block;
  width: 100%;
  height: 100%;
}

/* Until the artwork loads (or if scripts are off) the name shows as plain text. */
.wordmark {
  margin: 0;
  padding: 6rem 1.25rem 0;
  text-align: center;
  font-size: clamp(2.5rem, 10vw, 7rem);
  font-weight: 900;
  font-stretch: 150%;
  line-height: 1;
  color: var(--neon);
}
.has-art .wordmark {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

/* The name on the LED wall */
.led-wub {
  font-family: var(--font);
  font-size: 124px;
  font-variation-settings: "wdth" 150, "wght" 900;
  text-anchor: middle;
  fill: url(#wubFill);
  filter: drop-shadow(0 0 16px rgba(255, 79, 195, 0.9));
  cursor: default;
}
.led-wednesday {
  font-family: var(--font);
  font-size: 52px;
  font-weight: 300;
  font-stretch: 150%;
  text-anchor: middle;
  fill: #FBEBFF;
}

/* O-Ninja's name: a neon tube sign in front of the wall */
.neon-name {
  font-family: var(--script);
  font-size: 118px;
  text-anchor: middle;
  fill: rgba(255, 164, 43, 0.1);
  stroke: #FFD79A;
  stroke-width: 2.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px #FF9A1F) drop-shadow(0 0 16px #FF6A00);
}

/* The wobble: "WUB" squeezes and stretches like a wobble bass, once when the
   page loads and again whenever someone points at it. */
.led-wub.is-wobbling { animation: wobble 3.2s ease-in-out both; }

@keyframes wobble {
  0%   { font-variation-settings: "wdth" 150, "wght" 900; }
  13%  { font-variation-settings: "wdth" 50,  "wght" 900; }
  26%  { font-variation-settings: "wdth" 150, "wght" 900; }
  39%  { font-variation-settings: "wdth" 50,  "wght" 900; }
  52%  { font-variation-settings: "wdth" 150, "wght" 900; }
  58%  { font-variation-settings: "wdth" 60,  "wght" 900; }
  64%  { font-variation-settings: "wdth" 150, "wght" 900; }
  70%  { font-variation-settings: "wdth" 60,  "wght" 900; }
  76%  { font-variation-settings: "wdth" 150, "wght" 900; }
  82%  { font-variation-settings: "wdth" 60,  "wght" 900; }
  88%  { font-variation-settings: "wdth" 150, "wght" 900; }
  94%  { font-variation-settings: "wdth" 90,  "wght" 900; }
  100% { font-variation-settings: "wdth" 150, "wght" 900; }
}

/* Lasers and wash lights sweep slowly from side to side */
.beams { mix-blend-mode: screen; }

.fan { animation: sweep 9s ease-in-out infinite alternate; }
.fan-laser-a { --from: -7deg;  --to: 7deg;   animation-duration: 8s; }
.fan-laser-b { --from: 9deg;   --to: -6deg;  animation-duration: 6.5s; }
.fan-laser-c { --from: -9deg;  --to: 6deg;   animation-duration: 6.5s; }
.fan-wash-a  { --from: -12deg; --to: 10deg;  animation-duration: 11s; }
.fan-wash-b  { --from: 10deg;  --to: -12deg; animation-duration: 13s; }

@keyframes sweep {
  from { transform: rotate(var(--from)); }
  to   { transform: rotate(var(--to)); }
}

/* Equaliser bars on the side screens bounce in time */
.eq {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: bounce 0.86s ease-in-out infinite alternate;
}
@keyframes bounce {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0.4); }
}

/* Sparks drift up from the volcano and the stage */
.ember { animation: rise 9s linear infinite; }
@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}

/* "Pause the lights" freezes everything that moves on the stage */
.lights-paused .fan,
.lights-paused .eq,
.lights-paused .ember { animation-play-state: paused; }


/* ---------- 5. HERO: WORDS UNDER THE STAGE ---------- */

.hero-copy {
  padding: 1.25rem 0 4.5rem;
  text-align: center;
}
.hero-copy p { margin-left: auto; margin-right: auto; }

.lede {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  max-width: 28em;
  margin-bottom: 0.6rem;
}

.status {
  color: var(--ash);
  max-width: 44em;
  margin-bottom: 1.6rem;
}

/* On-air look. js/main.js adds "is-live" to <body> during the show. */
.is-live .status {
  color: var(--bone);
  font-weight: 700;
}
.is-live .status::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
}

.lights-toggle {
  display: block;
  margin: 1.4rem auto 0;
  padding: 0.25rem 0.5rem;
  border: 0;
  background: none;
  color: var(--ash);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.lights-toggle:hover { color: var(--bone); }


/* ---------- 6. WATCH (TWITCH PLAYER) ---------- */

.watch {
  background: var(--dusk);
  border-top: 1px solid var(--line);
  padding: 4.5rem 0 5rem;
}

.stage-screen { display: grid; gap: 1rem; }
.stage-screen.has-chat { grid-template-columns: minmax(0, 1fr) 21rem; }

/* The player is framed like one more LED screen */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--pink);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 60px rgba(255, 79, 195, 0.3);
}

.player iframe,
.chat iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.chat {
  border: 2px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  min-height: 26rem;
}

.player-note {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 110%, #55127A 0%, #220A40 45%, #0A0418 100%);
}
.player-note p { margin: 0; color: var(--ash); }


/* ---------- 7. THE SHOW ---------- */

.show { padding: 5rem 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
  align-items: start;
}

.facts { margin: 0.5rem 0 0; }

.facts > div {
  padding: 1rem 0;
  border-top: 2px solid var(--line);
}
.facts > div:last-child { border-bottom: 2px solid var(--line); }

.facts dt {
  color: var(--ash);
  font-size: 0.95rem;
  font-weight: 600;
}
.facts dd { margin: 0.15rem 0 0; }


/* ---------- 8. O-NINJA (BIO) ---------- */

.artist { padding: 2.5rem 0 5rem; }

.artist-cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem 4rem;
  align-items: center;
}

/* The picture sits in a frame styled like one more LED screen,
   with the striped sunset sun behind him. */
.artist-frame {
  max-width: 26rem;
  margin: 0 auto;
  border: 2px solid var(--pink);
  border-radius: 4px;
  overflow: hidden;
  background: #190838 url("../images/sunset-backdrop.svg") center / cover no-repeat;
  box-shadow: 0 0 60px rgba(255, 79, 195, 0.3);
}

.artist-art {
  display: block;
  width: 100%;
  height: auto;
}

/* His name as a neon sign, to match the one on the stage */
.neon-heading {
  margin: 0 0 1.5rem;
  font-family: var(--script);
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1;
  color: rgba(255, 164, 43, 0.12);
  -webkit-text-stroke: 1.5px #FFD79A;
  text-shadow: 0 0 6px #FF9A1F, 0 0 20px #FF6A00;
  transform: rotate(-4deg);
  transform-origin: 0 100%;
}


/* ---------- 8b. THE BRAND (parked for later, see full-site.html) ---------- */

.brand { padding: 0 0 6rem; }

.intro { color: var(--ash); margin-bottom: 2rem; }

.coming {
  list-style: none;
  margin: 0;
  padding: 0;
}

.coming li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 2rem;
  padding: 1.1rem 0;
  border-top: 2px solid var(--line);
}
.coming li:last-child { border-bottom: 2px solid var(--line); }

.coming-name {
  font-size: clamp(1.4rem, 3.4vw, 2.25rem);
  font-weight: 700;
  font-stretch: 125%;
  line-height: 1.15;
}
.coming-name a { color: inherit; }

.coming-when { color: var(--ash); }


/* ---------- 9. FOOTER ---------- */

/* The neon grid floor from O-Ninja's artwork, running off to the horizon.
   Add <div class="grid-floor"></div> wherever you want one. */
.grid-floor {
  position: relative;
  height: clamp(6rem, 15vw, 11rem);
  overflow: hidden;
  background: linear-gradient(var(--night), #2A0A4A);
}
.grid-floor::before {
  content: "";
  position: absolute;
  left: -60%;
  right: -60%;
  top: 0;
  height: 400%;
  background-image:
    linear-gradient(to right, var(--pink) 0, var(--pink) 2px, transparent 2px),
    linear-gradient(to bottom, var(--pink) 0, var(--pink) 2px, transparent 2px);
  background-size: 5rem 2.5rem;
  background-position: 50% 0;
  transform: perspective(12rem) rotateX(70deg);
  transform-origin: 50% 0;
}
.grid-floor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--night) 22%, rgba(11, 4, 32, 0) 85%);
}

.site-footer {
  background: var(--dusk);
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--ash);
  font-size: 1rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.footer-row p { margin: 0; }


/* ---------- 10. SMALL SCREENS AND REDUCED MOTION ---------- */

@media (max-width: 56rem) {
  .stage-screen.has-chat { grid-template-columns: 1fr; }
  .chat { min-height: 24rem; }
}

@media (max-width: 44rem) {
  .site-nav { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .artist-cols { grid-template-columns: 1fr; }
  .artist-frame { max-width: 20rem; }
  .hero-copy { padding-bottom: 3.5rem; }
  .watch { padding: 3.5rem 0 4rem; }
  .show { padding: 4rem 0; }
}

/* Visitors who ask their device for less motion get a still stage. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led-wub.is-wobbling,
  .fan, .eq, .ember { animation: none; }
  .ember { opacity: 0.8; }
  .lights-toggle { display: none; }
}
