* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  background: var(--page-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .24;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--page-vignette);
  z-index: 5;
}

.audio-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .72;
  z-index: 1;
}

.audio-bg::before,
.audio-bg::after {
  content: "";
  position: absolute;
  inset: -30%;
  background-repeat: repeat;
  background-size: 900px 760px;
  filter: none;
  animation: drift 70s linear infinite;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg width='900' height='760' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3Etext%7Bfont-family:Menlo,Consolas,monospace;font-size:14px;fill:%23ff55d6;fill-opacity:.55%7D .dim%7Bfill:%239b6cff;fill-opacity:.36%7D%3C/style%3E%3Ctext x='60' y='60' class='dim'%3Esonny.aif@deck:~$ arm livestream%3C/text%3E%3Ctext x='60' y='96'%3EAUDIO chain: CDJ-3000 %3E DJM-A9 %3E OBS%3C/text%3E%3Ctext x='60' y='132'%3Etempo locked / bass pressure stable%3C/text%3E%3Ctext x='60' y='168'%3Edouble drop queued / crowd signal hot%3C/text%3E%3Ctext x='420' y='280' class='dim'%3ESonnySounds Vol 001%3C/text%3E%3Ctext x='420' y='316'%3Eriddim / dubstep / deep dub%3C/text%3E%3Ctext x='420' y='352'%3Evisuals online / stream ready%3C/text%3E%3Ctext x='100' y='520' class='dim'%3Ewarehouse signal detected%3C/text%3E%3Ctext x='100' y='556'%3Elow end calibrated%3C/text%3E%3Ctext x='100' y='592'%3Ecommunity channel open%3C/text%3E%3C/svg%3E");
}

.audio-bg::after {
  opacity: .24;
  animation-duration: 95s;
  animation-direction: reverse;
  transform: translateX(30%);
}

@keyframes drift {
  from { transform: translate3d(0,-8%,0); }
  to { transform: translate3d(0,14%,0); }
}

.page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: clamp(.8rem, 1.6vw, 1.35rem);
}

.shell {
  width: min(1560px, 100%);
  min-height: calc(100vh - 2.7rem);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: clamp(22px, 3vw, 42px);
  border: var(--shell-border);
  background: var(--shell-bg);
  box-shadow: var(--shell-shadow);
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem clamp(1.1rem, 3vw, 3rem);
  background: var(--header-bg);
  border-bottom: var(--header-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.logo {
  color: var(--header-logo-main-color);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: -.04em;
  font-weight: 900;
}

.logo span {
  color: var(--header-logo-accent-color);
  text-shadow: var(--header-logo-accent-shadow);
}
nav {
  display: flex;
  gap: clamp(.68rem, 1.68vw, 1.42rem);
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: var(--header-nav-link-color);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.17rem;
}

nav a:hover {
  color: var(--header-nav-hover-color);
  text-shadow: var(--header-nav-hover-shadow);
}

.content {
  position: relative;
  min-height: 0;
  padding: clamp(1rem, 2vw, 1.8rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(.85rem, 1.35vw, 1.25rem);
}

.stream-hero,
.player-panel {
  border-radius: 28px;
  border: var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.player-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.stream-hero {
  min-height: 0;
  padding:
    clamp(.9rem, 1.4vw, 1.25rem)
    clamp(1rem, 2vw, 1.75rem);
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr) auto;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
}

.eyebrow {
  color: var(--hero-eyebrow-color);
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: clamp(.62rem, .72vw, .82rem);
  font-weight: 950;
  margin: 0 0 .5rem;
  text-shadow: var(--hero-eyebrow-shadow);
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, min(3.4vw, 5vh), 4.2rem);
  line-height: .9;
  letter-spacing: -.060em;
  font-weight: 950;
  text-wrap: balance;
}

h1 span {
  display: block;
}

.white {
  color: var(--hero-title-main-color);
  -webkit-text-fill-color: var(--hero-title-main-color);
  text-shadow: var(--hero-title-main-shadow);
}

.glow {
  background: linear-gradient(120deg, #ff3fc8 0%, #9b26d9 42%, #4411b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: var(--hero-title-emphasis-filter);
}

.hero-copy {
  margin: 0;
  color: var(--card-body-color);
  font-size: clamp(.82rem, .94vw, 1rem);
  line-height: 1.42;
  max-width: 760px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .58rem .82rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.055);
  color: var(--button-text-color);
  text-decoration: none;
  font-weight: 950;
  font-size: .8rem;
  box-shadow: none;
  white-space: nowrap;
}

.button.primary {
  background-color: var(--button-primary-bg-color);
  background-image: var(--button-primary-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-color: var(--button-primary-border-color);
  color: var(--button-text-color);
  box-shadow: none;
  overflow: hidden;
}

.player-panel {
  min-height: 0;
  height: 100%;
  padding: clamp(.6rem, 1vw, 1rem);
}

.embed-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  border-radius: 22px;
  overflow: visible;
  background: #050408;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

body[data-twitch-layout="video-with-chat"] .player-panel {
  display: grid;
  place-items: center;
}

body[data-twitch-layout="video-with-chat"] .embed-wrap {
  width: min(100%, 1380px);
}

#twitch-embed,
#twitch-embed iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: 22px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .95rem clamp(1.1rem, 3vw, 3rem);
  border-top: var(--footer-border);
  background: var(--footer-bg);
  color: var(--footer-text-color);
  backdrop-filter: blur(8px);
  font-size: .88rem;
}

@media (max-width: 860px) {
  .stream-hero {
    grid-template-columns: 1fr;
  }

  .button-row {
    justify-content: flex-start;
  }

  .embed-wrap {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .content { padding: 1rem; }

  .stream-hero,
  .player-panel {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.6rem);
  }

  .eyebrow {
    letter-spacing: .18em;
    line-height: 1.6;
  }

}

@media (prefers-reduced-motion: reduce) {
  .audio-bg::before,
  .audio-bg::after {
    animation: none;
  }
}

@media (min-width: 861px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    height: 100svh;
    min-height: 100svh;
    padding: clamp(.45rem, .9vw, .95rem);
    display: grid;
  }

  .shell {
    height: calc(100svh - clamp(.9rem, 1.8vw, 1.9rem));
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  header {
    padding-block: clamp(.48rem, .75vh, .78rem);
  }

  nav a {
    font-size: clamp(.95rem, 1vw, 1.17rem);
  }

  .logo {
    font-size: clamp(.9rem, .9vw, 1.05rem);
  }

  .content {
    height: 100%;
    min-height: 0;
    padding:
      clamp(.65rem, 1.1vw, 1.15rem)
      clamp(.9rem, 2vw, 2.2rem);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .stream-hero {
    min-height: clamp(110px, 16vh, 170px);
  }

  .player-panel {
    min-height: 0;
    height: 100%;
  }

  .embed-wrap {
    min-height: 0;
    height: 100%;
  }

  footer {
    padding-block: clamp(.5rem, .8vh, .8rem);
    font-size: clamp(.72rem, .8vw, .88rem);
  }
}

@media (min-width: 861px) and (max-height: 820px) {
  .content {
    gap: clamp(.6rem, 1vw, 1rem);
  }

  .stream-hero {
    min-height: clamp(90px, 14vh, 135px);
    padding-block: clamp(.65rem, 1vh, .95rem);
  }

  h1 {
    font-size: clamp(1.85rem, min(3vw, 4.2vh), 3.4rem);
  }

  .hero-copy {
    font-size: clamp(.76rem, .85vw, .9rem);
    line-height: 1.32;
  }
}

@media (min-width: 861px) and (max-height: 690px) {
  .shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  footer {
    display: none;
  }

  .stream-hero {
    grid-template-columns: minmax(210px, .38fr) minmax(0, 1fr) auto;
    min-height: 84px;
  }

  .hero-copy {
    display: none;
  }
}

@media (max-width: 860px) {
  html,
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
}
