/**
 * chicago-tribune-briefing.css
 * Authentic 1880s Chicago Tribune newspaper styling for Haymarket briefing.
 * Period-accurate typography, column layouts, ornamental rules, and ink textures.
 */

/* ── Google Fonts: Period-accurate newspaper typography ── */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&family=Playfair+Display:ital,wght@0,400;0,700;0,800;0,900;1,400;1,700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=IM+Fell+English:ital@0;1&family=IM+Fell+DW+Pica:ital@0;1&display=swap');

/* ════════════════════════════════════════════════════════════════════════════
   BRIEFING OVERLAY — Newsprint surface
════════════════════════════════════════════════════════════════════════════ */
#mission-briefing-overlay.trib {
  position: fixed;
  inset: 0;
  background: #2a2318;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1.5rem 1rem 4rem;
  font-family: 'Libre Baskerville', 'Times New Roman', serif;
}

/* ── Paper surface ── */
.trib .mb-paper {
  background:
    /* Newsprint grain noise */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E") repeat,
    #f2ecd8;
  border: none;
  box-shadow:
    0 0 0 1px #c8b48a,
    0 4px 40px rgba(0,0,0,0.6),
    inset 0 0 80px rgba(0,0,0,0.04);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  font-family: 'Libre Baskerville', 'Times New Roman', serif;
}

/* Aged paper yellowing at edges */
.trib .mb-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 40%, rgba(139, 100, 40, 0.12) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   MASTHEAD — Full Chicago Tribune 1886 treatment
════════════════════════════════════════════════════════════════════════════ */
.trib .mb-mast {
  background: #f2ecd8;
  border-bottom: none;
  padding: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Top rule — triple line */
.trib-rule-top {
  height: 10px;
  background:
    linear-gradient(#1a140a 0 2px, #f2ecd8 2px 3px, #1a140a 3px 5px,
                    #f2ecd8 5px 6px, #1a140a 6px 8px, #f2ecd8 8px 9px, #1a140a 9px 10px);
  margin: 0;
}

/* Subheader strip: city + date + price */
.trib-meta-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 6px 12px 4px;
  border-bottom: 1px solid #1a140a;
  border-top: 1px solid #1a140a;
  margin-top: 6px;
}
.trib-meta-strip span {
  font-family: 'IM Fell English', serif;
  font-size: 0.6rem;
  color: #1a140a;
  letter-spacing: 0.5px;
}
.trib-meta-strip span:first-child { text-align: left; }
.trib-meta-strip span:last-child  { text-align: right; }
.trib-meta-strip span:nth-child(2){ text-align: center; font-style: italic; }

/* Newspaper name — blackletter style */
.trib-name-row {
  padding: 8px 12px 6px;
  border-bottom: 3px solid #1a140a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}
.trib-name {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: #0a0805;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.15);
}

/* Vertical ornamental dividers flanking the name */
.trib-name-row::before,
.trib-name-row::after {
  content: '❦';
  font-size: 1.4rem;
  color: #3a2a12;
  flex: 1;
  text-align: center;
  opacity: 0.7;
}

/* Tagline row below masthead name */
.trib-tagline {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.62rem;
  color: #1a140a;
  letter-spacing: 2px;
  text-align: center;
  padding: 3px 0 5px;
  border-bottom: 1px solid #1a140a;
}

/* Edition and price strip */
.trib-edition {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 12px;
  border-bottom: 3px double #1a140a;
}
.trib-edition span {
  font-family: 'IM Fell English', serif;
  font-size: 0.55rem;
  color: #1a140a;
  letter-spacing: 0.5px;
}
.trib-edition span:nth-child(2) { text-align: center; font-weight: bold; text-transform: uppercase; }
.trib-edition span:last-child    { text-align: right; }

/* ════════════════════════════════════════════════════════════════════════════
   PAGE CONTENT — Multi-column newspaper layout
════════════════════════════════════════════════════════════════════════════ */
#mb-content.trib-content {
  padding: 0;
  column-gap: 0;
  position: relative;
  z-index: 1;
}

/* Column rule decorative header */
.trib-section-rule {
  text-align: center;
  padding: 6px 0 4px;
  border-top: 1px solid #1a140a;
  border-bottom: 1px solid #1a140a;
  margin: 0 12px 0;
  font-family: 'IM Fell English', serif;
  font-size: 0.55rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1a140a;
}

/* Article wrapper — 3 column grid for desktop, 1 col mobile */
.trib-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid #1a140a;
}
.trib-article-grid.two-col  { grid-template-columns: 2fr 1fr; }
.trib-article-grid.full-col { grid-template-columns: 1fr; }

/* Vertical column rules */
.trib-col {
  padding: 8px 12px;
  border-right: 1px solid #1a140a;
  position: relative;
}
.trib-col:last-child { border-right: none; }

/* ── Dateline ── */
.trib-dateline {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.58rem;
  font-style: italic;
  color: #2a1a0a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

/* ── Column rule before headline ── */
.trib-col-rule {
  height: 1px;
  background: #1a140a;
  margin: 4px 0 6px;
}

/* ── Headlines ── */
.trib-headline {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-weight: 900;
  color: #0a0805;
  line-height: 1.1;
  margin-bottom: 4px;
  hyphens: auto;
}
.trib-headline.sz-sm  { font-size: 1.05rem; }
.trib-headline.sz-md  { font-size: 1.3rem; }
.trib-headline.sz-lg  { font-size: 1.6rem; font-weight: 900; }
.trib-headline.sz-xl  { font-size: 2rem;   font-style: italic; }
.trib-headline.sz-xxl { font-size: 2.4rem; letter-spacing: -0.5px; }
.trib-headline.alert  { color: #8a1212; }
.trib-headline.urgent { color: #8a1212; font-style: italic; }

/* Cross-rule between headline and deck */
.trib-cross-rule {
  height: 1px;
  background: #1a140a;
  margin: 5px 0;
}

/* ── Deck / subheadline ── */
.trib-deck {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: #1a140a;
  line-height: 1.4;
  margin-bottom: 6px;
  border-bottom: 1px solid #1a140a;
  padding-bottom: 5px;
}

/* ── Byline ── */
.trib-byline {
  font-family: 'IM Fell English', serif;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1a140a;
  margin-bottom: 6px;
  font-style: italic;
}

/* ── Body copy — justified newspaper column text ── */
.trib-body {
  font-family: 'IM Fell DW Pica', 'Times New Roman', serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #0f0c08;
  text-align: justify;
  hyphens: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Drop cap on first paragraph */
.trib-body::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3em;
  font-weight: 900;
  float: left;
  line-height: 0.75;
  margin: 4px 4px 0 0;
  color: #0a0805;
}

/* ── Ticker / caption strip ── */
.trib-ticker {
  border-top: 2px solid #1a140a;
  border-bottom: 1px solid #1a140a;
  padding: 3px 0;
  margin: 6px 0 0;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.6rem;
  color: #1a140a;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ── Ornamental divider between articles ── */
.trib-ornament {
  text-align: center;
  font-size: 0.9rem;
  color: #3a2a12;
  margin: 6px 0;
  letter-spacing: 4px;
}

/* ── Continue button — newspaper subscription notice style ── */
.trib-cont-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  background: transparent;
  color: #0a0805;
  border: 1px solid #1a140a;
  cursor: pointer;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 6px 12px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}
.trib-cont-btn:hover {
  background: rgba(26, 20, 10, 0.07);
  border-color: #0a0805;
}
.trib-cont-btn::before,
.trib-cont-btn::after {
  content: '—';
  margin: 0 8px;
}

/* ── Cursor blink ── */
.trib-cursor {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  background: #0a0805;
  vertical-align: middle;
  animation: trib-blink 0.65s step-end infinite;
}
@keyframes trib-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════════════════
   IDENTITY CARD SECTION
════════════════════════════════════════════════════════════════════════════ */
#mb-card-section.trib-card-section {
  display: none;
  padding: 16px;
  background: #ece6d0;
  border-top: 3px double #1a140a;
  position: relative;
  z-index: 1;
}

/* Card eyebrow — ornamental */
.trib-card-eyebrow {
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #2a1a0a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.trib-card-eyebrow::before,
.trib-card-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a140a;
}

/* ID note text */
#mb-id-note.trib-note {
  font-family: 'IM Fell DW Pica', serif;
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #1a140a;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1a140a;
}

/* Final line */
#mb-final-bar.trib-final {
  padding: 10px 0 0;
  border-top: 1px solid #1a140a;
  margin-top: 10px;
  display: none;
}
#mb-final-text.trib-final-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: #0a0805;
  text-align: center;
  line-height: 1.7;
}
#mb-final-text.trib-final-text strong {
  font-style: normal;
  font-weight: 800;
}

/* Begin button */
#mb-begin.trib-begin {
  display: block;
  width: 100%;
  background: transparent;
  color: #0a0805;
  border: 1px solid #1a140a;
  cursor: pointer;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.78rem;
  padding: 8px 0;
  margin-top: 10px;
  letter-spacing: 2px;
  transition: background 0.2s ease;
}
#mb-begin.trib-begin:hover {
  background: rgba(26, 20, 10, 0.08);
}

/* Back button */
#mb-back-button.trib-back {
  position: fixed;
  top: 12px;
  left: 12px;
  background: rgba(242, 236, 216, 0.9);
  color: #1a140a;
  border: 1px solid #1a140a;
  padding: 4px 10px;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.65rem;
  cursor: pointer;
  z-index: 10001;
  letter-spacing: 0.5px;
}
#mb-back-button.trib-back:hover {
  background: #1a140a;
  color: #f2ecd8;
}

/* ════════════════════════════════════════════════════════════════════════════
   FRONT PAGE HERO ARTICLE — Full width treatment
════════════════════════════════════════════════════════════════════════════ */
.trib-hero-col {
  grid-column: 1 / -1;
  padding: 10px 14px 8px;
  border-bottom: 2px solid #1a140a;
}
.trib-hero-col .trib-headline { text-align: center; }

/* Ornamental border for major headlines */
.trib-ornamental-border {
  border: 1px solid #1a140a;
  padding: 2px;
  margin-bottom: 6px;
  text-align: center;
}
.trib-ornamental-border::before {
  content: '✦';
  margin-right: 8px;
  font-size: 0.6rem;
}
.trib-ornamental-border::after {
  content: '✦';
  margin-left: 8px;
  font-size: 0.6rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   SMALL-COLUMN SIDEBAR ITEMS
════════════════════════════════════════════════════════════════════════════ */
.trib-sidebar-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(26, 20, 10, 0.3);
  margin-bottom: 6px;
}
.trib-sidebar-item:last-child { border-bottom: none; }
.trib-sidebar-head {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: #0a0805;
  margin-bottom: 2px;
}
.trib-sidebar-text {
  font-family: 'IM Fell DW Pica', serif;
  font-size: 0.7rem;
  color: #1a140a;
  line-height: 1.4;
  text-align: justify;
}

/* ════════════════════════════════════════════════════════════════════════════
   TYPEWRITER ANIMATION for Tribune
════════════════════════════════════════════════════════════════════════════ */
.trib-body .trib-cursor,
.trib-headline .trib-cursor,
.trib-deck .trib-cursor {
  background: #0a0805;
}

/* ════════════════════════════════════════════════════════════════════════════
   AD COLUMN — period filler for authenticity
════════════════════════════════════════════════════════════════════════════ */
.trib-ad {
  border: 1px solid #1a140a;
  padding: 8px 6px;
  text-align: center;
  margin: 8px 0;
  background: rgba(255,255,255,0.3);
}
.trib-ad-head {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #0a0805;
  margin-bottom: 4px;
}
.trib-ad-body {
  font-family: 'IM Fell DW Pica', serif;
  font-style: italic;
  font-size: 0.6rem;
  color: #1a140a;
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .trib-article-grid,
  .trib-article-grid.two-col {
    grid-template-columns: 1fr;
  }
  .trib-col {
    border-right: none;
    border-bottom: 1px solid #1a140a;
    padding: 8px 10px;
  }
  .trib-col:last-child { border-bottom: none; }
  .trib-name           { font-size: 2rem; }
  .trib-headline.sz-xxl { font-size: 1.7rem; }
  .trib-headline.sz-xl  { font-size: 1.5rem; }
  .trib-headline.sz-lg  { font-size: 1.25rem; }
  .trib-body            { font-size: 0.78rem; }
  #mission-briefing-overlay.trib { padding: 0.75rem 0.25rem 3rem; }
}

/* ════════════════════════════════════════════════════════════════════════════
   ENTRANCE ANIMATION
════════════════════════════════════════════════════════════════════════════ */
#mission-briefing-overlay.trib {
  animation: trib-fade-in 0.5s ease forwards;
}
@keyframes trib-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.trib .mb-paper {
  animation: trib-paper-in 0.5s ease forwards;
}
@keyframes trib-paper-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
