/* ============================================
   Lauren's Green Room — theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-page: #F7F7F5;
  --bg-surface: #FFFFFF;
  --bg-surface-raised: color-mix(in srgb, var(--color-sage) 18%, var(--bg-page));
  --border: #DEDEDB;

  --color-primary: #33492A;
  --color-primary-dim: color-mix(in srgb, var(--color-primary) 82%, black);
  --color-sage: #8AAA79;
  --color-sage-text: #20301A;
  --color-brown: #6B4A2E;
  --color-plum: #6B4E78;

  --text-primary: #221F22;
  --text-secondary: #5A555C;

  --font-display: 'Bookman Old Style', 'Bitter', Georgia, serif;
  --font-body: 'Calibri', 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 9px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 28px rgba(6, 3, 20, 0.45), 0 1px 0 rgba(245, 243, 255, 0.03);
  --shadow-card-hover: 0 16px 36px rgba(6, 3, 20, 0.55), 0 1px 0 rgba(245, 243, 255, 0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  background-image:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--color-primary) 34%, transparent), transparent 34%),
    radial-gradient(circle at 88% 6%, color-mix(in srgb, var(--color-sage) 28%, transparent), transparent 32%),
    radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--color-plum) 28%, transparent), transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; }

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

/* ---------- Nav bar ---------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-nav__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-nav__brand-logo {
  height: 3.3rem;
  width: auto;
  display: block;
}

.site-nav__links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.site-nav__link.active {
  color: var(--bg-page);
  background: var(--color-primary);
}

/* ---------- Layout ---------- */

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.page-header {
  padding: 2.5rem 0 1.5rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0 0 0.3rem;
  color: var(--text-primary);
}

.page-header__sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.section {
  margin-top: 2.75rem;
}

.section__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section__heading h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-primary);
}

.section__note {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------- Empty state ---------- */

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--color-primary) 2%, transparent);
}

.empty-state code {
  font-family: 'Consolas', monospace;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-sage) 15%, transparent);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--color-primary);
  color: var(--bg-page);
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--color-primary-dim);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--color-primary) 50%, transparent);
  color: var(--text-primary);
}

.btn--outline:hover {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

/* ---------- Search & filters ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

.search-field::before {
  content: "🔍";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input::placeholder { color: var(--text-secondary); }

.search-input:focus {
  border-color: var(--color-primary);
}

.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.65rem 2rem 0.65rem 1rem;
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.filter-select:focus { border-color: var(--color-primary); }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--color-primary) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  color: var(--text-primary);
  padding: 0.35rem 0.5rem 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: 50%;
}

.filter-chip button:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

/* ---------- Tag chips (display) ---------- */

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-chip {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: lowercase;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag-chip:hover {
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.tag-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--bg-page);
}

/* Small static tag pill shown on cards (not interactive). Color rotates
   between 3 variants (see js/common.js renderPillTag) so different tags are
   visually distinct instead of one flat color. */
.pill-tag {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.pill-tag--sage  { background: var(--color-sage);  color: var(--color-sage-text); }
.pill-tag--brown { background: var(--color-brown); color: var(--bg-page); }
.pill-tag--plum  { background: var(--color-plum);  color: var(--bg-page); }

/* ---------- Cards (shared) ---------- */

.card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* dashed "ticket tear" perforation divider between photo/poster and body */
.card__perf {
  position: relative;
  height: 0;
  border-top: 2px dashed var(--border);
}

.card__perf::before,
.card__perf::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--bg-page);
  border-radius: 50%;
  top: -7px;
}
.card__perf::before { left: -7px; }
.card__perf::after { right: -7px; }

/* ---------- Shorts strip (homepage) ---------- */

.shorts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.short-card__embed {
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.short-card__embed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.short-card__embed .play-badge { transition: transform 0.15s ease; }

.short-card__embed:hover .play-badge { transform: translate(-50%, -50%) scale(1.1); }

/* ---------- Video lightbox — expands a clip to window width on demand ---------- */

.video-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 3, 20, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
}

.video-lightbox__inner {
  position: relative;
  width: min(100%, calc((100vh - 4rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 4rem);
  background: #000;
  box-shadow: var(--shadow-card-hover);
}

.video-lightbox__inner--vertical {
  width: min(100%, calc((100vh - 4rem) * 9 / 16));
  aspect-ratio: 9 / 16;
}

.video-lightbox__inner iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 6, 26, 0.7);
  color: var(--text-primary);
  cursor: pointer;
  z-index: 1;
}

.video-lightbox__close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.video-lightbox__close:hover { background: var(--color-primary); color: var(--bg-page); }

@media (max-width: 640px) {
  .video-lightbox { padding: 1rem; }
  .video-lightbox__inner { width: min(100%, calc((100vh - 2rem) * 16 / 9)); max-height: calc(100vh - 2rem); }
  .video-lightbox__inner--vertical { width: min(100%, calc((100vh - 2rem) * 9 / 16)); }
}

.short-card__body {
  padding: 1rem 1.1rem 1.1rem;
}

.short-card__title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.short-card__more {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.short-card__more:hover { text-decoration: underline; }

/* ---------- Homepage CTA row ---------- */

.cta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.cta-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.cta-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
}

.cta-card__sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.9rem;
}

.cta-card__arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- Artist grid (Browse by Artist) ---------- */

.artist-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.4rem;
  align-items: stretch;
}

.artist-card__photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--bg-surface-raised);
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.artist-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.artist-card__name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.55rem;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

/* ---------- Special grid (Browse by Special) ---------- */

.special-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
  align-items: stretch;
}

.special-card__poster-link {
  display: block;
  text-decoration: none;
}

.special-card__title-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.special-card__title-link:hover .special-card__title {
  color: var(--color-primary);
}

.special-card__poster {
  aspect-ratio: 16 / 9;
  background: var(--bg-surface-raised);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.special-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Three visual states, in priority order:
   1. .has-video   — real YouTubeLink: full "pop" treatment (play badge, bright title, WATCH pill)
   2. .has-platform — known streaming home but no YouTubeLink: bright title, no play badge
      (not embeddable inline), "Watch on {Platform}" pill instead of a static WATCH pill
   3. neither — genuinely unknown yet: muted poster scrim + muted title, no badge
   Shared by special-card (Browse by Special) and special-row (Artist Detail). ---------- */

.special-card:not(.has-video):not(.has-platform) .special-card__poster::after,
.special-row:not(.has-video):not(.has-platform) .special-row__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 26, 0.6);
}

.special-card:not(.has-video):not(.has-platform) .special-card__title,
.special-row:not(.has-video):not(.has-platform) .special-row__title {
  color: var(--text-secondary);
  font-weight: 500;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.play-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--bg-page);
  margin-left: 2px;
}

.watch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg-page);
  background: var(--color-primary);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
}

.watch-pill svg {
  width: 10px;
  height: 10px;
  fill: var(--bg-page);
}

.special-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.special-card__title {
  font-weight: 600;
  font-size: 0.98rem;
  margin: 0 0 0.3rem;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.special-card__meta {
  font-size: 0.8rem;
  color: var(--color-plum);
  margin: 0 0 0.7rem;
}

.special-card__artist-link {
  color: inherit;
  text-decoration: none;
}

.special-card__artist-link:hover {
  text-decoration: underline;
}

.special-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
}

.special-card__badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.special-card__watch-row,
.special-card__level-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Momentary highlight for a special-card deep-linked from a short clip
   ("From: <Special> →"), so it's obvious which card the link landed on. */
.special-card--highlight {
  animation: special-card-flash 2.2s ease-out 1;
}

@keyframes special-card-flash {
  0%   { box-shadow: 0 0 0 3px var(--color-primary), var(--shadow-card-hover); }
  100% { box-shadow: var(--shadow-card); }
}

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
}

/* ---------- Artist detail page ---------- */

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.back-link:hover { text-decoration: underline; }

.artist-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-icons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 0.15s ease, transform 0.15s ease;
}

.social-icon:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.social-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.artist-header {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.artist-header__photo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  background: var(--bg-surface-raised);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.artist-header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.artist-header__website {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.artist-header__website:hover { text-decoration: underline; }

.artist-header__tickets {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-plum);
  text-decoration: none;
  margin-top: 0.4rem;
}
.artist-header__tickets:hover { text-decoration: underline; }
.artist-header__tickets svg { width: 14px; height: 14px; fill: currentColor; }

.artist-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.artist-bio {
  margin-top: 1.75rem;
  max-width: 68ch;
  color: var(--text-primary);
  opacity: 0.92;
  font-size: 0.98rem;
}

.special-row {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 0.9rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.special-row__poster {
  display: block;
  position: relative;
  width: 104px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-surface-raised);
  text-decoration: none;
}

.special-row__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.special-row__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.special-row__title {
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0;
  color: var(--text-primary);
}

.special-row__title a {
  color: inherit;
  text-decoration: none;
}
.special-row__title a:hover { color: var(--color-primary); }

.special-row__year {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.85rem;
}

.special-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.special-row__badges {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.special-row__watch-row,
.special-row__level-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 2.5rem 1rem;
  opacity: 0.75;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .artist-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 920px) {
  .artist-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .artist-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .artist-header { gap: 1.25rem; }
  .artist-header__photo { width: 120px; height: 120px; }
  .controls { flex-direction: column; align-items: stretch; }
  .search-field { flex: none; width: 100%; min-width: 0; }
  .filter-select { width: 100%; }
  .special-row__poster { width: 76px; height: 43px; }
}

@media (max-width: 460px) {
  .artist-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
