/* ==========================================================================
   CRACKED SKY — styles.css
   Visual language derived directly from brand PDFs and social media assets.
   Palette: deep cosmic teal, chartreuse yellow, white, near-black.
   Typography: Barlow Condensed (display) + Barlow (body)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens — extracted from brand materials
   -------------------------------------------------------------------------- */
:root {
  /* Core palette */
  --c-bg-deepest:   #060e14;         /* near-black, body base */
  --c-bg-deep:      #0a1e28;         /* section base */
  --c-bg-dark:      #0e2535;         /* alt section */
  --c-teal-mid:     #1a4d5c;         /* dividers, subtle borders */
  --c-teal-bright:  #2a8a9e;         /* bright teal accents */
  --c-teal-cyan:    #3dcbd8;         /* venue names, links */
  --c-yellow:       #d4e040;         /* chartreuse — dates, lightning, CTAs */
  --c-yellow-dim:   rgba(212,224,64,.6);
  --c-white:        #ffffff;
  --c-text:         #ccdde2;         /* body text */
  --c-text-dim:     #6a9aaa;         /* secondary/muted text */
  --c-moon:         #c8a830;         /* warm amber — moon reference */

  /* Section overlays */
  --c-overlay-video:   rgba(6,14,20,.30);
  --c-section-a:       rgba(6,14,20,.88);
  --c-section-b:       rgba(10,30,40,.86);

  /* Typography */
  --f-display: 'Barlow Condensed', sans-serif;
  --f-body:    'Barlow', sans-serif;

  /* Layout */
  --nav-h:       72px;
  --max-w:       1140px;
  --pad-x:       clamp(20px, 4vw, 48px);

  /* Motion */
  --ease:       cubic-bezier(.4,0,.2,1);
  --t-fast:     .25s;
  --t-smooth:   .35s;
  --t-slow:     .65s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-body);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg-deepest);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* --------------------------------------------------------------------------
   Fixed Image Background
   -------------------------------------------------------------------------- */
#video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url('../assets/img/CS001.jpg') center top / cover no-repeat;
  pointer-events: none;
}

/* Semi-transparent dark overlay for readability */
#video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--c-overlay-video);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Site Wrapper — scrolls over fixed video
   -------------------------------------------------------------------------- */
#site-wrapper {
  position: relative;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 var(--pad-x);
  transition:
    background  var(--t-smooth) var(--ease),
    border-color var(--t-smooth) var(--ease),
    backdrop-filter var(--t-smooth) var(--ease);
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(6,14,20,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(42,138,158,.18);
}

/* Brand mark — hidden on hero, appears when nav goes sticky */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-smooth) var(--ease);
}
#nav.scrolled .nav-brand {
  opacity: 1;
  pointer-events: auto;
}
.nav-skull {
  width: auto;
  height: 40px;
  display: block;
  opacity: .9;
  transition: opacity var(--t-fast) var(--ease);
}
.nav-brand a:hover .nav-skull {
  opacity: 1;
}
.nav-brand-name {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-white);
  line-height: 1;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0; right: 0;
  height: 1px;
  background: var(--c-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-smooth) var(--ease);
}
.nav-links a:hover { color: var(--c-white); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: transform var(--t-smooth) var(--ease), opacity var(--t-smooth) var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: calc(var(--nav-h) + 4vh) var(--pad-x) 80px;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-logo {
  width: clamp(260px, 52vw, 660px);
  max-width: 90vw;
  height: auto;
  pointer-events: none;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 32px rgba(0,0,0,.5));
}

.hero-tagline {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-yellow);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero-tagline .star { margin: 0 10px; }
.tagline-s {
  font-size: .6em;
  vertical-align: super;
  letter-spacing: .1em;
}

/* Lightning canvas — sits above bg overlay, below hero content */
#lightning-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Scroll cue */
.hero-scroll {
  position: absolute;
  z-index: 3;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeScroll 1s var(--ease) 2.5s forwards;
}
.hero-scroll-label {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.scroll-chevron {
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--c-text-dim);
  border-bottom: 2px solid var(--c-text-dim);
  transform: rotate(45deg);
  animation: chevronBounce 1.6s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Section Commons
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: 96px 0;
}
.section:nth-of-type(odd)  { background: var(--c-section-a); }
.section:nth-of-type(even) { background: var(--c-section-b); }

/* Force specific section backgrounds */
#shows   { background: var(--c-section-a); }
#videos  { background: var(--c-section-b); }
#gallery { background: var(--c-section-a); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Section header with decorative lines */
.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--c-teal-mid), transparent);
}
.section-line.right {
  background: linear-gradient(to left, var(--c-teal-mid), transparent);
}
.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-white);
  white-space: nowrap;
}
.section-title .bolt {
  display: inline-block;
  width: .55em;
  height: .9em;
  vertical-align: middle;
  margin: 0 8px;
  color: var(--c-yellow);
  position: relative;
  top: -.05em;
}

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.visible             { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .10s; }
.reveal.d2 { transition-delay: .20s; }
.reveal.d3 { transition-delay: .30s; }
.reveal.d4 { transition-delay: .40s; }
.reveal.d5 { transition-delay: .50s; }

/* --------------------------------------------------------------------------
   Shows Section
   -------------------------------------------------------------------------- */
.shows-list {
  border-top: 1px solid rgba(42,138,158,.15);
}

.show-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 0 28px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(42,138,158,.12);
  transition: background var(--t-fast) var(--ease);
  border-radius: 2px;
}
.show-row {
  /* Reserve space for hover indicator so layout never shifts */
  border-left: 3px solid transparent;
  padding-left: 12px;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.show-row:hover {
  background: rgba(42,138,158,.06);
  border-color: var(--c-yellow);
}

.show-date {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: .04em;
  color: var(--c-yellow);
  line-height: 1;
}
.show-date-month {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-yellow-dim);
  margin-top: 4px;
}

.show-details { display: flex; flex-direction: column; gap: 5px; }
.show-venue {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-teal-cyan);
}
.show-meta {
  font-family: var(--f-body);
  font-size: .8rem;
  font-weight: 300;
  color: var(--c-text-dim);
  letter-spacing: .04em;
}

.show-cta { flex-shrink: 0; }
.btn-show {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-yellow);
  border: 1px solid rgba(212,224,64,.35);
  padding: 9px 20px;
  border-radius: 2px;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn-show:hover {
  background: var(--c-yellow);
  border-color: var(--c-yellow);
  color: var(--c-bg-deepest);
}

.shows-more-note {
  margin-top: 44px;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.shows-more-note a {
  color: var(--c-teal-cyan);
  border-bottom: 1px solid rgba(61,203,216,.35);
  transition: color var(--t-fast) var(--ease);
}
.shows-more-note a:hover { color: var(--c-white); }

/* --------------------------------------------------------------------------
   Videos Section
   -------------------------------------------------------------------------- */
.video-featured {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
  margin-bottom: 32px;
  background: #000;
}
.video-featured iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* --------------------------------------------------------------------------
   Gallery Section
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery-cell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--c-bg-dark);
}
/* First item spans 2×2 */
.gallery-cell:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}
.gallery-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease), filter .55s var(--ease);
  filter: brightness(.85) saturate(.88);
}
.gallery-cell:hover img {
  transform: scale(1.06);
  filter: brightness(.6) saturate(1.1);
}
.gallery-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,14,20,.38);
  opacity: 0;
  transition: opacity var(--t-smooth) var(--ease);
}
.gallery-cell:hover .gallery-hover { opacity: 1; }
.gallery-hover svg {
  width: 34px; height: 34px;
  color: var(--c-white);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.96);
  align-items: center;
  justify-content: center;
  padding: var(--pad-x);
}
#lightbox.open { display: flex; }
.lb-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-inner img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 32px 80px rgba(0,0,0,.8);
}
.lb-close {
  position: absolute;
  top: -44px; right: 0;
  background: none;
  border: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  transition: color var(--t-fast) var(--ease);
}
.lb-close:hover { color: var(--c-white); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,14,20,.72);
  border: 1px solid rgba(42,138,158,.3);
  border-radius: 2px;
  color: var(--c-white);
  font-size: 1.1rem;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.lb-nav:hover { background: rgba(42,138,158,.28); border-color: var(--c-teal-bright); }
.lb-prev { left:  -60px; }
.lb-next { right: -60px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: rgba(4,10,14,.97);
  border-top: 1px solid rgba(42,138,158,.12);
  padding: 56px 0 36px;
  position: relative;
  z-index: 10;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-skull {
  width: 200px;
  height: auto;
  opacity: .75;
}
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(42,138,158,.28);
  border-radius: 50%;
  color: var(--c-text-dim);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.footer-social a:hover {
  color: var(--c-white);
  border-color: var(--c-teal-cyan);
  background: rgba(61,203,216,.08);
}
.footer-social svg { width: 17px; height: 17px; }
.footer-tag {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-yellow);
  text-align: right;
  line-height: 1.6;
}
.footer-bottom {
  border-top: 1px solid rgba(42,138,158,.08);
  padding-top: 24px;
  text-align: center;
  font-size: .72rem;
  color: var(--c-text-dim);
  letter-spacing: .06em;
}

/* --------------------------------------------------------------------------
   Video Thumbnail Grid
   -------------------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.video-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  background: #000;
  border-radius: 4px;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease), filter .5s var(--ease);
  filter: brightness(.8) saturate(.85);
}
.video-thumb:hover img,
.video-thumb:focus-visible img {
  transform: scale(1.05);
  filter: brightness(.55) saturate(1.1);
}
.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--t-fast) var(--ease);
}
.video-thumb-play svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.5));
  transition: transform var(--t-fast) var(--ease);
}
.video-thumb:hover .video-thumb-play svg,
.video-thumb:focus-visible .video-thumb-play svg {
  transform: scale(1.12);
}
.video-thumb:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Video Lightbox
   -------------------------------------------------------------------------- */
#video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#video-lightbox.open {
  display: flex;
}
.vlb-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
}
/* Portrait container for Shorts */
.vlb-inner.is-short {
  max-width: min(500px, calc(85vh * 9 / 16));
}
.vlb-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--c-text);
  font-family: var(--f-display);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--t-fast) var(--ease);
}
.vlb-close:hover { color: var(--c-white); }
.vlb-close:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}
/* 16:9 ratio wrapper */
.vlb-ratio {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
/* 9:16 ratio for Shorts */
.vlb-inner.is-short .vlb-ratio {
  padding-bottom: 177.78%;
}
.vlb-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes fadeScroll {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: .7; transform: translateX(-50%) translateY(0); }
}
@keyframes chevronBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%       { transform: rotate(45deg) translate(4px, 4px); }
}

/* --------------------------------------------------------------------------
   Responsive — Tablet ≤ 900px
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-cell:first-child { grid-column: span 1; grid-row: span 1; aspect-ratio: 1; }
  .show-row { grid-template-columns: 90px 1fr; row-gap: 10px; }
  .show-cta { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-tag  { grid-column: 1 / -1; text-align: center; }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile ≤ 640px
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(6,14,20,.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.6rem; }
  .nav-toggle { display: flex; }

  .section { padding: 70px 0; }
  .section-header { margin-bottom: 40px; }

  .show-row { grid-template-columns: 1fr; gap: 8px 0; padding: 20px 0; }
  .show-date { display: flex; align-items: baseline; gap: 8px; }
  .show-date-month { display: inline; margin-top: 0; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery-cell:first-child { grid-column: span 2; aspect-ratio: 16/9; }

  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-tag   { text-align: center; }

  .lb-prev { left:  -10px; }
  .lb-next { right: -10px; }
  .lb-nav { width: 36px; height: 36px; font-size: .9rem; }

  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .video-thumb-play svg { width: 48px; height: 48px; }
}

@media (max-width: 400px) {
  .hero-title { font-size: clamp(3.8rem, 20vw, 5.5rem); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
