/**
 * truth.css — "The Truth" story page: the game's canon intro told as a comic
 * (HQ) page. Panels are generated art with HTML lettering on top: caption
 * boxes and speech bubbles stay selectable, translatable, and crisp at any
 * zoom, and the art files carry no baked-in text. Requires site.css first.
 */

.comic {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 16px 80px;
}

.comic-title {
  text-align: center;
  margin-bottom: 26px;
}

.comic-title h1 {
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 6px;
}

.comic-sub {
  color: var(--ink-dim);
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── the comic sheet: dark paper with gutters ─────────────────────────── */

.comic-sheet {
  position: relative;
}

.comic-sheet::before {
  content: '';
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 9px;
  border-left: 2px dotted rgba(184, 146, 58, 0.45);
}

.comic-sheet {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* start-aligned: stretched rows left blank voids under short panels
   * (critic finding: the bargain beat's panel 5 had a dead brown zone). */
  align-items: start;
  gap: 22px;
  background: linear-gradient(to bottom, var(--metal-light), var(--metal));
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.panel {
  position: relative;
  margin: 0;
  border: 3px solid #0a0b10;
  outline: 1px solid var(--border-hi);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(to bottom, #2a2416, #1e1a10);
}

.panel-wide,
.panel-tall,
.panel-final,
.panel-solo {
  grid-column: 1 / -1;
}

.panel img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.panel-tall img {
  max-width: 620px;
  margin: 0 auto;
}

/* ── lettering ──────────────────────────────────────────────────────────
 * Caption boxes ride the panel's top edge like classic HQ narration;
 * dialogue sits in a bubble strip anchored to the panel's bottom, over the
 * art's lower band (compositions keep their focus center high). */

/* Lettering lives OUTSIDE the artwork (caption strip above the image,
 * dialogue strip below it) so the art is never covered — owner feedback:
 * the overlay boxes were eating the panels. Tails point up, toward the
 * scene the words belong to. */
.panel {
  display: flex;
  flex-direction: column;
}

.caption {
  align-self: flex-start;
  max-width: 92%;
  margin: 8px 8px 8px;
  padding: 6px 10px;
  background: linear-gradient(to bottom, #f4e7c3, #e8d9ae);
  color: #26200f;
  border: 2px solid #0a0b10;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 12px 10px 10px;
}

.bubble {
  position: relative;
  max-width: 88%;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid #0a0b10;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

/* The god speaks in radiant gold; you speak in plain mortal white. */
.bubble-god {
  background: linear-gradient(to bottom, #fff3cf, #f4df9e);
  color: #3a2c08;
  border-color: #8a6a1c;
  align-self: flex-start;
}

.bubble-you {
  background: #f4f5f7;
  color: #1b1d24;
  align-self: flex-end;
}

/* ── ending ─────────────────────────────────────────────────────────── */

.comic-end {
  text-align: center;
  margin-top: 44px;
}

.comic-end-sub {
  color: var(--ink-dim);
  margin: 0 0 18px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.comic-end-line {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 18px;
  text-shadow: 0 0 22px rgba(244, 197, 66, 0.3), 0 4px 16px rgba(0, 0, 0, 0.8);
}

/* ── reveal (enhancement; visible by default without JS) ───────────────── */

html.js .panel[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .panel[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .panel[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── mobile ─────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .comic-sheet {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }

  .caption {
    font-size: 0.74rem;
    max-width: 96%;
  }

  .bubble {
    font-size: 0.78rem;
    max-width: 96%;
  }
}
