/* ============================================================
   GRID THEME — Main Stylesheet
   Finance & AI Editorial Magazine Theme
   ============================================================ */

/* ── 1. CSS CUSTOM PROPERTIES ─────────────────────────────── */

:root {
  /* Color palette — clean white editorial */
  --color-bg: #ffffff;
  --color-surface: #f5f5f5;
  --color-ink: #1a1a1a;
  --color-charcoal: #444444;
  --color-muted: #767676;
  --color-border: #e0e0e0;
  --color-border-light: #eeeeee;
  --color-surface-alt: #f0f0f0;

  /* Legacy aliases for compatibility */
  --color-paper: var(--color-bg);
  --color-off-white: var(--color-surface);
  --color-border-muted: var(--color-border);
  --color-on-surface: var(--color-ink);
  --color-on-surface-variant: var(--color-charcoal);

  /* Accent palette */
  --color-red: #c7232b;
  --color-green: #1a6b5c;
  --color-blue: #1a5fa8;
  --color-gold: #b8860b;

  /* Typography */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Spacing */
  --spacing-gutter: 24px;
  --spacing-section: 64px;
  --container-max: 1240px;
  --container-px: 16px;

  /* Easing */
  --ease-hover: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-luxe: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ── 3. LAYOUT ────────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

@media (min-width: 640px) {
  .container {
    padding-inline: 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 40px;
  }
}

/* ── 4. TYPOGRAPHY UTILITIES ──────────────────────────────── */

.label-caps {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-red);
  display: inline-block;
}

.body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

.body-sm {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

/* ── 5. BUTTONS ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition:
    background 0.2s var(--ease-hover),
    color 0.2s var(--ease-hover),
    border-color 0.2s var(--ease-hover);
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 0;
}

.btn-primary {
  background-color: var(--color-ink);
  color: white;
  border-color: var(--color-ink);
}

.btn-primary:hover {
  background-color: var(--color-red);
  border-color: var(--color-red);
}

.btn-red {
  background-color: var(--color-red);
  color: white;
  border-color: var(--color-red);
}

.btn-red:hover {
  background-color: #a81c23;
  border-color: #a81c23;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

/* ── 6. SITE HEADER — SIMPLE SINGLE ROW ──────────────────── */

.grid-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #111111;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.2s ease;
}

.grid-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.grid-header-inner {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0;
}

/* Logo area */
.grid-logo-area {
  flex-shrink: 0;
  margin-right: 28px;
  display: flex;
  align-items: center;
}

.grid-logo-link {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}

.grid-logo-area .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.grid-logo-area .custom-logo,
.grid-logo-img {
  max-height: 36px;
  width: auto;
  display: block;
}

/* Primary nav */
.grid-nav {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.grid-nav-list,
.grid-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.grid-nav-list > li > a,
.grid-nav a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0 12px;
  display: block;
  height: 56px;
  line-height: 56px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.grid-nav-list > li > a:hover,
.grid-nav a:hover,
.grid-nav .current-menu-item > a {
  color: #ffffff;
  border-bottom-color: var(--color-red);
}

.grid-nav-list .sub-menu,
.grid-nav .sub-menu {
  display: none;
}

/* Header actions */
.grid-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.grid-subscribe-btn {
  font-size: 11px;
  padding: 8px 16px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: all 0.3s ease;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .grid-nav {
    display: none;
  }

  .grid-subscribe-btn {
    display: none;
  }

  .grid-logo-area {
    flex: 1;
    margin-right: 0;
  }
}

/* ── 7. MOBILE MENU OVERLAY ───────────────────────────────── */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-ink);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-nav-list,
.mobile-menu ul {
  text-align: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list li,
.mobile-menu ul li {
  margin-bottom: 20px;
}

.mobile-nav-list a,
.mobile-menu ul a {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav-list a:hover,
.mobile-menu ul a:hover {
  color: var(--color-red);
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: white;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: color 0.2s ease;
}

.mobile-menu-close:hover {
  color: var(--color-red);
}

.mobile-menu-cta {
  margin-top: 16px;
}

/* ── 8. REVEAL ANIMATION ──────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s var(--ease-luxe),
    transform 0.7s var(--ease-luxe);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── 9. CATEGORY BADGE PILLS ──────────────────────────────── */

.cat-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.cat-badge:hover {
  opacity: 0.85;
}

.cat-ai {
  background: #1a5fa8;
  color: #fff;
}
.cat-markets {
  background: #1a1a1a;
  color: #fff;
}
.cat-opinion {
  background: #c7232b;
  color: #fff;
}
.cat-macro {
  background: #4b3f8a;
  color: #fff;
}
.cat-interview {
  background: #1a6b5c;
  color: #fff;
}
.cat-data {
  background: #555551;
  color: #fff;
}
.cat-investing {
  background: #1a5fa8;
  color: #fff;
}
.cat-analysis {
  background: #1a5fa8;
  color: #fff;
}
.cat-default {
  background: #1a1a1a;
  color: #fff;
}

/* ── 10. HOMEPAGE CATEGORY SECTIONS ──────────────────────── */

.cat-section {
  padding: 36px 0;
  border-top: 1px solid var(--color-border);
}

.cat-section--first {
  border-top: none;
  padding-top: 28px;
}

/* Section header row */
.cat-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.cat-section-title {
  font-family: var(--font-body);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink);
  position: relative;
  padding-top: 10px;
  line-height: 1;
}

/* Short red bar above the title text */
.cat-section-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--color-red);
}

.cat-section-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cat-section-title a:hover {
  color: var(--color-red);
}

.cat-view-all {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-red);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.cat-view-all:hover {
  opacity: 0.7;
}

/* 3-column grid: list | featured | optin */
.cat-section-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1023px) {
  .cat-section-grid {
    grid-template-columns: 200px 1fr;
  }

  .cat-optin {
    display: none;
  }
}

@media (max-width: 767px) {
  .cat-section-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cat-article-list {
    order: 2;
  }

  .cat-featured {
    order: 1;
  }
}

/* ── Left: small article list ─────────────────────────────── */

.cat-article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--color-border);
  padding-right: 24px;
}

@media (max-width: 767px) {
  .cat-article-list {
    border-right: none;
    padding-right: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
  }
}

.cat-list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.cat-list-item:first-child {
  padding-top: 0;
}

.cat-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ── Text-only item (no thumbnail) ── */

.cat-list-item--text {
  display: block;
}

.cat-list-item--text .cat-list-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
  margin-bottom: 7px;
}

.cat-list-excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-charcoal);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-muted);
  font-family: var(--font-body);
}

.cat-list-source {
  font-weight: 600;
  color: var(--color-ink);
}

.cat-list-date {
  font-size: 12px;
  color: var(--color-muted);
  font-family: var(--font-body);
}

/* ── Thumbnail item ── */

.cat-list-item--thumb {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cat-list-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  overflow: hidden;
  display: block;
}

.cat-list-thumb img,
.cat-list-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cat-list-thumb:hover img,
.cat-list-thumb:hover .cat-list-thumb-img {
  transform: scale(1.05);
}

.cat-list-item--thumb .cat-list-body {
  flex: 1;
  min-width: 0;
}

.cat-list-item--thumb .cat-list-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-ink);
}

/* shared title link styles */
.cat-list-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cat-list-title a:hover {
  color: var(--color-red);
}

/* ── Center: featured article ─────────────────────────────── */

.cat-featured {
  min-width: 0;
}

.cat-featured-img-link {
  display: block;
  overflow: hidden;
  margin-bottom: 14px;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-alt);
}

.cat-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cat-featured-img-link:hover .cat-featured-img {
  transform: scale(1.03);
}

.cat-featured-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cat-featured-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-red);
  margin-bottom: 8px;
}

.cat-featured-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.cat-featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cat-featured-title a:hover {
  color: var(--color-red);
}

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

.cat-featured-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-muted);
  font-family: var(--font-body);
}

.cat-featured-meta span + time::before,
.cat-featured-meta time + span::before {
  content: "·";
  margin-right: 6px;
}

/* ── Right: newsletter opt-in widget ─────────────────────── */

.cat-optin {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 24px 20px;
}

.cat-optin-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.cat-optin-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.2;
  margin-bottom: 8px;
}

.cat-optin-desc {
  font-size: 13px;
  color: var(--color-charcoal);
  line-height: 1.55;
  margin-bottom: 18px;
}

.cat-nl-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-nl-input,
.newsletter-email-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  outline: none;
  color: var(--color-ink);
  background: white;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}

.cat-nl-input:focus,
.newsletter-email-input:focus {
  border-color: var(--color-red);
}

.cat-nl-input::placeholder,
.newsletter-email-input::placeholder {
  color: var(--color-muted);
}

.cat-nl-btn,
.newsletter-submit-btn {
  width: 100%;
  background: var(--color-red);
  color: white;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cat-nl-btn:hover,
.newsletter-submit-btn:hover {
  background: #a81c23;
}

.cat-nl-btn:disabled,
.newsletter-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── 11. NEWSLETTER FORM (shared) ─────────────────────────── */

.newsletter-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.newsletter-field-error {
  font-size: 12px;
  color: #c7232b;
  display: block;
  min-height: 16px;
}

.newsletter-status {
  display: none;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.newsletter-status.is-success {
  background: rgba(26, 107, 92, 0.1);
  color: #1a6b5c;
  border: 1px solid rgba(26, 107, 92, 0.2);
  display: block;
}

.newsletter-status.is-error {
  background: rgba(199, 35, 43, 0.08);
  color: #c7232b;
  border: 1px solid rgba(199, 35, 43, 0.15);
  display: block;
}

/* Sidebar newsletter widget (single post) */
.newsletter-widget {
  background: var(--color-ink);
  padding: 32px 28px;
  color: white;
}

.newsletter-widget-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  line-height: 1.2;
}

.newsletter-widget-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
  line-height: 1.5;
}

.newsletter-widget .newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: white;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.newsletter-input:focus {
  border-color: var(--color-red);
}

.newsletter-btn {
  width: 100%;
  background: var(--color-red);
  color: white;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.newsletter-btn:hover {
  background: #a81c23;
}

.newsletter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── 12. GRID FOOTER ──────────────────────────────────────── */

.grid-footer {
  background: #111111;
  color: rgba(255, 255, 255, 0.75);
  padding-top: 36px;
  padding-bottom: 0;
}

.grid-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 28px;
}

@media (min-width: 768px) {
  .grid-footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }
}

/* Brand column */
.grid-footer-brand {
  flex-shrink: 0;
}

.grid-footer-logo-link {
  display: inline-block;
  margin-bottom: 0;
}

.grid-footer-logo-img,
.grid-footer-brand .custom-logo,
.grid-footer-brand .footer-logo-img {
  display: block;
  max-width: 260px;
  width: auto;
  max-height: 80px;
}

.grid-footer-site-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
  text-decoration: none;
  display: block;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.grid-footer-site-name:hover {
  opacity: 0.8;
}

/* Two-menu wrapper — stacks both nav rows vertically */
.grid-footer-menus {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

/* Each nav row */
.grid-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

/* Both nav lists sit side-by-side as one continuous inline row */
.grid-footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.grid-footer-nav-list > li {
  display: flex;
  align-items: center;
}

/* Pipe separator after every item except the very last in the last list */
.grid-footer-nav-list > li::after {
  content: "|";
  color: rgba(255, 255, 255, 0.2);
  padding: 0 10px;
  font-size: 11px;
}

.grid-footer-nav-list:last-child > li:last-child::after {
  display: none;
}

.grid-footer-nav-list a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.grid-footer-nav-list a:hover {
  color: white;
}

.grid-footer-nav-list .sub-menu {
  display: none;
}

/* Footer bottom bar */
.grid-footer-bottom {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 640px) {
  .grid-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.grid-footer-legal-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.grid-footer-legal-link {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 11px;
}

.grid-footer-legal-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── 13. PAGE HERO BAND ───────────────────────────────────── */

.page-hero-band {
  background: var(--color-ink);
}

.page-hero-inner {
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-hero-label {
  color: var(--color-red);
  margin-bottom: 12px;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  color: white;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* ── 14. BLOG INDEX ───────────────────────────────────────── */

.grid-blog-index {
  padding-block: var(--spacing-section);
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 640px) {
  .blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (min-width: 1024px) {
  .blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-post-card .post-thumbnail {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.blog-post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.blog-post-card:hover .post-thumbnail img {
  transform: scale(1.03);
}

.blog-post-card .post-category {
  font-size: 10px;
  color: var(--color-red);
}

.blog-post-card .post-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-card .post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-post-card:hover .post-title a {
  color: var(--color-red);
}

.blog-post-card .post-excerpt {
  font-size: 14px;
  color: var(--color-charcoal);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-card .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-weight: 500;
}

.blog-empty {
  padding-block: 80px;
  color: var(--color-charcoal);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--color-ink);
  color: white;
  border-color: var(--color-ink);
}

/* ── 15. SINGLE POST ──────────────────────────────────────── */

.grid-single {
  padding-bottom: var(--spacing-section);
}

@media (max-width: 767px) {
  .grid-single {
    padding-bottom: 48px;
  }
}

.single-post-hero-image-wrap {
  width: 100%;
  max-height: 60vh;
  overflow: hidden;
}

@media (max-width: 767px) {
  .single-post-hero-image-wrap {
    max-height: none;
    aspect-ratio: 16 / 9;
  }
}

.single-post-hero-image {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .single-post-hero-image {
    height: 100%;
  }
}

.single-post-header {
  padding-top: 48px;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .single-post-header {
    padding-top: 28px;
  }
}

.single-post-category {
  color: var(--color-red);
  margin-bottom: 12px;
  display: block;
}

.single-post-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 56px);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  margin-top: 12px;
}

@media (max-width: 767px) {
  .single-post-title {
    font-size: clamp(22px, 6.5vw, 34px);
    margin-bottom: 14px;
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-charcoal);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-body);
}

@media (max-width: 767px) {
  .single-post-meta {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }
}

.single-post-reading-time {
  font-size: 10px;
}

.single-post-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}

@media (max-width: 767px) {
  .single-post-content {
    gap: 36px;
  }
}

@media (min-width: 1024px) {
  .single-post-content {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.single-post-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .single-post-nav {
    flex-direction: row;
    justify-content: space-between;
  }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  max-width: 280px;
  transition: color 0.2s ease;
}

.post-nav-link:hover {
  color: var(--color-red);
}

.post-nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.post-nav-next {
  text-align: right;
  margin-left: auto;
}

.single-post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (max-width: 767px) {
  .single-post-sidebar {
    gap: 28px;
  }
}

@media (min-width: 1024px) {
  .single-post-sidebar {
    position: sticky;
    top: 80px;
  }
}

.sidebar-dispatch {
  /* related articles wrapper */
}

.sidebar-section-title {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.dispatch-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dispatch-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.dispatch-item-link:hover .dispatch-headline {
  color: var(--color-red);
}

.dispatch-time {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-red);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dispatch-headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
  transition: color 0.2s ease;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink);
  text-decoration: none;
  transition:
    gap 0.2s ease,
    color 0.2s ease;
}

.back-link:hover {
  gap: 12px;
  color: var(--color-red);
}

/* ── 16. ARTICLE PROSE ────────────────────────────────────── */

.grid-prose {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-ink);
  max-width: 68ch;
}

@media (max-width: 767px) {
  .grid-prose {
    font-size: 16px;
    line-height: 1.7;
  }
}

.grid-prose h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-ink);
  margin-top: 44px;
  margin-bottom: 14px;
  line-height: 1.2;
}

.grid-prose h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-ink);
  margin-top: 28px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.grid-prose h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink);
  margin-top: 24px;
  margin-bottom: 8px;
}

.grid-prose p {
  margin-bottom: 22px;
}

.grid-prose blockquote {
  border-left: 4px solid var(--color-red);
  padding: 18px 24px;
  margin: 28px 0;
  background: var(--color-surface-alt);
  font-style: italic;
  font-size: 19px;
  color: var(--color-ink);
  line-height: 1.5;
}

.grid-prose a {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-color: var(--color-red);
  text-underline-offset: 3px;
}

.grid-prose a:hover {
  color: var(--color-red);
}

.grid-prose ul,
.grid-prose ol {
  margin-bottom: 22px;
  padding-left: 24px;
}

.grid-prose ul {
  list-style: disc;
}

.grid-prose ol {
  list-style: decimal;
}

.grid-prose li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.grid-prose img {
  width: 100%;
  margin-block: 28px;
  display: block;
}

.grid-prose strong {
  font-weight: 700;
  color: var(--color-ink);
}

.grid-prose code {
  font-family: monospace;
  font-size: 14px;
  background: var(--color-surface-alt);
  padding: 2px 6px;
  border-radius: 2px;
}

.grid-prose pre {
  font-family: monospace;
  font-size: 14px;
  background: var(--color-ink);
  color: white;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 22px;
}

.grid-prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: 44px;
}

/* ── 17. GENERIC PAGE ─────────────────────────────────────── */

.grid-page-content {
  padding-block: var(--spacing-section);
}

/* ── 18. 404 ──────────────────────────────────────────────── */

.grid-404 {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--spacing-section);
}

.grid-404-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.error-code {
  color: var(--color-red);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}

.error-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 11vw, 128px);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
}

.error-message {
  font-size: 18px;
  color: var(--color-charcoal);
  margin-bottom: 40px;
  max-width: 40ch;
}

/* ── 19. WORDPRESS ALIGNMENT UTILITIES ───────────────────── */

.alignleft {
  float: left;
  margin-right: 24px;
  margin-bottom: 16px;
}

.alignright {
  float: right;
  margin-left: 24px;
  margin-bottom: 16px;
}

.aligncenter {
  display: block;
  margin-inline: auto;
  margin-bottom: 16px;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 13px;
  color: var(--color-charcoal);
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ── 20. HERO SECTION (legacy, kept for compatibility) ────── */

.hero-badge {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
