/* =====================================================
   WIBA SIGNALS — Editorial CSS
   NYT-inspired design: clean, typographic, authoritative
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:         #FFFFFF;
  --color-surface:    #F7F6F3;
  --color-border:     #E5E2DB;
  --color-border-dark:#C8C4BC;
  --color-text:       #1A1915;
  --color-text-muted: #6B675E;
  --color-accent:     #1A1915;
  --color-accent-red: #B22222;   /* Wiba red — category chips, links */
  --color-teal:       #1F7A6E;   /* Brand teal from logo */

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;

  --max-w:       1200px;
  --col-gap:     24px;
  --border-top:  3px solid var(--color-text);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent-red); }
img { display: block; max-width: 100%; }

/* ─── Layout Utilities ─────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Masthead ─────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--color-border-dark);
  padding: 0 24px;
}

.masthead__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  gap: 16px;
}

.masthead__meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.masthead__brand {
  text-align: center;
  flex: 1;
}

.masthead__wordmark {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-text);
  display: block;
}

.masthead__tagline {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.masthead__subscribe {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-teal);
  border: 1.5px solid var(--color-teal);
  padding: 6px 14px;
  border-radius: 2px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.masthead__subscribe:hover {
  background: var(--color-teal);
  color: #fff;
}

/* ─── Nav Bar ──────────────────────────────────────── */
.nav-bar {
  border-bottom: var(--border-top);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar__inner::-webkit-scrollbar { display: none; }

.nav-bar__item {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  white-space: nowrap;
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.nav-bar__item:hover,
.nav-bar__item.active {
  color: var(--color-accent-red);
  border-bottom-color: var(--color-accent-red);
}

/* ─── Breaking Banner ──────────────────────────────── */
.breaking-banner {
  background: var(--color-text);
  color: #fff;
  padding: 8px 24px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.breaking-banner__label {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-accent-red);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-banner__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Hero ─────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--color-border);
  padding: 32px 24px 40px;
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.hero__category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-red);
  margin-bottom: 12px;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  cursor: pointer;
}
.hero__headline:hover { color: var(--color-accent-red); }

.hero__deck {
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  font-weight: 300;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.hero__meta-sep { color: var(--color-border-dark); }
.hero__read-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-teal);
}
.hero__read-link:hover { text-decoration: underline; }

/* Hero sidebar */
.hero__sidebar {
  border-left: 1px solid var(--color-border);
  padding-left: 40px;
}

.hero__sidebar-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.hero__sidebar-list { list-style: none; }
.hero__sidebar-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}
.hero__sidebar-item:last-child { border-bottom: none; }

.hero__sidebar-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-red);
  margin-bottom: 6px;
}

.hero__sidebar-head {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
.hero__sidebar-head:hover { color: var(--color-accent-red); }

.hero__sidebar-date {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ─── Section Divider ──────────────────────────────── */
.section-divider {
  border-top: var(--border-top);
  margin: 0;
}

/* ─── Article Grid ─────────────────────────────────── */
.feed {
  padding: 40px 24px;
}

.feed__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.feed__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-text);
}

.feed__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feed__count {
  font-size: 11px;
  color: var(--color-text-muted);
}

.feed__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px var(--col-gap);
}

/* Article Card */
.card {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.card:hover { opacity: 0.8; }

.card__category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-red);
  margin-bottom: 8px;
}

.card__headline {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 10px;
}
.card:hover .card__headline { color: var(--color-accent-red); }

.card__summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
}

.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ─── Category Filter Chips ────────────────────────── */
.filter-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.filter-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 2px;
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  color: var(--color-text);
}
.chip:hover, .chip.active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* ─── Newsletter CTA ───────────────────────────────── */
.newsletter-cta {
  background: var(--color-surface);
  border-top: var(--border-top);
  border-bottom: var(--border-top);
  padding: 48px 24px;
  text-align: center;
  margin: 40px 0 0;
}
.newsletter-cta__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 12px;
}
.newsletter-cta__headline {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.newsletter-cta__sub {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.btn-primary {
  display: inline-block;
  background: var(--color-teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 2px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #165e54; color: #fff; }
.newsletter-cta__note {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* ─── Footer ───────────────────────────────────────── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer__brand .footer__wordmark {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer__brand p {
  font-size: 12px;
  line-height: 1.6;
}
.footer__col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 8px; }
.footer__links a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
}
.footer__links a:hover { color: #fff; }
.footer__bottom {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ─── Loading & Empty States ───────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-border) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 2px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}
.empty-state p { font-size: 15px; }

/* ─── Article Page ─────────────────────────────────── */
.article-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 32px;
}
.article__back:hover { color: var(--color-accent-red); }

.article__category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-red);
  margin-bottom: 16px;
}

.article__headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.article__deck {
  font-size: 20px;
  line-height: 1.5;
  color: var(--color-text-muted);
  font-weight: 300;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.article__source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

.article__body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--color-text);
}
.article__body p { margin-bottom: 24px; }
.article__body strong { font-weight: 600; }
.article__body em { font-style: italic; }
.article__body h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
}
.article__body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article__body blockquote {
  border-left: 3px solid var(--color-teal);
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 20px;
}
.article__body a {
  color: var(--color-teal);
  text-decoration: underline;
}
.article__body ul, .article__body ol {
  margin: 0 0 24px 24px;
}
.article__body li { margin-bottom: 8px; }

.article__tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article__source-row {
  margin-top: 32px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  font-size: 13px;
}
.article__source-row strong { font-weight: 600; }
.article__source-row a { color: var(--color-teal); text-decoration: underline; }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__sidebar {
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-left: 0;
    padding-top: 32px;
  }
  .feed__grid { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .masthead__meta { display: none; }
  .masthead__wordmark { font-size: 28px; }
  .feed__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}
