/* Pre-Existing Condition — classic-rock aesthetic, Phase 1 scaffold.
   Deliberately lightweight: no build step, no framework. */

:root {
  --bg:        #0e0c0a;
  --bg-panel:  #17120f;
  --ink:       #f4ece0;
  --ink-dim:   #b3a692;
  --accent:    #d4a017;   /* amber stage-light */
  --accent-2:  #b5402f;   /* worn red */
  --line:      #2a221c;
  --max:       1100px;
  --font:      system-ui, "Helvetica Neue", Arial, sans-serif;
  --display:   "Helvetica Neue", Impact, system-ui, sans-serif;
  --rock:      "Metal Mania", "Helvetica Neue", Impact, cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.25rem;
  background: rgba(14,12,10,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: block; width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover;
  background: #000;
  box-shadow: 0 0 0 1px var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--rock); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 1px; }
.brand-tagline { font-family: var(--font); font-size: .62rem; text-transform: uppercase; letter-spacing: 2px; color: var(--ink-dim); margin-top: .15rem; }

.site-nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink-dim); text-transform: uppercase; font-size: .82rem; letter-spacing: 1px; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.admin-controls { margin-left: .75rem; }

/* ---------- Layout ---------- */
.app { max-width: var(--max); margin: 0 auto; padding: 1.25rem 1.25rem 4rem; }
.view h1 { font-family: var(--display); text-transform: uppercase; letter-spacing: 2px; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .5rem; }
.view .lead { color: var(--ink-dim); max-width: 60ch; }
.placeholder {
  margin-top: 1.5rem; padding: 1.25rem 1.5rem;
  background: var(--bg-panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 4px; color: var(--ink-dim);
}

/* ---------- Hero (home) ---------- */
.hero {
  display: flex; align-items: center; justify-content: flex-start;
  gap: clamp(1.25rem, 3.5vw, 2.5rem); text-align: left;
  padding: 1.5rem 1.75rem;
  background:
    radial-gradient(55% 120% at 26% 50%, rgba(212,160,23,.18), transparent 70%),
    #000;
  border: 1px solid var(--line); border-radius: 8px;
}
.hero-logo {
  flex: 0 0 auto;
  width: min(185px, 34vw); height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.6));
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-headline {
  margin: 0 0 1rem; color: var(--ink);
  font-family: var(--rock); font-weight: 400; text-transform: uppercase; letter-spacing: .5px;
  font-size: clamp(1rem, 1.9vw, 1.5rem); line-height: 1.1;
}
.hero-lead { font-size: 1.25em; }
.hero .cta-row { justify-content: flex-end; margin-top: 0; flex-wrap: wrap; }

@media (max-width: 600px) {
  .hero { flex-direction: column; text-align: center; padding: 1.75rem 1rem; gap: 1.25rem; }
  .hero-logo { width: min(240px, 62vw); }
  .hero-headline { font-size: clamp(1.05rem, 4.6vw, 1.35rem); }
  .hero .cta-row { justify-content: center; }
}
/* Visually-hidden but available to screen readers / SEO */
.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;
}
.cta-row { margin-top: 1.5rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem;
  font-family: inherit; line-height: 1.2; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 1px solid transparent; color: var(--ink);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1a1206; }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); color: var(--ink-dim);
  text-align: center; padding: 2rem 1rem; font-size: .85rem;
}
.build-info { font-family: ui-monospace, Menlo, monospace; opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg-panel); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 80vh; }
  .site-nav a { padding: .9rem 1.25rem; border-top: 1px solid var(--line); }
}

/* ---------- Featured post (home) — article / blog layout ---------- */
.featured { margin-top: 1.25rem; }
.featured-status { text-align: center; color: var(--ink-dim); padding: 2rem; }

/* Narrow reading column, like an article */
.featured-inner { max-width: 980px; margin: 0 auto; }

/* Editorial header */
.featured-head {
  text-align: center; margin: 0 auto 2.25rem; max-width: 640px;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--line);
}
.featured-head .eyebrow {
  color: var(--accent); text-transform: uppercase; letter-spacing: 3px;
  font-size: .72rem; font-weight: 700; margin: 0 0 .75rem;
}
.featured-head h2 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .5px;
  font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 .75rem; line-height: 1.08;
}
.featured-meta {
  color: var(--ink-dim); font-size: .8rem; letter-spacing: .5px;
  text-transform: uppercase; margin: 0 0 1rem;
}
.featured-sub {
  color: var(--ink-dim); font-size: 1.12rem; line-height: 1.6;
  max-width: 56ch; margin: 0 auto; font-style: italic;
}

/* Body: rhythmic vertical cascade */
.featured-body > * { margin: 1.75rem auto; }
.featured-body figure { margin: 1.75rem auto; }
.featured-body img { display: block; width: 100%; height: auto; border-radius: 8px; }
.featured-body figcaption {
  margin-top: .55rem; color: var(--ink-dim); font-size: .82rem;
  font-style: italic; text-align: center;
}

/* Body text */
.f-text { color: var(--ink); font-size: 1.06rem; line-height: 1.75; }
.f-text p { margin: 0 0 1.1rem; }
.f-text p:last-child { margin-bottom: 0; }

/* Single image — sits in the column, height-capped so it never dominates */
.f-image img { max-height: 460px; object-fit: cover; }

/* "Full width" = full column-width banner, height-capped so it never dominates */
.f-full img { max-height: 440px; object-fit: cover; }

/* Two-up row */
.f-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.f-duo img { height: 100%; max-height: 320px; object-fit: cover; }

/* Responsive video embed (16:9) */
.f-video { width: 100%; }
.embed { position: relative; width: 100%; min-width: 0; padding-top: 56.25%; border-radius: 8px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Cascading gallery — small thumbnails that flow */
.f-gallery { column-count: 3; column-gap: .8rem; }
.f-gallery figure { break-inside: avoid; margin: 0 0 .8rem; }
.f-gallery img { max-height: none; }

@media (max-width: 760px) {
  .f-gallery { column-count: 2; }
  .featured-body > *, .featured-body figure { margin: 1.4rem auto; }
}
@media (max-width: 460px) {
  .f-duo { grid-template-columns: 1fr; }
}

/* ---------- Featured: collapsible events ---------- */
.events { display: flex; flex-direction: column; gap: 1rem; }

.event {
  position: relative;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-panel); overflow: hidden;
  transition: border-color .2s ease;
}
.event.open { background: #0c0a08; border-color: #36291b; }

.event-head {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.2rem 1.4rem; cursor: pointer; text-align: left;
}
.event-head:hover { background: rgba(255,255,255,.025); }
.event-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.event.open .event-head { border-bottom: 1px solid var(--line); }

.event-head-text { flex: 1 1 auto; min-width: 0; }
.event-head .eyebrow {
  color: var(--accent); text-transform: uppercase; letter-spacing: 3px;
  font-size: .68rem; font-weight: 700; margin: 0 0 .4rem;
}
.event-head h2 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .5px;
  font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.1; margin: 0 0 .45rem;
}
.event-head .featured-meta { margin: 0 0 .5rem; text-align: left; }
.event-head .featured-sub { margin: 0; text-align: left; font-size: 1rem; max-width: 70ch; }

/* Chevron rotates open/closed */
.event-chevron {
  flex: 0 0 auto; width: 11px; height: 11px; margin-top: .5rem;
  border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim);
  transform: rotate(45deg); transition: transform .25s ease;
}
.event-head:hover .event-chevron { border-color: var(--accent); }
.event.open .event-chevron { transform: rotate(-135deg); margin-top: .8rem; }

/* Collapsible body — animated with grid rows */
.event-body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.event.open .event-body-wrap { grid-template-rows: 1fr; }
.event-body { overflow: hidden; min-height: 0; padding: 0 1.4rem; }
.event-body > .featured-body:first-child { margin-top: 0; }

@media (max-width: 760px) {
  .event-head, .event-body { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* ---------- Event body: text left, media + playlist right ---------- */
.event-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: start; }
.event-col { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; font-size: 1.06rem; line-height: 1.75; }
.event-col > * { margin: 0; }
.event-col.solo { max-width: 760px; margin-inline: auto; }

/* Playlist embed sits under the image in the right column */
.f-playlist figcaption { text-transform: uppercase; letter-spacing: 1.5px; font-size: .68rem; color: var(--accent); }

@media (max-width: 760px) {
  .event-cols { grid-template-columns: 1fr; gap: 1.3rem; }
}

/* ---------- Playlist: player + scrollable thumbnail list ---------- */
.yt-playlist { width: 100%; }
.ytpl-player { position: relative; width: 100%; padding-top: 56.25%; border-radius: 8px; overflow: hidden; background: #000; }
.ytpl-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytpl-bar { display: flex; justify-content: space-between; align-items: baseline; margin: .65rem 0 .4rem; }
.ytpl-label { text-transform: uppercase; letter-spacing: 1.5px; font-size: .68rem; color: var(--accent); font-weight: 700; }
.ytpl-count { font-size: .72rem; color: var(--ink-dim); }
.ytpl-list {
  list-style: none; margin: 0; padding: .35rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem;
  max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px;
}
.ytpl-item { display: block; cursor: pointer; padding: .25rem; border-radius: 6px; }
.ytpl-item:hover { background: rgba(255,255,255,.05); }
.ytpl-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ytpl-item.active { background: rgba(212,160,23,.16); }
.ytpl-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 5px; background: #000; }
.ytpl-meta { display: block; margin-top: .4rem; }
.ytpl-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .82rem; line-height: 1.25; color: var(--ink);
}
.ytpl-author { display: block; font-size: .72rem; color: var(--ink-dim); margin-top: .15rem; }

/* Collapsed Featured event shows a poster of its primary image */
.event-poster {
  flex: 0 0 auto; width: 160px; height: 96px; object-fit: cover;
  border-radius: 6px; box-shadow: 0 0 0 1px var(--line);
}
.event.open .event-poster { display: none; }
@media (max-width: 600px) {
  .event-poster { width: 100px; height: 62px; }
}

/* ---------- Videos page (from Featured events) ---------- */
.videos-list { display: flex; flex-direction: column; gap: 2.5rem; margin-top: 1.5rem; }
.videos-event { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.videos-event:first-child { border-top: 0; padding-top: 0; }
.videos-event-title {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px;
  font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0 0 1rem;
}

/* Featured event -> Photos link */
.event-photos-link {
  display: inline-block; margin-top: .65rem; color: var(--accent);
  font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
}

/* Gallery images are constrained even outside the featured post (Photos page) */
.f-gallery img { display: block; width: 100%; height: auto; border-radius: 6px; }
.f-gallery figcaption { margin-top: .4rem; color: var(--ink-dim); font-size: .8rem; font-style: italic; text-align: center; }

/* Photos page: smaller masonry thumbnails */
.videos-event .f-gallery { column-count: 4; column-gap: .8rem; }
@media (max-width: 820px) { .videos-event .f-gallery { column-count: 3; } }
@media (max-width: 560px) { .videos-event .f-gallery { column-count: 2; } }

/* Photos uploader bar (admin) */
.photos-upload { margin-top: 1rem; }

/* Photos page: collapsible galleries (like featured events) */
.gallery-block { border-top: 0; padding-top: 0; }
.gallery-head { display: flex; align-items: center; gap: 1rem; cursor: pointer; padding: .85rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.gallery-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gallery-head:hover .event-chevron { border-color: var(--accent); }
.gallery-head .event-head-text { flex: 1 1 auto; min-width: 0; }
.gallery-head .videos-event-title { margin: 0; }
.gallery-count { margin: .3rem 0 0; color: var(--ink-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.gallery-block .event-body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.gallery-block.open .event-body-wrap { grid-template-rows: 1fr; }
.gallery-block.open .event-chevron { transform: rotate(-135deg); }
.gallery-body { overflow: hidden; min-height: 0; padding: 1.25rem 0 0; }

/* ---------- Gigs page ---------- */
.gigs { margin-top: 1.5rem; }
.gigs-group { margin-bottom: 2.5rem; }
.gigs-group h2 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 1px;
  font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 1rem;
  border-bottom: 1px solid var(--line); padding-bottom: .5rem;
}
.gig-list { list-style: none; margin: 0; padding: 0; }
.gig { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.gig:last-child { border-bottom: 0; }
.gig-date { flex: 0 0 auto; min-width: 150px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; font-size: .95rem; }
.gig-info { flex: 1 1 auto; min-width: 0; }
.gig-info h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.gig-loc { margin: 0; color: var(--ink-dim); font-size: .9rem; }
.gig-ticket { flex: 0 0 auto; font-size: .75rem; padding: .5rem .9rem; }
@media (max-width: 600px) {
  .gig { flex-wrap: wrap; gap: .35rem 1rem; }
  .gig-date { flex-basis: 100%; min-width: 0; }
}

/* Gig image (flyer/photo) on the Gigs page */
.gig-img { flex: 0 0 auto; }
.gig-img img { display: block; width: auto; max-width: 130px; height: auto; max-height: 110px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 600px) { .gig-img img { max-width: 90px; max-height: 90px; } }
