/* ============================================================================
   5W AI VISIBILITY INDEX — DESIGN SYSTEM
   ============================================================================
   Scope:        ALL styles scoped under .research-article and .hub-page
                 to prevent collision with the rest of the 5W site.

   Page mounts:  /ai-visibility-index/                 (hub)
                 /ai-visibility-index/[slug]/          (Index pages)

   Markup contract: CFM templates emit semantic HTML with these hooks:
     .research-article     wrapper for Index pages
     .hub-page             wrapper for hub
     .hero                 hero section per Index
     .citation-chart       horizontal bar chart container
     .bar                  individual chart row
     .key-stats            STAT 1-8 list
     .leadership-quote     Ronn quote block
     .about-5w-expanded    footer About 5W block
     .download-cta         PDF download button
     .hub-grid             card grid on hub page
     .index-card           individual hub card
     .card-label           LIVE / INDEX / CRISIS badge

   Typography: Source Serif 4 (display) + Source Sans 3 (body) from Google Fonts
   Palette:    5W navy #0a4d8c — accent gold #c9a961 — neutrals #1a1a1a / #555 / #999

   Last updated: April 2026 — 5W Research / Editorial
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */
.research-article,
.hub-page {
  --color-navy:        #0a4d8c;
  --color-navy-deep:   #062f55;
  --color-navy-light:  #1a6bb5;
  --color-gold:        #c9a961;
  --color-gold-deep:   #a88a3f;
  --color-ink:         #1a1a1a;
  --color-ink-soft:    #2d2d2d;
  --color-gray-700:    #555555;
  --color-gray-500:    #888888;
  --color-gray-300:    #cccccc;
  --color-gray-100:    #f0f0f0;
  --color-gray-50:     #f8f8f6;
  --color-paper:       #fbfaf7;
  --color-white:       #ffffff;
  --color-crisis:      #b8281f;
  --color-live:        #1f7a3a;

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'SF Mono', Menlo, Monaco, Consolas, monospace;

  --container:     1180px;
  --container-narrow: 800px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(10,30,60,0.06);
  --shadow-md: 0 4px 16px rgba(10,30,60,0.08);
  --shadow-lg: 0 12px 40px rgba(10,30,60,0.10);
}

/* ============================================================================
   ARTICLE WRAPPER + RESETS
   ============================================================================ */
.research-article,
.hub-page {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.research-article *,
.hub-page * { box-sizing: border-box; }

.research-article > section,
.hub-page > section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px;
  border-bottom: 1px solid rgba(10,30,60,0.08);
}

.research-article > section:last-child,
.hub-page > section:last-child { border-bottom: none; }

/* ============================================================================
   TYPOGRAPHY — HEADINGS
   ============================================================================ */
.research-article h1,
.hub-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: 0 0 24px;
}

.research-article h2,
.hub-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-navy-deep);
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-navy);
  text-transform: none;
}

.research-article h3,
.hub-page h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--color-ink);
  margin: 32px 0 12px;
}

.research-article .hero h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--color-gray-700);
  line-height: 1.5;
  max-width: 820px;
  margin: 0 0 24px;
  border: none;
}

/* ============================================================================
   TYPOGRAPHY — BODY
   ============================================================================ */
.research-article p,
.hub-page p {
  margin: 0 0 18px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink-soft);
}

.research-article p:last-child,
.hub-page p:last-child { margin-bottom: 0; }

.research-article strong { font-weight: 600; color: var(--color-ink); }
.research-article em { font-style: italic; color: var(--color-ink-soft); }

.research-article a,
.hub-page a {
  color: var(--color-navy);
  text-decoration: underline;
  text-decoration-color: rgba(10,77,140,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.research-article a:hover,
.hub-page a:hover {
  color: var(--color-navy-deep);
  text-decoration-color: var(--color-navy);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.research-article .hero {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-paper) 100%);
  padding-top: 72px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(10,30,60,0.08);
}

.research-article .hero img {
  display: block;
  width: 100%;
  max-width: 1080px;
  height: auto;
  margin: 32px 0 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.research-article .hero p {
  margin: 0 0 0;
}

/* PDF download link in hero — make it a button */
.research-article .download-pdf,
.research-article .hero a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.01em;
}

.research-article .download-pdf:hover,
.research-article .hero a[href$=".pdf"]:hover {
  background: var(--color-navy-deep);
  transform: translateY(-1px);
  color: var(--color-white);
  text-decoration: none;
}

.research-article .download-pdf::before,
.research-article .hero a[href$=".pdf"]::before {
  content: "↓";
  font-size: 1.1em;
  font-weight: 700;
}

/* ============================================================================
   CITATION CHART — the centerpiece of every Index
   ============================================================================ */
.research-article .citation-chart {
  background: var(--color-white);
  border: 1px solid rgba(10,30,60,0.10);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin: 24px 0 28px;
  box-shadow: var(--shadow-sm);
}

.research-article .citation-chart .bar {
  display: grid;
  grid-template-columns: minmax(180px, 32%) 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.research-article .citation-chart .bar:last-child { border-bottom: none; }

.research-article .citation-chart .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-ink);
  line-height: 1.3;
  text-align: right;
  padding-right: 4px;
}

.research-article .citation-chart .value {
  display: block;
  position: relative;
  height: 32px;
  background: linear-gradient(90deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  border-radius: 2px;
  padding: 0 12px;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 32px;
  text-align: right;
  letter-spacing: 0.02em;
  min-width: 60px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
  transition: filter 0.2s ease;
}

.research-article .citation-chart .bar:hover .value { filter: brightness(1.1); }

/* Top-1 brand gets gold accent */
.research-article .citation-chart .bar:first-child .value {
  background: linear-gradient(90deg, var(--color-gold-deep) 0%, var(--color-gold) 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

/* ============================================================================
   KEY STATS LIST — the 8 STATs on every Index
   ============================================================================ */
.research-article .key-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.research-article .key-stats li {
  background: var(--color-white);
  border-left: 4px solid var(--color-navy);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  font-size: 1.0rem;
  line-height: 1.55;
  color: var(--color-ink-soft);
}

.research-article .key-stats li strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-gold-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ============================================================================
   LEADERSHIP QUOTE BLOCK — "From Ronn Torossian"
   ============================================================================ */
.research-article .leadership-quote {
  background: var(--color-navy-deep);
  color: var(--color-white);
  margin: 0 auto;
  padding: 56px 32px;
  position: relative;
  border-bottom: none;
}

.research-article .leadership-quote::before {
  content: "“";
  position: absolute;
  top: 16px;
  left: 32px;
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--color-gold);
  opacity: 0.4;
  font-weight: 700;
}

.research-article .leadership-quote h2 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 20px;
  position: relative;
  padding-left: 56px;
}

.research-article .leadership-quote blockquote {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--color-white);
  margin: 0 0 0 56px;
  padding: 0;
  border: none;
  max-width: 920px;
}

@media (max-width: 720px) {
  .research-article .leadership-quote::before { left: 20px; font-size: 4rem; }
  .research-article .leadership-quote h2 { padding-left: 0; }
  .research-article .leadership-quote blockquote { margin-left: 0; font-size: 1.2rem; }
}

/* ============================================================================
   PROSE LISTS (UL / OL outside .key-stats)
   ============================================================================ */
.research-article ul:not(.key-stats),
.research-article ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.research-article ul:not(.key-stats) li,
.research-article ol li {
  margin-bottom: 8px;
  line-height: 1.65;
}

/* ============================================================================
   ABOUT 5W EXPANDED — footer block on every Index
   ============================================================================ */
.research-article .about-5w-expanded {
  background: var(--color-gray-50);
}

.research-article .about-5w-expanded h2 {
  border-bottom: 2px solid var(--color-gold);
  color: var(--color-navy-deep);
}

/* ============================================================================
   DOWNLOAD CTA — final section
   ============================================================================ */
.research-article .download-cta {
  text-align: center;
  padding: 24px 0;
}

.research-article .download-cta a {
  display: inline-block;
  padding: 16px 36px;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-md);
}

.research-article .download-cta a:hover {
  background: var(--color-navy-deep);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-white);
}

/* ============================================================================
   HUB PAGE — index card grid + hero
   ============================================================================ */
.hub-page .hub-hero {
  background: linear-gradient(135deg, var(--color-navy-deep) 0%, var(--color-navy) 100%);
  color: var(--color-white);
  padding: 96px 32px 80px;
  border-bottom: none;
  max-width: none;
  margin: 0;
}

.hub-page .hub-hero > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.hub-page .hub-hero .eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.hub-page .hub-hero h1 {
  color: var(--color-white);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 28px;
}

.hub-page .hub-hero h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  max-width: 880px;
  margin: 0;
  border: none;
}

.hub-page .hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.hub-page .index-card {
  display: block;
  background: var(--color-white);
  border: 1px solid rgba(10,30,60,0.10);
  border-radius: var(--radius-md);
  padding: 28px;
  text-decoration: none;
  color: var(--color-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hub-page .index-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-navy);
}

.hub-page .index-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-navy);
  text-decoration: none;
  color: var(--color-ink);
}

.hub-page .index-card .card-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
  background: var(--color-gray-100);
  color: var(--color-navy-deep);
}

.hub-page .index-card .card-label.live {
  background: var(--color-live);
  color: var(--color-white);
}

.hub-page .index-card .card-label.crisis {
  background: var(--color-crisis);
  color: var(--color-white);
}

.hub-page .index-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--color-ink);
  line-height: 1.25;
}

.hub-page .index-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-gray-700);
  margin: 0 0 16px;
}

.hub-page .index-card .card-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-navy);
  letter-spacing: 0.01em;
}

.hub-page .index-card:hover .card-cta {
  color: var(--color-navy-deep);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 720px) {
  .research-article > section,
  .hub-page > section { padding: 40px 20px; }

  .research-article .citation-chart .bar {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }
  .research-article .citation-chart .brand { text-align: left; }

  .research-article .key-stats { grid-template-columns: 1fr; }

  .hub-page .hub-grid { grid-template-columns: 1fr; }

  .hub-page .hub-hero { padding: 56px 20px 48px; }
}

/* ============================================================================
   PRINT STYLES — for browser print preview, not for the PDF generator
   ============================================================================ */
@media print {
  .research-article .leadership-quote { background: white; color: black; border: 2px solid var(--color-navy); }
  .research-article .leadership-quote blockquote { color: black; }
  .research-article .leadership-quote h2 { color: var(--color-navy-deep); }
  .research-article .download-pdf,
  .research-article .download-cta { display: none; }
}
