/* =========================================================
   RESEARCH / ARTICLES — additional styles
   ========================================================= */

/* --- HERO --- */
.research-hero {
  position: relative;
  padding: 130px 0 72px;
  overflow: hidden;
  text-align: center;
}

.research-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
}

.research-hero h1 {
  margin: 18px auto 24px;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 820px;
}

.research-hero-lead {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  color: var(--ink-2);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- FEATURED CARD --- */
.research-featured {
  padding: 72px 0 56px;
}

.featured-card {
  display: block;
  padding: 56px;
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: saturate(170%) blur(12px);
  backdrop-filter: saturate(170%) blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: 0 36px 70px -28px rgba(28, 58, 46, 0.18);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(168,213,197,0.35), transparent 50%),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.65));
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 50px 90px -30px rgba(28, 58, 46, 0.22);
}

.featured-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(45, 143, 124, 0.10);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.featured-time {
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.featured-card h2 {
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 920px;
}

.featured-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 800px;
  margin-bottom: 32px;
}

.featured-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(28, 58, 46, 0.08);
}

.featured-author {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

@media (max-width: 720px) {
  .featured-card { padding: 36px 28px; }
}

/* --- GRID --- */
.research-grid-section {
  padding: 56px 0 clamp(72px, 9vw, 110px);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.research-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 32px 60px -24px rgba(28, 58, 46, 0.22);
}

.research-card-illus {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 30% 30%, rgba(168,213,197,0.4), transparent 60%),
    var(--mint-3);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.research-card-illus svg { max-width: 100%; max-height: 100%; }

.research-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.research-card-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.research-card h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.375rem;
  color: var(--forest);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.research-card p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}

.research-card-meta {
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-top: 12px;
  border-top: 1px solid rgba(28, 58, 46, 0.06);
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 980px) { .research-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .research-grid { grid-template-columns: 1fr; } }

/* --- CTA --- */
.research-cta {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 40px;
  background: rgba(255,255,255,0.65);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: 0 30px 60px -24px rgba(28, 58, 46, 0.15);
}

.research-cta .eyebrow { display: flex; justify-content: center; }
.research-cta h2 { margin-bottom: 18px; }
.research-cta .lead { margin: 0 auto 32px; max-width: 620px; }

/* =========================================================
   ARTICLE PAGE — individual essay layout
   ========================================================= */

.article-hero {
  position: relative;
  padding: 140px 0 64px;
  overflow: hidden;
  text-align: center;
}

.article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.article-meta-top {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  margin-bottom: 28px;
}

.article-meta-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.article-meta-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-4);
}

.article-meta-time {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.article-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 28px;
}

.article-hero-lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.article-byline {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

.article-body {
  padding: 32px 0 clamp(80px, 10vw, 130px);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 56px 0 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.article-content h3 {
  font-size: 1.375rem;
  margin: 40px 0 16px;
}

.article-content p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 22px;
  text-wrap: pretty;
}

.article-content p em { font-style: italic; color: var(--ink-2); }

.article-content ul,
.article-content ol {
  margin: 0 0 24px 24px;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
}

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

.article-content a {
  color: var(--teal);
  border-bottom: 1px solid var(--mint);
  transition: border-color 0.2s var(--ease);
}

.article-content a:hover { border-color: var(--forest); }

/* Article SVG diagram block */
.article-diagram {
  margin: 40px 0;
  padding: 32px;
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(168, 213, 197, 0.18), transparent 60%);
  pointer-events: none;
}

.article-diagram svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
}

.article-diagram .diagram-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin-top: 18px;
  letter-spacing: -0.005em;
  position: relative;
}

/* ============================================================
   ARTICLE DIAGRAM ANIMATIONS
   ============================================================ */

/* Bar growth — bars rise from baseline */
.anim-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: bar-grow 1.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.anim-bar.d-1 { animation-delay: 0.0s; }
.anim-bar.d-2 { animation-delay: 0.12s; }
.anim-bar.d-3 { animation-delay: 0.24s; }
.anim-bar.d-4 { animation-delay: 0.36s; }
.anim-bar.d-5 { animation-delay: 0.48s; }
.anim-bar.d-6 { animation-delay: 0.60s; }
.anim-bar.d-7 { animation-delay: 0.72s; }
@keyframes bar-grow {
  0%   { transform: scaleY(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Number / text fade-in */
.anim-fade {
  animation: anim-fade-in 1.2s ease-out both;
  animation-delay: 1s;
}
.anim-fade.d-1 { animation-delay: 0.4s; }
.anim-fade.d-2 { animation-delay: 0.55s; }
.anim-fade.d-3 { animation-delay: 0.70s; }
.anim-fade.d-4 { animation-delay: 0.85s; }
.anim-fade.d-5 { animation-delay: 1.00s; }
.anim-fade.d-6 { animation-delay: 1.15s; }
@keyframes anim-fade-in {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Path drawing — stroke draws itself in */
.anim-draw {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: anim-draw 2.2s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.3s;
}
.anim-draw-short {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: anim-draw-short 1.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.3s;
}
.anim-draw-slow {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: anim-draw 3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes anim-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes anim-draw-short {
  to { stroke-dashoffset: 0; }
}

/* Pulsing dot — for endpoints, markers */
.anim-pulse-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: anim-pulse-dot 2.4s ease-in-out infinite;
}
@keyframes anim-pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.7; }
}

/* Glowing ring expand — for hub markers */
.anim-pulse-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: anim-pulse-ring 2.2s ease-out infinite;
}
@keyframes anim-pulse-ring {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Candle rising — for chart candles */
.anim-candle {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: anim-candle-rise 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.anim-candle.c-1  { animation-delay: 0.0s; }
.anim-candle.c-2  { animation-delay: 0.10s; }
.anim-candle.c-3  { animation-delay: 0.20s; }
.anim-candle.c-4  { animation-delay: 0.30s; }
.anim-candle.c-5  { animation-delay: 0.40s; }
.anim-candle.c-6  { animation-delay: 0.50s; }
.anim-candle.c-7  { animation-delay: 0.60s; }
.anim-candle.c-8  { animation-delay: 0.70s; }
.anim-candle.c-9  { animation-delay: 0.80s; }
.anim-candle.c-10 { animation-delay: 0.90s; }
.anim-candle.c-11 { animation-delay: 1.00s; }
.anim-candle.c-12 { animation-delay: 1.10s; }
.anim-candle.c-13 { animation-delay: 1.20s; }
.anim-candle.c-14 { animation-delay: 1.30s; }
.anim-candle.c-15 { animation-delay: 1.40s; }
.anim-candle.c-16 { animation-delay: 1.50s; }
.anim-candle.c-17 { animation-delay: 1.60s; }
.anim-candle.c-18 { animation-delay: 1.70s; }
.anim-candle.c-19 { animation-delay: 1.80s; }
.anim-candle.c-20 { animation-delay: 1.90s; }
.anim-candle.c-21 { animation-delay: 2.00s; }
@keyframes anim-candle-rise {
  0%   { transform: scaleY(0) translateY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Travelling dot along a path — visual "scan" indicator */
.anim-travel {
  animation: anim-travel 3.5s ease-in-out infinite;
}
@keyframes anim-travel {
  0%   { offset-distance: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* Slow glow / scale — for shield, big hubs */
.anim-breathe {
  transform-box: fill-box;
  transform-origin: center;
  animation: anim-breathe 4s ease-in-out infinite;
}
@keyframes anim-breathe {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50%      { transform: scale(1.04); opacity: 1; }
}

/* Card lift in — for two-up comparison cards */
.anim-lift {
  animation: anim-lift-in 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.anim-lift.d-1 { animation-delay: 0.1s; }
.anim-lift.d-2 { animation-delay: 0.35s; }
.anim-lift.d-3 { animation-delay: 0.55s; }
@keyframes anim-lift-in {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Subtle horizontal sweep — flowing motion through a diagram */
.anim-sweep {
  animation: anim-sweep 2.4s ease-in-out infinite;
  transform-origin: left;
}
@keyframes anim-sweep {
  0%   { transform: scaleX(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; transform: scaleX(1); }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Reduced-motion safety */
@media (prefers-reduced-motion: reduce) {
  .anim-bar, .anim-fade, .anim-draw, .anim-draw-short, .anim-draw-slow,
  .anim-pulse-dot, .anim-pulse-ring, .anim-candle, .anim-travel,
  .anim-breathe, .anim-lift, .anim-sweep {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Article pull-quote */
.article-pullquote {
  margin: 48px 0;
  padding: 8px 0 8px 32px;
  border-left: 3px solid var(--teal);
}

.article-pullquote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.35;
  color: var(--forest);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Article callout */
.article-callout {
  margin: 40px 0;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(168, 213, 197, 0.25), rgba(255, 255, 255, 0.55));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.article-callout-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 10px;
}

.article-callout p {
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  color: var(--ink);
}

/* Bottom of article — author + share + next */
.article-footer {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--paper-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.article-footer-byline {
  font-size: 0.875rem;
  color: var(--ink-2);
}

.article-footer-byline strong { color: var(--forest); font-weight: 700; }

/* Article disclaimer */
.article-disclaimer {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--paper-2);
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--ink-3);
  font-style: italic;
}

/* Related articles at bottom of essay */
.article-related {
  padding: clamp(64px, 8vw, 110px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
}

.article-related .section-heading { text-align: center; margin-bottom: 48px; }
.article-related .section-heading .eyebrow { display: flex; justify-content: center; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

@media (max-width: 980px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }
