/* ============================================================
   NOTP - Campaign Detail Page CSS (duskhome.css)
   Loads after notp.css. All brand tokens inherited.
   ============================================================ */

/* -- CAMPAIGN HEADER - faded logo watermark background ----- */

#campaign-header {
  position: relative;
  background: var(--black);
  border-bottom: 1px solid var(--border);
  overflow: visible; /* allow logo to bleed below into nav area */
  min-height: 180px;
  display: flex;
  align-items: center;
  z-index: 0;
}

/* Faded logo - large, anchored top-left, bleeds below the header */
#campaign-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2.5rem; /* nudged away from edge */
  width: 420px;
  height: 420px;
  background-image: url('../img/notp-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left top;
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
}

.campaign-anchor-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-hot);
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.campaign-anchor-btn:hover {
  background: var(--gold);
  color: #000;
}

/* Nav sits above the bleeding logo */
#main-nav {
  position: relative;
  z-index: 10;
  background: transparent; /* transparent - buttons carry their own bg */
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}

/* Individual nav buttons get the dark background */
#main-nav a {
  background: rgba(8, 8, 8, 0.88);
  border-right: 1px solid var(--border);
}

#main-nav a:first-child {
  border-left: 1px solid var(--border);
}

#main-nav a:hover {
  background: rgba(30, 30, 30, 0.96);
  color: #fff;
}

.campaign-header-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
}

/* Home link - sits over the faded logo area */
.header-logo-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  /* Push link to the right so it clears the faded logo area */
  margin-left: 260px;
}

.header-logo-link:hover {
  color: var(--gold);
}

.header-logo-link::before {
  content: '←';
  font-size: 16px;
}

/* Real logo image variant - swap ::before for this when PNG confirmed */
.header-logo-img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(200,144,10,0.4));
  transition: filter 0.2s;
}

.header-logo-link:hover .header-logo-img {
  filter: drop-shadow(0 0 20px rgba(200,144,10,0.7));
}

/* Mobile: smaller watermark */
@media (max-width: 680px) {
  #campaign-header {
    min-height: 140px;
  }

  #campaign-header::before {
    width: 240px;
    height: 240px;
    opacity: 0.12;
  }

  .header-logo-link {
    margin-left: 120px;
  }
}

/* -- CAMPAIGN LAYOUT --------------------------------------- */

#campaign-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.campaign-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4rem;
  align-items: start;
  padding-top: 3rem;
}

/* -- POSTER COLUMN ----------------------------------------- */

.campaign-poster-col {
  /* Sticky: poster stays in view as user scrolls right column */
  position: sticky;
  top: calc(56px + 1.5rem); /* nav height + breathing room */
}

.campaign-poster-wrap {
  width: 100%;
  border: 1px solid var(--border);
}

.campaign-poster-img {
  width: 100%;
  height: auto;
  display: block;
  /* Natural portrait ratio, zero cropping */
}

/* -- CONTENT COLUMN ---------------------------------------- */

.campaign-identity {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.campaign-identity .campaign-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-hot);
  padding: 3px 10px;
  margin-bottom: 1rem;
}

.campaign-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.campaign-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  font-style: italic;
}

/* -- SECTIONS ---------------------------------------------- */

.campaign-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.campaign-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.campaign-section-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* -- LORE -------------------------------------------------- */

.campaign-lore p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.campaign-lore p:last-child { margin-bottom: 0; }

/* -- CHARACTER GRID ---------------------------------------- */

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.char-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: background 0.2s, border-color 0.2s;
}

.char-card:hover {
  background: var(--surface-2);
  border-color: var(--border-hot);
}

.char-portrait {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-hot);
  flex-shrink: 0;
}

.char-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}

.char-initials {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--gold);
}

.char-name {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 600;
  color: #fff;
}

.char-class {
  font-size: 0.8em;
  color: var(--gold);
  opacity: 1;
}

.char-player {
  font-size: 0.7em;
  //color: var(--text-dim);
  font-style: italic;
  font-weight: 400;
  min-height: 1em;
}

.char-bio {
  font-size: 0.8em;
  //color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
}

/* Deceased character styling */
.char-card.char-deceased {
  opacity: 0.5;
  border-style: dashed;
}

.char-card.char-deceased .char-name::after {
  content: " †";
  color: var(--text-dim);
  font-weight: 300;
}

/* -- PLAYER WRAP ------------------------------------------- */

.campaign-player-wrap {
  margin-bottom: 0;
}

.campaign-player-wrap iframe {
  width: 100%;
  display: block;
  border: none;
}

/* -- EPISODE ACCORDION ------------------------------------- */

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.episode {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}

.episode[data-has-maps="true"] {
  border-left: 3px solid var(--gold);
}

.episode:hover {
  border-color: var(--border-hot);
}

.episode-toggle {
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-align: left;
  transition: background 0.2s;
}

.episode-toggle:hover {
  background: var(--surface-2);
}

.episode-toggle[aria-expanded="true"] {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.ep-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.ep-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.ep-date {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.ep-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
}

.ep-arrow {
  font-size: 18px;
  color: var(--text-dim);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.episode-toggle[aria-expanded="true"] .ep-arrow {
  transform: rotate(180deg);
  color: var(--gold);
}

/* Episode body - hidden/shown by JS */
.episode-body {
  padding: 1.5rem 1.25rem;
}

.episode-notes p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.episode-notes p:last-child { margin-bottom: 0; }

/* -- BATTLEMAP TOGGLE -------------------------------------- */

.episode-maps {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.maps-toggle {
  background: none;
  border: 1px solid var(--border-hot);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.maps-toggle:hover {
  background: var(--gold);
  color: #000;
}

.maps-toggle[aria-expanded="true"] {
  background: var(--gold);
  color: #000;
}

/* Battlemap grid - 2-3 thumbnails per row, click to lightbox */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.maps-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.maps-grid img:hover {
  border-color: var(--border-hot);
  transform: scale(1.02);
}

/* Dev placeholder when no images added yet */
.maps-placeholder {
  padding: 1.5rem;
  border: 1px dashed var(--border);
  text-align: center;
}

.maps-placeholder p {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

.maps-placeholder code {
  font-family: monospace;
  color: var(--gold);
  opacity: 0.7;
}

/* -- LIGHTBOX ---------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}

.lightbox[hidden] { display: none; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
}

.lightbox-caption {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  min-height: 1.4em;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--border-hot);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.lightbox-close:hover {
  background: var(--gold);
  color: #000;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border-hot);
  color: var(--gold);
  font-size: 32px;
  width: 48px;
  height: 64px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold);
  color: #000;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* Hide prev/next when only one image */
.lightbox.single-image .lightbox-prev,
.lightbox.single-image .lightbox-next {
  display: none;
}

/* -- CAMPAIGN PRIMER - intro callout box ------------------- */

.campaign-primer {
  border-left: 3px solid var(--gold);
  background: rgba(200, 144, 10, 0.05);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.campaign-primer p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 0.85rem;
  font-style: italic;
}

.campaign-primer p:last-child {
  margin-bottom: 0;
}

/* -- RESPONSIVE -------------------------------------------- */

/* -- Large tablet (960px) - tighten poster column -- */
@media (max-width: 960px) {
  .campaign-layout {
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
  }

  .char-portrait {
    width: 180px;
    height: 180px;
  }
}

/* -- Small tablet (768px) - compress further -- */
@media (max-width: 768px) {
  #campaign-main {
    padding: 0 1.5rem 3rem;
  }

  .campaign-layout {
    grid-template-columns: 220px 1fr;
    gap: 1.75rem;
  }

  .campaign-title {
    font-size: clamp(28px, 6vw, 44px);
  }

  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .char-portrait {
    width: 140px;
    height: 140px;
  }

  .char-initials {
    font-size: 42px;
  }

  .episode-toggle {
    gap: 0.75rem;
    padding: 1rem;
  }

  .ep-title {
    font-size: 16px;
  }

  /* Nav buttons tighten up */
  #main-nav a {
    font-size: 13px;
    padding: 0.85rem 1rem;
    letter-spacing: 0.08em;
  }
}

/* -- Mobile (680px) - full stack -- */
@media (max-width: 680px) {
  /* Header watermark smaller */
  #campaign-header {
    min-height: 120px;
  }

  #campaign-header::before {
    width: 200px;
    height: 200px;
    opacity: 0.2;
    left: 1rem;
  }

  .header-logo-link {
    margin-left: 100px;
    font-size: 11px;
  }

  #campaign-main {
    padding: 0 1rem 2.5rem;
  }

  /* Stack poster above content */
  .campaign-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-top: 1.5rem;
  }

  .campaign-poster-col {
    position: static;
  }

  .campaign-poster-wrap {
    max-width: 280px;
    margin: 0 auto;
  }

  .campaign-title {
    font-size: clamp(28px, 8vw, 42px);
  }

  .campaign-subtitle {
    font-size: 16px;
  }

  .campaign-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  /* Characters: 1 column on small phones, 2 on larger phones */
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .char-card {
    padding: 1.25rem 1rem;
  }

  .char-portrait {
    width: 160px;
    height: 160px;
  }

  .char-initials {
    font-size: 30px;
  }

  .char-name {
    font-size: 0.95em;
  }

  /* Episode accordion */
  .episode-toggle {
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
  }

  .ep-num {
    font-size: 11px;
  }

  .ep-title {
    font-size: 15px;
  }

  .ep-date {
    font-size: 11px;
  }

  .episode-body {
    padding: 1.25rem 1rem;
  }

  .episode-notes p {
    font-size: 15px;
  }

  /* Maps */
  .maps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Lightbox controls */
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }

  /* Campaign lore text */
  .campaign-lore p {
    font-size: 16px;
  }

} /* end @media (max-width: 680px) */

/* -- Very small phones (380px) - single column characters -- */
@media (max-width: 380px) {
  .character-grid {
    grid-template-columns: 1fr;
  }

  .char-portrait {
    width: 120px;
    height: 120px;
  }

  #main-nav a {
    font-size: 11px;
    padding: 0.75rem 0.6rem;
    letter-spacing: 0.05em;
  }

  .campaign-title {
    font-size: clamp(24px, 9vw, 36px);
  }
}


/* -- EPISODE SHOW NOTES - list styling --------------------- */

.episode-notes ul {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.episode-notes ul li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Gold diamond bullet */
.episode-notes ul li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 9px;
  color: var(--gold);
  opacity: 0.8;
}

/* Section heading inside notes e.g. "Music" */
.episode-notes h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.25rem 0 0.5rem;
}

.episode-notes h4:first-child {
  margin-top: 0;

}

/* ── CONSENT BANNER ──────────────────────────────────────── */
/* Append to notp.css                                         */

#notp-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--surface-2);
  border-top: 1px solid var(--border-hot);
  padding: 1rem 2rem;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#notp-consent-banner.notp-banner-hidden {
  transform: translateY(100%);
  opacity: 0;
}

.notp-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.notp-banner-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}

.notp-banner-text strong {
  color: var(--text);
  font-weight: 600;
}

.notp-banner-text a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notp-banner-text a:hover { color: #fff; }

.notp-banner-actions {
  display: flex;
  gap: 0.65rem;
  flex-shrink: 0;
  align-items: center;
}

.notp-banner-btn {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--border-hot);
  cursor: pointer;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.notp-banner-btn--accept {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.notp-banner-btn--accept:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #000;
}

.notp-banner-btn--learn {
  color: var(--gold);
  background: transparent;
}

.notp-banner-btn--learn:hover {
  background: var(--gold);
  color: #000;
}

/* RSS player placeholder — shown before consent */
.rss-player-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 2rem;
  text-align: center;
}

.rss-player-placeholder p {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.7;
}

.rss-player-placeholder p a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  #notp-consent-banner {
    padding: 1rem 1.25rem;
  }

  .notp-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .notp-banner-actions {
    width: 100%;
  }

  .notp-banner-btn {
    flex: 1;
    text-align: center;
  }
}
