/* ═══════════════════════════════════════════════════════════════════════════
   CALA RATJADA DAILY — Editorial Stylesheet
   Self-hosted fonts: Fraunces (display serif) + Inter (body)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  font-weight: 700;
  src: url('/fonts/fraunces-bold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  font-weight: 400;
  src: url('/fonts/fraunces-regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  src: url('/fonts/inter-regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-weight: 700;
  src: url('/fonts/inter-bold.woff2') format('woff2');
  font-display: swap;
}

/* ── Design Tokens ──────────────────────────────────────────────────────── */

:root {
  /* Core palette */
  --cream:      #f5f0e8;
  --cream-warm: #f0ebe0;
  --off-white:  #fafaf8;
  --black:      #1a1a19;
  --midnight:   #141e2b;

  /* Accent colors */
  --rose:       #e8c4b8;
  --rose-dark:  #9b3a2a;
  --powder:     #c5d8d8;
  --gold:       #c9a84c;
  --gold-light: #e8d49a;
  --forest:     #1e3a2f;
  --taupe:      #d4c5b0;

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --pad:    clamp(32px, 6vw, 80px);
  --pad-sm: clamp(16px, 3vw, 40px);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--black);
  line-height: 1.5;
  display: flex;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 80px;
  background: var(--cream);
  border-right: 2px solid var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 1000;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.sidebar__icon-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar__icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--black);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: all 0.2s ease;
  border-radius: 2px;
}

.sidebar__icon-btn:hover {
  background: var(--black);
  color: var(--cream);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════════════════════════════════════════════ */

.main-wrapper {
  margin-left: 80px;
  width: calc(100% - 80px);
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MASTHEAD
   ═══════════════════════════════════════════════════════════════════════════ */

.masthead {
  background: var(--cream);
  padding: var(--pad);
  border-bottom: 2px solid var(--black);
  position: fixed;
  top: 0;
  left: 80px;
  right: 0;
  z-index: 400;
}

.masthead--shrunk {
  padding: 12px var(--pad-sm);
}

.masthead__container {
  max-width: 1400px;
  margin: 0 auto;
}

.masthead__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.masthead__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.masthead--shrunk .masthead__title {
  font-size: 1.4rem;
}

.masthead__meta {
  text-align: right;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  line-height: 1.8;
}

.masthead__rule {
  border: none;
  border-top: 1px solid var(--black);
  margin: 16px 0;
}

.masthead__tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  max-width: 780px;
  opacity: 0.75;
  margin-top: 20px;
}

.masthead__date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 12px;
}

.masthead--shrunk .masthead__tagline,
.masthead--shrunk .masthead__date,
.masthead--shrunk .masthead__meta,
.masthead--shrunk .masthead__rule {
  display: none;
}

.masthead--shrunk .masthead__top {
  margin-bottom: 0;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIGEST CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.digest-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#spreads {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREADS — Shared
   ═══════════════════════════════════════════════════════════════════════════ */

.spread {
  width: 100%;
  min-height: 100vh;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: 0;
  page-break-after: always;
  position: relative;
  overflow: hidden;
}

/* Header row: category breadcrumb + number */
.spread__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.spread__header--light { opacity: 0.9; }

.spread__category {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

.spread__category--gold  { color: var(--gold); opacity: 1; }
.spread__category--minimal { opacity: 0.35; }

.spread__num-top {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  opacity: 0.4;
}

.spread__num-top--gold   { color: var(--gold); opacity: 0.8; }
.spread__num-top--rose   { color: var(--rose-dark); opacity: 0.9; }
.spread__num-top--minimal { opacity: 0.2; }

/* Horizontal rule */
.spread__rule {
  border: none;
  border-top: 1px solid currentColor;
  opacity: 0.2;
  margin-bottom: var(--pad-sm);
}

.spread__rule--gold     { border-color: var(--gold); opacity: 0.4; }
.spread__rule--rose     { border-color: var(--rose-dark); opacity: 0.4; }
.spread__rule--terminal { border-color: #3a7c3a; opacity: 0.5; }
.spread__rule--minimal  { opacity: 0.12; }

/* Content block */
.spread__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 32px);
}

/* Title */
.spread__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.spread__title--light   { color: var(--cream); }
.spread__title--smaller { font-size: clamp(1.8rem, 4vw, 3.5rem); max-width: 28ch; }
.spread__title--minimal { font-size: clamp(2rem, 4.5vw, 4rem); font-weight: 400; max-width: 24ch; }
.spread__title--terminal {
  font-family: 'Courier New', 'Courier', monospace;
  color: #7aba7a;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  letter-spacing: 0.02em;
}
.spread__title--academic {
  font-style: italic;
  max-width: 22ch;
}

/* Summary */
.spread__summary {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.75;
  max-width: 62ch;
  opacity: 0.85;
}

/* Error / Placeholder */
.spread__summary--placeholder {
  background: rgba(200, 160, 100, 0.15);
  padding: 16px;
  border-left: 4px solid var(--gold);
  font-style: italic;
  opacity: 0.7;
  border-radius: 2px;
}

.spread__summary--placeholder::before {
  content: '[PLATZHALTER] ';
  font-weight: 700;
  color: var(--gold);
}

/* Pull quote */
.spread__pullquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  line-height: 1.4;
  max-width: 38ch;
  border-left: 3px solid currentColor;
  padding-left: 20px;
  margin-top: 8px;
  opacity: 0.7;
}

.spread__pullquote--gold   { color: var(--gold); border-color: var(--gold); opacity: 1; }
.spread__pullquote--italic { border-left-color: currentColor; }

/* Footer */
.spread__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid currentColor;
  opacity: 0.6;
}

.spread__footer--light { color: var(--cream); }

.spread__source {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Sentiment badge */
.sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  background: rgba(0,0,0,0.08);
}

.sentiment-positive { background: rgba(40, 120, 60, 0.12); color: #1a5c30; }
.sentiment-neutral  { background: rgba(0,0,0,0.07); }
.sentiment-negative { background: rgba(160, 30, 30, 0.1); color: #8b1a1a; }

.badge-score { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 1 — HERO  (warm cream)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--hero {
  background: var(--cream);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 2 — DARK  (midnight navy + gold)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--dark {
  background: var(--midnight);
  color: var(--cream);
}

.spread--dark .spread__summary { color: var(--cream); opacity: 0.75; }
.spread--dark .spread__summary--placeholder { background: rgba(201, 168, 76, 0.15); color: var(--cream); opacity: 0.8; }
.spread--dark .spread__rule    { border-color: var(--gold); opacity: 0.35; }
.spread--dark .spread__footer  { border-color: var(--gold); opacity: 0.5; }
.spread--dark .sentiment-badge { background: rgba(201,168,76,0.15); color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 3 — ROSE ALERT  (warm rose / salmon)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--rose-alert {
  background: var(--rose);
}

.rose-stamp {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1.5px solid var(--rose-dark);
  color: var(--rose-dark);
  padding: 5px 10px;
}

.spread__num-top--rose { color: var(--rose-dark); }

.rose-two-col {
  columns: 2;
  column-gap: clamp(20px, 4vw, 48px);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  opacity: 0.85;
}

@media (max-width: 700px) {
  .rose-two-col { columns: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 4 — TERMINAL  (near-black + green)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--terminal {
  background: #0f1419;
  color: #a8d8a8;
  font-family: 'Courier New', monospace;
}

.terminal-prompt {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #5a9a5a;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.terminal-summary {
  font-family: 'Courier New', monospace;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: #9ac89a;
  line-height: 1.8;
  opacity: 1;
  max-width: 68ch;
}

.terminal-footer {
  color: #5a9a5a;
  border-color: #3a6a3a;
}

.terminal-source { color: #5a9a5a; }

.spread--terminal .sentiment-badge {
  background: rgba(90, 154, 90, 0.2);
  color: #7aba7a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 5 — ACADEMIC  (powder blue + drop-cap)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--academic {
  background: var(--powder);
}

.academic-content { gap: clamp(12px, 2vw, 24px); }

.drop-cap-text::first-letter {
  float: left;
  font-size: 6em;
  line-height: 0.75;
  margin-right: 0.08em;
  margin-top: 0.08em;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--black);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 6 — BIG-STAT  (warm cream + giant number)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--big-stat {
  background: var(--cream-warm);
}

.big-stat-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  flex: 1;
  margin-top: 16px;
}

.big-stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 18vw, 18rem);
  line-height: 0.85;
  color: var(--rose-dark);
  user-select: none;
  letter-spacing: -0.04em;
}

.big-stat-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.big-stat-body .spread__footer { border-color: var(--cream-warm); }

@media (max-width: 600px) {
  .big-stat-layout { grid-template-columns: 1fr; }
  .big-stat-number { font-size: 7rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 7 — BYLINE BOLD  (dark forest + gold)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--byline-bold {
  background: var(--forest);
  color: var(--cream);
}

.byline-source-block {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  margin-top: 8px;
}

.spread--byline-bold .spread__summary { color: var(--cream); opacity: 0.7; }
.spread--byline-bold .spread__summary--placeholder { background: rgba(201, 168, 76, 0.15); }
.spread--byline-bold .spread__rule    { border-color: var(--gold); opacity: 0.3; }
.spread--byline-bold .spread__footer  { border-color: var(--gold); opacity: 0.5; }
.spread--byline-bold .sentiment-badge { background: rgba(201,168,76,0.15); color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 8 — PULL QUOTE  (soft blue-grey)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--pull-quote {
  background: #dce8ec;
}

.pull-quote-block {
  margin: 0;
  padding: clamp(20px, 3vw, 40px) 0;
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  margin-bottom: clamp(20px, 3vw, 40px);
}

.pull-quote-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 12px;
}

.pull-quote-source {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 9 — EDITORIAL BRIEF  (warm taupe + bullets)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--data-grid {
  background: var(--taupe);
}

.brief-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}

.brief-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 60ch;
}

.brief-bullets li {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.brief-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPREAD 10 — MINIMALIST  (pure white)
   ═══════════════════════════════════════════════════════════════════════════ */

.spread--minimalist {
  background: #ffffff;
}

.minimalist-content { gap: clamp(16px, 2.5vw, 28px); }

.minimalist-footer {
  border-top-color: rgba(0,0,0,0.15);
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.colophon {
  background: var(--off-white);
  padding: var(--pad);
  text-align: center;
  border-top: 2px solid var(--black);
  margin-top: auto;
}

.colophon p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  margin: 8px 0;
}

.colophon__meta {
  opacity: 0.6;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar__icon-btn {
    width: 40px;
    height: 40px;
  }

  .main-wrapper {
    margin-left: 60px;
    width: calc(100% - 60px);
  }

  .masthead { left: 60px; }
  .spread { min-height: unset; padding: var(--pad-sm); }
  .spread__title { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  .pull-quote-text { font-size: 1.5rem; }
  .masthead__top { flex-direction: column; gap: 8px; }
  .masthead__meta { text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  .sidebar { display: none; }
  .main-wrapper { margin-left: 0; width: 100%; padding-top: 0 !important; }
  .masthead { position: static; left: auto; right: auto; }
  .spread { page-break-after: always; min-height: 100vh; }
}

/* ── Artikelfoto mit 50er-Jahre-Filter ─────────────────────── */
.spread__photo {
  margin: 1.25rem 0;
  overflow: hidden;
  position: relative;
  max-width: 50%;
}

.spread__photo img {
  width: 100%;
  display: block;
  filter: sepia(75%) contrast(115%) brightness(88%) saturate(50%);
}

.spread__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.35;
}
