/* ============================================
   RESIDENCIES — Regulars section styles
   Mobile first. Breakpoints: 375px base, 768px, 1440px.
   ============================================ */

/* ============================================
   RESIDENCY GRID (hub page)
   ============================================ */

.residencies-section {
  background: var(--black);
  padding: var(--space-xl) 0;
}

.residency-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

@media (min-width: 600px) {
  .residency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .residency-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Featured card — full width above the grid */
.residency-featured-card {
  margin-bottom: var(--space-md);
}

.residency-featured-card .residency-card {
  flex-direction: row;
  min-height: 280px;
}

.residency-featured-card .residency-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.residency-card-image {
  width: 360px;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.residency-featured-card .residency-card-body {
  padding: var(--space-md) var(--space-lg);
  justify-content: center;
}

.residency-featured-card .residency-card-name {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

@media (max-width: 768px) {
  .residency-featured-card .residency-card {
    flex-direction: column;
  }

  .residency-featured-card .residency-card-image {
    width: 100%;
    aspect-ratio: 16/9;
  }
}

/* ============================================
   RESIDENCY CARD
   ============================================ */

.residency-card {
  display: flex;
  flex-direction: column;
  background: var(--charcoal);
  border: 1px solid rgba(184, 136, 42, 0.18);
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

/* Cards are not links while the detail pages are switched off. */

.residency-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--black);
}

.residency-card-image .event-poster-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.residency-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.residency-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.residency-card-name {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  margin: 4px 0;
}

.residency-card-residents {
  font-size: 0.82rem;
  color: rgba(255, 241, 208, 0.55);
}

.residency-card-next {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 400;
}

/* Paused badge */
.residency-card-paused {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(14, 12, 34, 0.85);
  border: 1px solid rgba(184, 136, 42, 0.35);
  color: var(--peach);
  padding: 4px 8px;
}

/* ============================================
   CHIPS / TAGS
   ============================================ */

.chip {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 0;
  border: 1px solid rgba(184, 136, 42, 0.35);
  color: var(--gold);
  background: transparent;
  white-space: nowrap;
}

.chip-room {
  border-color: rgba(215, 204, 255, 0.35);
  color: var(--lavender);
}

/* ============================================
   PAST RESIDENCIES (ended)
   ============================================ */

.past-residencies-section {
  background: var(--black);
  padding: var(--space-md) 0 var(--space-xl);
  border-top: 1px solid rgba(184, 136, 42, 0.1);
}

.past-residencies-list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.past-residency-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm);
  border: 1px solid rgba(184, 136, 42, 0.1);
  background: rgba(255, 241, 208, 0.02);
}

@media (min-width: 600px) {
  .past-residency-item {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-sm);
  }
}

.past-residency-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: rgba(255, 241, 208, 0.55);
}

.past-residency-farewell {
  font-size: 0.9rem;
  color: rgba(255, 241, 208, 0.4);
}

/* ============================================
   RESIDENCY DETAIL PAGE
   ============================================ */

.residency-detail {
  background: var(--black);
}

/* Hero for residency detail */
.residency-hero {
  position: relative;
  background: linear-gradient(155deg, #050408 0%, #0D0A5C 55%, #050408 100%);
  padding: 140px var(--gutter) var(--space-lg);
  overflow: hidden;
}

.residency-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,4,8,0.7) 0%, rgba(5,4,8,0.5) 60%, rgba(5,4,8,0.8) 100%);
  z-index: 0;
}

.residency-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.residency-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.residency-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.residency-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-sm);
}

.residency-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 8px;
}

.residency-hero-cadence {
  font-size: 1rem;
  color: rgba(255, 241, 208, 0.65);
  margin-bottom: var(--space-md);
}

/* Next date card */
.next-date-card {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(14, 12, 34, 0.8);
  border: 1px solid rgba(184, 136, 42, 0.35);
  padding: var(--space-sm) var(--space-md);
  min-width: 260px;
}

.next-date-card-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.next-date-card-date {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--cream);
}

.next-date-card-time {
  font-size: 0.9rem;
  color: rgba(255, 241, 208, 0.7);
}

.next-date-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.no-upcoming {
  font-size: 0.95rem;
  color: rgba(255, 241, 208, 0.55);
  padding: var(--space-sm) 0;
}

/* ============================================
   RESIDENCY DETAIL BODY
   ============================================ */

.residency-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.residency-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(184, 136, 42, 0.1);
}

.residency-section:last-child {
  border-bottom: none;
}

.residency-section-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.residency-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.residency-description p {
  font-size: 1.05rem;
  color: rgba(255, 241, 208, 0.82);
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: var(--space-sm);
}

/* Know before you go list */
.kbyg-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kbyg-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1rem;
  color: rgba(255, 241, 208, 0.82);
  line-height: 1.5;
}

.kbyg-list li::before {
  content: '✦';
  color: var(--gold);
  font-size: 9px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* For performers table */
.performers-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
}

.performers-table tr {
  border-bottom: 1px solid rgba(184, 136, 42, 0.1);
}

.performers-table tr:last-child {
  border-bottom: none;
}

.performers-table td {
  padding: 10px 0;
  font-size: 0.95rem;
}

.performers-table td:first-child {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 160px;
  padding-right: var(--space-sm);
}

.performers-table td:last-child {
  color: var(--cream);
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 680px;
}

.faq-item {
  border: 1px solid rgba(184, 136, 42, 0.18);
  background: rgba(14, 12, 34, 0.4);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--space-sm);
  font-size: 1rem;
  color: var(--cream);
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-left: var(--space-sm);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-sm) var(--space-sm);
  font-size: 0.95rem;
  color: rgba(255, 241, 208, 0.72);
  line-height: 1.7;
}

/* Upcoming dates */
.upcoming-dates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upcoming-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: var(--space-sm);
  border: 1px solid rgba(184, 136, 42, 0.15);
  background: rgba(14, 12, 34, 0.4);
}

.upcoming-date-main {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--cream);
}

.upcoming-date-time {
  font-size: 0.9rem;
  color: rgba(255, 241, 208, 0.6);
}

.upcoming-date-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

/* Residents / Artists */
.artists-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

@media (min-width: 600px) {
  .artists-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .artists-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.artist-card {
  background: rgba(14, 12, 34, 0.6);
  border: 1px solid rgba(184, 136, 42, 0.18);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.25s, transform 0.25s;
}

.artist-card:hover,
.artist-card:focus-visible {
  border-color: rgba(184, 136, 42, 0.5);
  transform: translateY(-2px);
}

.artist-card-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(155deg, #050408 0%, #21102A 55%, #050408 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(184, 136, 42, 0.15);
}

.artist-card-photo img {
  width: 38%;
  max-width: 100px;
  opacity: 0.35;
}

.artist-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.artist-card-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.artist-card-role {
  font-size: 0.85rem;
  color: rgba(255, 241, 208, 0.55);
}

.artist-plain {
  font-size: 0.95rem;
  color: rgba(255, 241, 208, 0.55);
  padding: 4px 0;
}

/* Past editions scroll strip */
.past-editions-strip {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.past-editions-strip::-webkit-scrollbar {
  height: 4px;
}

.past-editions-strip::-webkit-scrollbar-track {
  background: rgba(184, 136, 42, 0.08);
}

.past-editions-strip::-webkit-scrollbar-thumb {
  background: rgba(184, 136, 42, 0.35);
}

.past-edition-tile {
  flex-shrink: 0;
  width: 160px;
  scroll-snap-align: start;
}

.past-edition-tile .event-poster-fallback {
  width: 160px;
  height: 220px;
}

/* Gallery */
.residency-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 600px) {
  .residency-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .residency-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.residency-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Share block */
.share-block {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: var(--space-sm);
}

.share-short-url {
  font-size: 0.85rem;
  color: rgba(255, 241, 208, 0.45);
  font-family: var(--font-body);
}

.share-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Other residencies row */
.other-residencies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

@media (min-width: 600px) {
  .other-residencies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .other-residencies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* CTA block */
.residencies-cta {
  background: rgba(14, 12, 34, 0.6);
  border: 1px solid rgba(184, 136, 42, 0.2);
  padding: var(--space-lg) var(--gutter);
  text-align: center;
  margin: var(--space-xl) 0;
}

.residencies-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

/* ============================================
   ARTIST PAGE
   ============================================ */

.artist-page {
  background: var(--black);
}

.artist-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 140px var(--gutter) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .artist-header {
    flex-direction: row;
    align-items: flex-start;
  }
}

.artist-header-photo {
  width: 200px;
  min-width: 200px;
  height: 200px;
  background: linear-gradient(155deg, #050408 0%, #21102A 55%, #050408 100%);
  border: 1px solid rgba(184, 136, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .artist-header-photo {
    width: 260px;
    min-width: 260px;
    height: 260px;
  }
}

.artist-header-photo img {
  width: 38%;
  max-width: 100px;
  opacity: 0.35;
}

.artist-header-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.artist-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--black);
  padding: 4px 10px;
}

.artist-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  margin: 0;
}

.artist-role {
  font-size: 1rem;
  color: rgba(255, 241, 208, 0.6);
}

.artist-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-xl);
}

.artist-bio p {
  font-size: 1.05rem;
  color: rgba(255, 241, 208, 0.82);
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: var(--space-sm);
}

.artist-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* ============================================
   BUTTONS — additions
   ============================================ */

.btn-ghost-gold {
  display: inline-block;
  padding: 11px 24px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  line-height: 22px;
}

.btn-ghost-gold:hover {
  background: var(--gold);
  color: var(--black);
}

.btn-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid rgba(184, 136, 42, 0.35);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 44px;
}

.btn-copy-link:hover {
  border-color: var(--gold);
  background: rgba(184, 136, 42, 0.08);
}

.btn-copy-link.copied {
  color: var(--cream);
  border-color: var(--cream);
}
