/* ═══════════════════════════════════════════════════
   TCBB CREATIVE AGENCY — COMIC BOOK THEME
   Shared styles for all 8 issues
   ═══════════════════════════════════════════════════ */

/* ── Reset + base ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  background: #111;
  color: #111;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── Comic palette ────────────────────────────────── */
:root {
  --ink:     #111111;
  --paper:   #FFFEF8;
  --yellow:  #FFD700;
  --red:     #E82020;
  --blue:    #2255CC;
  --green:   #228833;
  --purple:  #6622AA;
  --orange:  #FF6600;
  --panel-gap: 4px;
  --border:  3px solid #111;
}

/* ── Top comic banner ─────────────────────────────── */
.comic-banner {
  background: var(--red);
  color: white;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #111;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
  gap: 4px;
}
.comic-banner-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(14px, 2.5vw, 18px);
  letter-spacing: 0.08em;
}
.comic-banner-issue {
  font-family: 'Bangers', cursive;
  font-size: clamp(12px, 2vw, 15px);
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.comic-banner-price {
  font-family: 'Bangers', cursive;
  font-size: clamp(11px, 1.8vw, 14px);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ── Panel grid ───────────────────────────────────── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--panel-gap);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--panel-gap);
}

/* Column spans */
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* Row spans */
.row-2 { grid-row: span 2; }

/* ── Panel base ───────────────────────────────────── */
.panel {
  background: var(--paper);
  border: var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.panel:hover {
  transform: scale(1.012);
  box-shadow: 4px 4px 0 #111;
  z-index: 2;
}

.panel-inner {
  padding: clamp(12px, 2.5vw, 22px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Panel height helpers */
.h-auto    { min-height: 120px; }
.h-medium  { min-height: 200px; }
.h-tall    { min-height: 280px; }
.h-hero    { min-height: 340px; }

/* ── Panel color fills + halftone ─────────────────── */
.panel-yellow {
  background: var(--yellow);
  background-image: radial-gradient(circle, rgba(180,100,0,0.3) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
}
.panel-red {
  background: var(--red);
  background-image: radial-gradient(circle, rgba(80,0,0,0.25) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
}
.panel-blue {
  background: var(--blue);
  background-image: radial-gradient(circle, rgba(0,20,80,0.25) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
}
.panel-green {
  background: var(--green);
  background-image: radial-gradient(circle, rgba(0,40,0,0.25) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
}
.panel-purple {
  background: var(--purple);
  background-image: radial-gradient(circle, rgba(20,0,60,0.25) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
}
.panel-dark {
  background: #111;
  color: white;
}
.panel-dark .caption-box { background: var(--yellow); color: #111; }

/* ── Caption boxes (top-left corner text) ─────────── */
.caption-box {
  display: inline-block;
  background: var(--yellow);
  color: #111;
  font-family: 'Bangers', cursive;
  font-size: clamp(11px, 1.8vw, 14px);
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border: 2px solid #111;
  border-radius: 2px;
  align-self: flex-start;
}
.caption-red    { background: var(--red); color: white; }
.caption-blue   { background: var(--blue); color: white; }
.caption-purple { background: var(--purple); color: white; }
.caption-dark   { background: #111; color: var(--yellow); }

/* ── Speech bubbles ───────────────────────────────── */
.speech-bubble {
  background: white;
  border: var(--border);
  border-radius: 20px;
  padding: clamp(10px, 2vw, 16px) clamp(12px, 2.5vw, 20px);
  position: relative;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.5;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -18px; left: 28px;
  border: 9px solid transparent;
  border-top-color: #111;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -12px; left: 31px;
  border: 7px solid transparent;
  border-top-color: white;
  z-index: 1;
}
.thought-bubble {
  background: white;
  border: var(--border);
  border-radius: 50%;
  padding: 16px 20px;
  position: relative;
  text-align: center;
}

/* ── Action words ─────────────────────────────────── */
.action-word {
  font-family: 'Bangers', cursive;
  font-size: clamp(42px, 9vw, 80px);
  color: var(--yellow);
  -webkit-text-stroke: 3px #111;
  text-shadow: 4px 4px 0 var(--red), 7px 7px 0 #111;
  display: block;
  transform: rotate(-6deg);
  line-height: 1;
  animation: actionPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.action-word.sm {
  font-size: clamp(28px, 5vw, 48px);
  -webkit-text-stroke: 2px #111;
  text-shadow: 3px 3px 0 var(--red), 5px 5px 0 #111;
}
.action-word.blue {
  color: #99CCFF;
  text-shadow: 4px 4px 0 var(--blue), 7px 7px 0 #111;
}
.action-word.red {
  color: var(--red);
  text-shadow: 4px 4px 0 var(--orange), 7px 7px 0 #111;
}
.action-word.white {
  color: white;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.4), 7px 7px 0 #111;
}

@keyframes actionPop {
  0%   { transform: scale(0.3) rotate(-6deg); opacity: 0; }
  70%  { transform: scale(1.1) rotate(-6deg); }
  100% { transform: scale(1) rotate(-6deg); opacity: 1; }
}

/* ── Starburst badge ──────────────────────────────── */
.starburst-badge {
  display: inline-block;
  background: var(--yellow);
  border: var(--border);
  padding: 6px 12px;
  font-family: 'Bangers', cursive;
  font-size: clamp(14px, 2.2vw, 18px);
  letter-spacing: 0.06em;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  text-align: center;
  animation: spinStar 8s linear infinite;
}
@keyframes spinStar { to { transform: rotate(360deg); } }

/* ── Panel headings ───────────────────────────────── */
.panel-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(24px, 5vw, 44px);
  letter-spacing: 0.05em;
  line-height: 1.05;
  color: #111;
}
.panel-subtitle {
  font-family: 'Bangers', cursive;
  font-size: clamp(16px, 3vw, 26px);
  letter-spacing: 0.04em;
  color: #444;
}

.panel-body {
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.6;
  color: #222;
}

/* Colored text */
.text-yellow  { color: var(--yellow); }
.text-red     { color: var(--red); }
.text-blue    { color: var(--blue); }
.text-purple  { color: var(--purple); }
.text-green   { color: var(--green); }
.text-white   { color: white; }

/* ── Stats / character card ───────────────────────── */
.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Bangers', cursive;
  font-size: clamp(13px, 2.2vw, 16px);
  letter-spacing: 0.04em;
}
.stat-bar-track {
  flex: 1;
  height: 10px;
  background: #ddd;
  border: 2px solid #111;
  border-radius: 0;
}
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--yellow));
}
.stat-label { min-width: 70px; }
.stat-value { min-width: 28px; text-align: right; }

/* ── "Classified" stamp ───────────────────────────── */
.classified-stamp {
  display: inline-block;
  border: 4px solid var(--red);
  color: var(--red);
  font-family: 'Bangers', cursive;
  font-size: clamp(20px, 4vw, 36px);
  letter-spacing: 0.15em;
  padding: 4px 16px;
  transform: rotate(-8deg);
  opacity: 0.85;
}

/* ── Divider rules ────────────────────────────────── */
.comic-rule {
  border: none;
  border-top: 3px solid #111;
  margin: 4px 0;
}
.comic-rule-dashed {
  border-top: 3px dashed #111;
}

/* ── Bottom navigation ────────────────────────────── */
.issue-nav {
  background: #111;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 3px solid #111;
  gap: 12px;
  flex-wrap: wrap;
}
.issue-nav-btn {
  font-family: 'Bangers', cursive;
  font-size: clamp(14px, 2.5vw, 18px);
  letter-spacing: 0.06em;
  color: var(--yellow);
  text-decoration: none;
  padding: 6px 16px;
  border: 2px solid var(--yellow);
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.issue-nav-btn:hover {
  background: var(--yellow);
  color: #111;
}
.issue-nav-btn.disabled {
  color: #555;
  border-color: #555;
  pointer-events: none;
}
.issue-counter {
  font-family: 'Bangers', cursive;
  font-size: clamp(13px, 2vw, 16px);
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ── "All themes" fixed button ────────────────────── */
#all-themes-btn {
  position: fixed;
  bottom: 65px; right: 20px; /* clears the ~55px issue-nav footer */
  z-index: 999;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: var(--yellow);
  color: #111;
  font-family: 'Bangers', cursive;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 3px solid #111;
  border-radius: 3px;
  box-shadow: 3px 3px 0 #111;
  transition: transform 0.15s, box-shadow 0.15s;
}
#all-themes-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #111;
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 760px) {
  .col-3, .col-4 { grid-column: span 6; }
  .col-5, .col-6 { grid-column: span 12; }
  .col-7, .col-8 { grid-column: span 12; }
  .col-9, .col-12 { grid-column: span 12; }
  .h-hero  { min-height: 220px; }
  .h-tall  { min-height: 180px; }
  .h-medium{ min-height: 140px; }
}
@media (max-width: 480px) {
  .col-3, .col-4, .col-5, .col-6 { grid-column: span 12; }
  .action-word { font-size: clamp(36px, 12vw, 56px); }
  .panel-title { font-size: clamp(22px, 7vw, 36px); }

  /* Issue nav: hide counter + force single row so footer stays one line */
  .issue-counter { display: none; }
  .issue-nav {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .issue-nav-btn {
    font-size: clamp(11px, 3vw, 14px);
    padding: 6px 10px;
    white-space: nowrap;
  }
  /* Tighten button so it clears the now-single-row footer */
  #all-themes-btn { bottom: 58px; font-size: 12px; padding: 7px 12px; }
}
