/* ============================================================
   COG — Component styles (header, hero, sections)
   ============================================================ */

/* ===== HEADER ===== */
.cog-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s, background 0.2s;
}
.cog-header.is-scrolled { box-shadow: var(--shadow-1); }
.cog-header__inner {
  display: flex; align-items: center; gap: 32px;
  height: 72px;
}
.cog-header__brand { display: flex; align-items: center; gap: 12px; }
.cog-header__name {
  font-family: var(--serif);
  font-size: 24px; font-weight: 700; line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cog-header__sub {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}
.cog-header__nav { display: flex; gap: 24px; flex: 1; }
.cog-header__nav a {
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s;
}
.cog-header__nav a:hover { color: var(--ink); }
.cog-header__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s;
}
.cog-header__nav a:hover::after { transform: scaleX(1); }
.cog-header__actions { display: flex; align-items: center; gap: 8px; }
.iconbtn {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.iconbtn:hover { background: var(--bg-tint); color: var(--ink); }

@media (max-width: 900px) {
  .cog-header__nav { display: none; }
  .cog-header__sub { display: none; }
}

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 25, 51, 0.55);
  backdrop-filter: blur(8px);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-overlay.is-open {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}
.search-overlay__panel {
  width: min(720px, 92vw);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.search-overlay__row {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rule);
}
.search-overlay__row input {
  flex: 1; border: none; background: transparent; outline: none;
  font: inherit; font-size: 18px; color: var(--ink);
}
.search-overlay__hints {
  padding: 14px 20px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.search-overlay__hint {
  padding: 6px 12px;
  background: var(--bg-tint); color: var(--ink-2);
  border-radius: 100px;
  font-size: 12px; font-weight: 500;
  transition: background 0.15s;
}
.search-overlay__hint:hover { background: var(--rule); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== TICKER ===== */
.ticker {
  background: var(--navy-900);
  color: white;
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--navy-700);
  overflow: hidden;
}
.ticker__label {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: var(--navy-800);
  border-right: 1px solid var(--navy-700);
  flex-shrink: 0;
}
.ticker__live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em;
  color: white;
}
.ticker__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--flag-red);
  box-shadow: 0 0 0 0 rgba(178, 34, 52, 0.6);
  animation: tickerPulse 2s ease-in-out infinite;
}
@keyframes tickerPulse {
  0% { box-shadow: 0 0 0 0 rgba(178, 34, 52, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(178, 34, 52, 0); }
  100% { box-shadow: 0 0 0 0 rgba(178, 34, 52, 0); }
}
.ticker__since {
  font-size: 11px; color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}
.ticker__track {
  flex: 1; overflow: hidden; padding: 12px 0;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}
.ticker__inner {
  display: inline-flex; gap: 0;
  white-space: nowrap;
  animation: tickerScroll 90s linear infinite;
}
.ticker:hover .ticker__inner { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker__item { display: inline-flex; align-items: center; gap: 12px; padding: 0 24px; font-size: 13px; }
.ticker__time { color: rgba(255,255,255,0.5); font-size: 11px; }
.ticker__tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.1);
  color: var(--blue-300);
  padding: 2px 8px; border-radius: 3px;
}
.ticker__text { color: rgba(255,255,255,0.92); }
.ticker__sep { color: var(--flag-red); margin-left: 12px; }

@media (max-width: 700px) {
  .ticker__label { padding: 12px 16px; }
  .ticker__since { display: none; }
}

/* ===== HERO — EDITORIAL ===== */
.hero { position: relative; }
.hero--editorial { padding: 48px 0 64px; border-bottom: 1px solid var(--rule); }
.hero__masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
.hero__masthead-left { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hero__date {
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.08em;
}
.hero__masthead-right {
  font-size: 12px; color: var(--ink-3);
  display: flex; gap: 12px; align-items: baseline;
}
.hero__masthead-right strong { color: var(--ink); font-weight: 700; }
.hero__sep { color: var(--rule-strong); }

.hero__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
}

.hero__feature-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hero__title {
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.hero__dek {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 60ch;
  text-wrap: pretty;
}
.hero__byline { display: flex; align-items: center; gap: 14px; }
.hero__byline-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.hero__byline-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Hero rail */
.hero__rail { display: flex; flex-direction: column; gap: 20px; }
.hero__search-card {
  background: var(--navy-800);
  color: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero__search-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.5;
}
.hero__search-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0;
  color: rgba(255,255,255,0.85);
}
.hero__search-row input {
  flex: 1; border: none; background: transparent; outline: none;
  color: white; font: inherit; font-size: 14px;
}
.hero__search-row input::placeholder { color: rgba(255,255,255,0.5); }
.hero__search-go {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--blue-500); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.hero__search-go:hover { background: var(--blue-400); }
.hero__search-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.hero__quickchip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 100px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.15s;
}
.hero__quickchip:hover { background: rgba(255,255,255,0.16); }

.hero__brief {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.hero__brief-head { display: flex; justify-content: space-between; align-items: center; }
.hero__brief-title { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 8px 0 14px; line-height: 1.3; }
.hero__brief-play {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-tint); color: var(--ink);
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; width: 100%;
  border: 1px solid var(--rule);
  transition: background 0.15s;
}
.hero__brief-play:hover { background: var(--rule); }
.hero__brief-play-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy-800); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 1px;
}
html.dark .hero__brief-play-icon { background: var(--blue-500); }

/* ===== HERO — DASHBOARD ===== */
.hero--dashboard { padding: 56px 0 72px; border-bottom: 1px solid var(--rule); position: relative; }
.hero--dashboard::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4; pointer-events: none;
  mask-image: radial-gradient(ellipse at top right, black 10%, transparent 70%);
}
.hero-dash { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero-dash { grid-template-columns: 1fr; gap: 32px; } }
.hero-dash__title {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 16px 0 20px;
  text-wrap: balance;
}
.hero-dash__title em { font-style: italic; color: var(--accent-ink); }
.hero-dash__sub { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0 0 28px; max-width: 56ch; text-wrap: pretty; }
.hero-dash__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-dash__stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.hero-dash__stat {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.hero-dash__stat-num {
  font-family: var(--serif);
  font-size: 44px; font-weight: 600; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-dash__stat-lbl { font-size: 12px; color: var(--ink-3); margin-top: 6px; letter-spacing: 0.02em; }
.hero-dash__spark { display: flex; align-items: end; gap: 2px; height: 36px; margin-top: 14px; }
.hero-dash__spark span { flex: 1; background: var(--navy-700); border-radius: 1px; min-height: 4px; }
.hero-dash__bar { height: 6px; background: var(--bg-tint); border-radius: 3px; margin-top: 18px; overflow: hidden; }
.hero-dash__bar span { display: block; height: 100%; background: var(--navy-700); border-radius: 3px; }

/* ===== HERO — MANIFESTO ===== */
.hero--manifesto {
  background: var(--navy-900);
  color: white;
  padding: 100px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero-manif__bg { position: absolute; inset: 0; pointer-events: none; }
.hero-manif__stars {
  position: absolute; top: 0; left: 0; width: 50%; height: 60%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.5) 1.2px, transparent 1.6px);
  background-size: 40px 40px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at top left, black 10%, transparent 70%);
}
.hero-manif__stripes {
  position: absolute; bottom: 0; right: -10%; width: 70%; height: 50%;
  background: repeating-linear-gradient(
    180deg,
    rgba(178, 34, 52, 0.18) 0 12px,
    transparent 12px 24px
  );
  transform: skewY(-6deg);
  mask-image: linear-gradient(90deg, transparent, black 40%, black 100%);
  opacity: 0.6;
}
.hero-manif { position: relative; max-width: 880px; }
.hero-manif__title {
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 16px 0 24px;
  color: white;
}
.hero-manif__cog {
  font-style: italic;
  background: linear-gradient(180deg, var(--blue-300), var(--blue-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-manif__lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  margin: 0 0 36px;
  max-width: 60ch;
}
.hero-manif__triple {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 32px;
}
.hero-manif__triple > div { display: flex; flex-direction: column; gap: 4px; }
.hero-manif__triple strong { font-family: var(--serif); font-size: 22px; font-weight: 600; color: white; }
.hero-manif__triple span { font-size: 13px; color: rgba(255,255,255,0.65); }
@media (max-width: 700px) { .hero-manif__triple { grid-template-columns: 1fr; gap: 12px; } }
.hero-manif__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-manif__cta .btn-primary { background: var(--blue-500); }
.hero-manif__cta .btn-primary:hover { background: var(--blue-400); }
.hero-manif__more {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
