/* ============================================================
   TOWERS — dark gothic band website
   ============================================================ */

/* ── Reset & Custom Properties ──────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #080808;
  --bg-2:       #101010;
  --bg-3:       #161616;
  --text:       #c8c8c8;
  --text-muted: #555;
  --accent:     #8b1a1a;
  --accent-dim: #5a1010;
  --border:     #1e1e1e;
  --white:      #ececec;

  --font-gothic: 'UnifrakturMaguntia', serif;
  --font-body:   'Josefin Sans', sans-serif;

  --transition: 0.4s ease;
  --radius: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  margin: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100vh);
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay — purely CSS, no external image */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9000;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Site Wrapper ────────────────────────────────────────────── */
#site {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  width: 44px;
  height: auto;
  transition: opacity var(--transition);
}

.header-logo:hover {
  opacity: 0.8;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}

.site-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.site-nav a:hover {
  color: var(--white);
}

.site-nav a:hover::after {
  width: 100%;
}

/* ── Fade-in on scroll ───────────────────────────────────────── */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Radial glow */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(139, 26, 26, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: min(500px, 70vw);
  height: auto;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 60px rgba(139, 26, 26, 0.35));
}

.hero-sub {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Section Shared ──────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-heading {
  font-family: var(--font-body);
  font-weight: 100;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 1px;
  background: var(--accent);
}

/* ── Stream ──────────────────────────────────────────────────── */
.stream-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: #000;
}

.stream-wrapper {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

/* On portrait mobile, drop the fixed aspect ratio so the stream
   section fills available space without pushing the footer off-screen */
@media (max-width: 600px) and (orientation: portrait) {
  .stream-wrapper {
    aspect-ratio: auto;
    height: 100%;
  }
}

.stream-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.stream-video-hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.stream-offline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #000;
  opacity: 1;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.stream-offline-logo {
  max-width: min(800px, 85vw);
  max-height: 60%;
  height: auto;
  object-fit: contain;
  opacity: 0.6;
}

.stream-offline-text {
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stream-offline-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── YouTube fallback player ─────────────────────────────────── */
.yt-player-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: 1;
  transition: opacity 1.5s ease;
}

.yt-player-wrap iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.yt-player-hidden {
  opacity: 0;
  pointer-events: none;
}

.unmute-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: auto;
}

.unmute-overlay-hidden {
  opacity: 0;
  pointer-events: none;
}

.unmute-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.unmute-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.stream-caption {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
}

/* ── About ───────────────────────────────────────────────────── */
.about-section {
  border-bottom: 1px solid var(--border);
}

.about-text {
  max-width: 600px;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--white);
}

.footer-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-sep {
  color: var(--border);
  user-select: none;
}

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

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner {
    padding: 0.75rem 1.2rem;
  }

  .site-nav {
    gap: 1.5rem;
  }

  .hero {
    min-height: 55vh;
  }

  .section-inner {
    padding: 3.5rem 1.2rem;
  }

  .footer-inner {
    padding: 0.5rem 1.2rem;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .footer-link {
    font-size: 0.6rem;
    gap: 0.35rem;
  }

  .footer-icon {
    width: 14px;
    height: 14px;
  }

  .footer-sep {
    display: none;
  }

  .stream-offline-logo {
    max-width: 70vw;
  }

  .stream-offline-text {
    font-size: 0.8rem;
  }
}

/* ── Reduced-motion accessibility ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in-section {
    opacity: 1;
    transform: none;
  }
}
