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

/* ── Variables ── */
:root {
  --bg:      #282a36;
  --bg2:     #1e1f29;
  --fg:      #f8f8f2;
  --green:   #50fa7b;
  --cyan:    #8be9fd;
  --accent:  rgba(255,255,255,0.12);
  --radius:  10px;
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ══════════════════════════════
   LANDING PAGE
══════════════════════════════ */
body.landing {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.landing-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.landing-content h1 {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1.6rem, 5vw, 3rem);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.landing-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
}

.lang-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.lang-btn {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: 0.5em;
  padding: 0.6em 1.6em;
  transition: background 0.2s;
}

.lang-btn:hover {
  background: rgba(80, 250, 123, 0.15);
}

/* ══════════════════════════════
   PRESENTATION SLIDES
══════════════════════════════ */
body.presentation {
  overflow: hidden;
  height: 100dvh;
}

.slides-wrapper {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

/* ── Single slide ── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 4rem;   /* bottom padding clears nav bar */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow-y: hidden;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide with scrollable content (video list) */
.slide.slide-scrollable {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: 2rem;
}

/* Slide with background image */
.slide.slide-bg {
  background-size: cover;
  background-position: center;
}

.slide-content {
  width: 100%;
  max-width: 900px;
}

/* ── Typography ── */
.richtext, .richtext p {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.7;
  text-align: center;
}

.richtext b, .richtext strong {
  font-family: 'Comic Sans MS', cursive;
}

/* ── Textboxes ── */
.textbox {
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius);
  padding: 1.2em;
  text-align: left;
}

.textbox-tv {
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius);
  padding: 0.8em 1em;
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  margin-top: 0.5rem;
}

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.lang-link {
  color: var(--cyan);
  font-size: clamp(0.85rem, 2vw, 1rem);
  transition: color 0.2s;
}

.lang-link:hover { color: var(--green); }

/* ── Button ── */
.button {
  display: inline-block;
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--green);
  background: none;
  border: 2px solid var(--green);
  border-radius: 0.5em;
  padding: 0.55em 1.4em;
  cursor: pointer;
  transition: background 0.2s;
}

.button:hover { background: rgba(80, 250, 123, 0.15); }

/* ── Navigation ── */
.slide-nav {
  position: fixed;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 200;
  align-items: center;
}

/* Reveal.js-style chevron arrows: two rounded bars forming a < or > */
.nav-btn {
  position: relative;
  width: 44px;
  height: 44px;
  font-size: 12px;   /* scale base — change this to resize both arrows */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--green);
  opacity: 0.9;
  transition: opacity 0.15s;
  touch-action: manipulation;
}

.nav-btn::before,
.nav-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2.6em;
  height: 0.5em;
  border-radius: 0.25em;
  background-color: currentColor;
  transform-origin: 0.2em 50%;
  transition: transform 0.15s ease;
}

/* Left-pointing chevron ( < ): pivot near LEFT end of each bar */
.nav-prev::before { transform: translateX(0.5em) translateY(1.55em) rotate(45deg); }
.nav-prev::after  { transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); }

/* Hover: angle closes slightly, like reveal.js */
.nav-prev:hover::before { transform: translateX(0.5em) translateY(1.55em) rotate(40deg); }
.nav-prev:hover::after  { transform: translateX(0.5em) translateY(1.55em) rotate(-40deg); }

/* Right-pointing chevron ( > ): pivot near RIGHT end of each bar */
.nav-next::before,
.nav-next::after {
  transform-origin: 2.4em 50%;
}
.nav-next::before { transform: translateX(0.52em) translateY(1.58em) rotate(-45deg); }
.nav-next::after  { transform: translateX(0.52em) translateY(1.58em) rotate(45deg); }

.nav-next:hover::before { transform: translateX(0.52em) translateY(1.58em) rotate(-40deg); }
.nav-next:hover::after  { transform: translateX(0.52em) translateY(1.58em) rotate(40deg); }

.nav-btn:hover   { opacity: 1; }
.nav-btn:disabled { opacity: 0.15; cursor: not-allowed; }

/* Progress bar */
.progress-bar-track {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0,0,0,0.2);
  z-index: 200;
}

.progress-bar-fill {
  height: 100%;
  background: var(--green);
  transform-origin: 0 0;
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(.26,.86,.44,.985);
}

.slide-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 1rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  z-index: 200;
}

/* ── TV frame ── */
.tv-container {
  position: relative;
  width: min(85%, 700px);
  margin: 0 auto;
}

.tv-container iframe {
  position: absolute;
  z-index: 1;
  width: 86.5%;
  aspect-ratio: 16 / 9;
  top: 6.4%;
  left: 7.1%;
  border: none;
}

.tv-overlay {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  z-index: 2;
  pointer-events: none;
}

/* ── Video list ── */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.video-row {
  display: grid;
  grid-template-columns: clamp(110px, 28%, 280px) 1fr;
  gap: 1rem;
  align-items: center;
}

.video-thumb {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.video-text .richtext p {
  background: rgba(0,0,0,0.45);
  border-radius: 8px;
  padding: 0.8em;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
}

/* ── Artist gallery ── */
.artist-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.artist-thumb {
  width: clamp(150px, 28vw, 280px);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.artist-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.artist-gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.artist-gallery-caption {
  font-size: 0.78rem;
  text-align: center;
  max-width: clamp(150px, 28vw, 280px);
  line-height: 1.3;
  opacity: 0.85;
}

.artist-thumb-placeholder {
  width: clamp(150px, 28vw, 280px);
  aspect-ratio: 3/4;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5em;
}

/* ── Slide 9 two-column layout ── */
.slide-9-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  height: 100%;
}

.slide-9-credits {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.end-heading {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 0.5rem;
}

/* ── Comment form ── */
.comment-section {
  overflow: visible;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 35vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.comment-item {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 0.75em 1em;
  text-align: left;
}

.comment-author {
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.9em;
  color: var(--green);
}

.comment-date {
  font-size: 0.8em;
  color: rgba(255,255,255,0.4);
  margin-left: 0.6em;
}

.comment-text {
  margin-top: 0.35em;
  font-size: clamp(0.85rem, 2vw, 1rem);
  line-height: 1.5;
  color: var(--fg);
  overflow-wrap: break-word;
  word-break: break-word;
}

.comment-heading {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: #fff;
  text-align: center;
  margin-bottom: 0.75rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.comment-form input,
.comment-form textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: inherit;
  font-size: clamp(0.85rem, 2vw, 1rem);
  padding: 0.55em 0.8em;
  width: 100%;
  resize: vertical;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.comment-form .button {
  align-self: center;
  margin-top: 0.25rem;
}

.comment-list {
  margin-top: 1.5rem;
}

.comment-thanks {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--green);
}

/* ── Credits ── */
.credit-line {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.85);
  margin-top: 0.4rem;
}

/* ══════════════════════════════
   ARTIST PAGE
══════════════════════════════ */
body.artist-page {
  min-height: 100dvh;
  overflow-y: auto;
  background: var(--bg);
}

.artist-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: 100dvh;
  align-items: start;
}

.artist-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.artist-portrait {
  width: 100%;
  border-radius: 8px;
}

.artist-transcript {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.artist-transcript:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.artist-name {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  margin-bottom: 0.75rem;
}

.bio-text p {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  line-height: 1.7;
}

.interview-modal-inner {
  max-height: 85vh;
  overflow-y: auto;
}

.artist-detail-modal {
  max-height: 88vh;
  overflow-y: auto;
}

.artist-modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.open { display: flex; }

.modal-inner {
  position: relative;
  width: 90%;
  max-width: 860px;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.75rem;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover { color: var(--green); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 600px) {

  /* ── Slides: allow vertical scroll so content never clips ── */
  .slide {
    padding: 1.2rem 0.9rem 5rem;
    overflow-y: auto;
    justify-content: flex-start;
    align-items: center;
  }

  /* Re-center slides that fit without scrolling */
  .slide > .slide-content {
    margin: auto 0;
  }

  /* ── Slide 9: single-column, auto height ── */
  .slide-9-layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.5rem;
  }

  .slide-9-credits {
    align-items: center;
    text-align: center;
  }

  /* ── Artist gallery: two images per row on narrow phones ── */
  .artist-gallery {
    gap: 0.6rem;
  }

  .artist-thumb,
  .artist-thumb-placeholder {
    width: clamp(120px, 42vw, 180px);
  }

  .artist-gallery-caption {
    max-width: clamp(120px, 42vw, 180px);
    font-size: 0.72rem;
  }

  /* ── Artist layout (standalone artist page) ── */
  .artist-layout {
    grid-template-columns: 1fr;
    padding: 1.2rem 0.9rem 4rem;
  }

  /* ── Artist modal: single column ── */
  .artist-modal-layout {
    grid-template-columns: 1fr;
  }

  .artist-detail-modal {
    max-height: 92vh;
  }

  .modal-inner {
    width: 96%;
    padding: 1rem;
  }

  /* ── Video list: stack thumbnail above text ── */
  .video-row {
    grid-template-columns: 1fr;
  }

  .video-thumb {
    max-width: 100%;
  }

  /* ── TV container: full width ── */
  .tv-container {
    width: 100%;
  }

  /* ── Navigation: bigger tap targets ── */
  .nav-btn {
    width: 52px;
    height: 52px;
    font-size: 14px;
  }

  .slide-nav {
    bottom: 10px;
    right: 10px;
    gap: 6px;
  }

  /* ── Comment list: more compact ── */
  .comment-list {
    max-height: 25vh;
  }
}

/* ── Landscape phones: short viewport ── */
@media (orientation: landscape) and (max-height: 550px) {

  /* Allow all slides to scroll vertically */
  .slide {
    padding: 0.6rem 1rem 4rem;
    overflow-y: auto;
    justify-content: flex-start;
  }

  .slide > .slide-content {
    margin: auto 0;
  }

  /* Shrink TV so it fits the short viewport height */
  .tv-container {
    width: min(60%, 440px);
  }

  .textbox-tv {
    font-size: 0.85rem;
    padding: 0.4em 0.7em;
    margin-top: 0.3rem;
  }

  /* Slide 9: single column, auto height */
  .slide-9-layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1rem;
  }

  /* Artist modal: single column */
  .artist-modal-layout {
    grid-template-columns: 1fr;
  }

  /* Bigger tap targets for nav */
  .nav-btn {
    width: 48px;
    height: 48px;
  }
}
