/* ===========================
   CONSEQUENCE CONSULTING
   Shared article stylesheet
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #07090e;
  --bg-card:       #0c0f18;
  --bg-elevated:   #10141f;
  --border:        rgba(255,255,255,0.06);
  --border-light:  rgba(255,255,255,0.10);
  --border-accent: rgba(0,200,170,0.28);
  --text-primary:  #e4eaf6;
  /* was #7a8699 (5.0:1) — lifted for long-form body copy */
  --text-secondary:#b9c3d6;
  /* was #404a62 — 2.1:1 against the card background, far below the 4.5:1 minimum */
  --text-muted:    #9aa4b8;
  --accent:        #00c8aa;
  --accent-dim:    rgba(0,200,170,0.10);
  --accent2:       #4f7fff;
  --accent2-dim:   rgba(79,127,255,0.10);
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --radius:        16px;
  --max-w:         1140px;
  --nav-h:         72px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 72px 72px;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::selection { background: var(--accent-dim); color: var(--accent); }

/* ---- ACCESSIBILITY BASELINE ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--accent);
  color: #07090e;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- NAV ---- */
body > nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7,9,14,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logomark {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logomark svg { width: 14px; height: 14px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-cta {
  font-size: 13px !important;
  font-weight: 500;
  color: var(--bg) !important;
  background: var(--accent);
  padding: 7px 18px;
  border-radius: 100px;
  transition: opacity 0.2s !important;
}

.nav-cta:hover { opacity: 0.85 !important; }

/* Reading progress bar in nav */
.nav-progress {
  position: absolute;
  bottom: -1px; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(7,9,14,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 199;
  padding: 28px;
  flex-direction: column;
  gap: 22px;
}

.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text-secondary); text-decoration: none; font-size: 16px; }

/* ---- ARTICLE LAYOUT ---- */
.article-page {
  padding-top: var(--nav-h);
}

/* Hero band */
.article-hero-band {
  position: relative;
  overflow: hidden;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.article-hero-band::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.article-hero-band .container {
  max-width: 860px;
  position: relative;
  z-index: 2;
  margin: 0 auto;
  padding: 0 28px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover { color: var(--text-primary); }

.article-breadcrumb-sep { color: var(--text-muted); opacity: 0.5; }

.article-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  background: var(--accent-dim);
  padding: 5px 13px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.article-cat-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.article-main-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.04;
  margin-bottom: 28px;
  color: var(--text-primary);
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* Decorative glow behind hero */
.article-hero-glow {
  position: absolute;
  width: 600px; height: 300px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  top: 0; right: -100px;
  opacity: 0.5;
}

/* Content column */
.article-content-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 64px 28px 100px;
  position: relative;
  z-index: 2;
}

.article-lede {
  font-size: 19px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 18px;
  color: var(--text-primary);
  line-height: 1.15;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  color: var(--text-primary);
}

.article-body p {
  font-size: 16.5px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
  margin: 8px 0 24px 24px;
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
}

.article-body li { margin-bottom: 10px; }

.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border-accent);
  transition: border-color 0.2s;
}

.article-body a:hover { border-bottom-color: var(--accent); }

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 22px 32px;
  margin: 40px 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body blockquote p {
  font-size: 18px;
  font-style: italic;
  color: var(--text-primary);
  margin: 0;
  font-weight: 400;
}

.article-body strong { color: var(--text-primary); font-weight: 500; }

/* Article footer */
.article-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.a-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  background: var(--accent-dim);
  padding: 5px 12px;
  border-radius: 100px;
}

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.share-row-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.share-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 15px;
  transition: border-color 0.25s, color 0.25s;
}

.share-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-link svg { width: 13px; height: 13px; fill: currentColor; }

/* Related articles */
.related-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 72px 0;
}

.related-section .container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

.related-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
}

.related-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
  display: block;
  height: 100%;
}

.related-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.related-thumb {
  width: 100%;
  aspect-ratio: 16/7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.related-body { padding: 22px; }

.related-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.related-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

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

/* CTA band */
.article-cta-band {
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta-band::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 700px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,200,170,0.055), transparent 65%);
  pointer-events: none;
}

.article-cta-band .container { position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

.cta-band-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.cta-band-sub {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* Motion button (reused from main) */
.motion-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 5px;
  padding-right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.35s;
}

.motion-btn:hover { border-color: var(--accent); }

.motion-btn-circle {
  position: relative;
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 100px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1), min-width 0.5s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  z-index: 1;
}

.motion-btn:hover .motion-btn-circle {
  width: calc(100% + 28px);
  min-width: calc(100% + 28px);
}

.motion-btn-arrow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  z-index: 2;
  pointer-events: none;
}

.motion-btn:hover .motion-btn-arrow { transform: translate(calc(-50% + 4px), -50%); }

.motion-btn-label {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 14px;
  white-space: nowrap;
  transition: color 0.35s;
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.motion-btn:hover .motion-btn-label { color: var(--bg); }

/* Footer */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

footer .container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 52px;
  margin-bottom: 56px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.8;
  max-width: 270px;
  margin-bottom: 20px;
}

.footer-legal {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.footer-col h2,
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 13px; }

.footer-links a,
.footer-links button {
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-copy { font-size: 12px; color: var(--text-muted); }

.footer-offices { display: flex; gap: 24px; }

.footer-office {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-office svg { width: 10px; height: 10px; stroke: var(--text-muted); }

/* Fade-up
   IMPORTANT: content must be VISIBLE by default. The fade-in is only armed
   once the tiny inline script in <head> has added .js to <html>, which proves
   JavaScript is running. Previously .fu was opacity:0 unconditionally, so if
   the script failed to load — a 404, a blocked file, a syntax error — the
   headline, lede and entire article body stayed invisible and the page
   rendered blank apart from the nav and footer. Never hide content behind
   JavaScript that has no non-JS fallback. */
.fu { opacity: 1; transform: none; }

.js .fu {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .fu.vis { opacity: 1; transform: translateY(0); }
.js .fu.d1 { transition-delay: 0.12s; }
.js .fu.d2 { transition-delay: 0.24s; }

/* Responsive */
@media (max-width: 1024px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-offices { flex-direction: column; gap: 8px; }
  .article-footer-strip { flex-direction: column; align-items: flex-start; }
}

/* ---- REDUCED MOTION (WCAG 2.3.3) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Content revealed by scroll animation must stay visible */
  .fu, .js .fu { opacity: 1 !important; transform: none !important; }
}


/* ===========================
   EDITORIAL COMPONENTS
=========================== */

/* Key takeaways — a scannable summary near the top of long articles.
   Also gives search engines and AI assistants a clean, extractable
   précis of the argument. */
.key-points {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 32px;
  margin: 0 0 48px;
}

.key-points h2 {
  font-family: var(--font-display);
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px !important;
}

.key-points ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-points li {
  font-size: 14.5px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin: 0;
}

.key-points li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Statistic grid — for data-heavy passages */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.stat-figure {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  display: block;
}

.stat-source {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 12px;
}

/* Pull quote — a line lifted from the body for emphasis.
   Visually distinct from blockquote, which is for quoted material. */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 27px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 48px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--accent);
}

/* The article body sets a generic p style; these need to win */
.article-body .key-points li,
.article-body .stat-label { margin-bottom: 0; }

@media (max-width: 560px) {
  .key-points { padding: 24px 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}


/* Footnote markers and the sources list at the foot of an article.
   Numbered citations let a reader — or an AI assistant — trace every
   claim back to primary research. */
.article-body sup a {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: none;
  padding: 0 1px;
}

.article-body sup a:hover { text-decoration: underline; }

.article-body .source-list {
  list-style: decimal;
  margin: 24px 0 0 22px;
  display: block;
}

.article-body .source-list li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
  padding-left: 4px;
}

.article-body .source-list li:target {
  color: var(--text-secondary);
}

.article-body .source-list a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.article-body .source-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* ===========================
   CARD THUMBNAIL IMAGES
   The emoji sits underneath as a fallback: if the image is missing or
   fails to load, site.js hides the <img> and the emoji shows through,
   so a card is never an empty box or a broken-image icon.
=========================== */
.related-thumb { position: relative; overflow: hidden; }

.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.thumb-img[hidden] { display: none; }
