/* ═══════════════════════════════════════════════════════════════
   The Volume Problem - Blog Post Styles

   Built on Zivvy Design System v2.6.0
   Foundation: GRID4_RHYTHM24_TOUCH44_TIMING300
   ═══════════════════════════════════════════════════════════════ */

@import url('../../css/zivvy-design-system.css');

/* ── Design System Variable Mapping ── */
:root {
  /* GRID4 Spacing System - Using only design system values */
  /* Design system provides: xxs(4), xs(8), s(12), m(16), l(24), xl(32), xxl(48), section(64) */

  /* Color System - Mapping to Design System */
  --ink: var(--neutral-950);
  --ink-light: var(--neutral-800);
  --ink-muted: var(--neutral-600);
  --surface: var(--neutral-50);
  --surface-warm: var(--neutral-100);
  --surface-card: hsl(0, 0%, 100%);
  --accent: var(--danger-500);
  --accent-dark: var(--danger-600);
  --accent-glow: hsl(0, 84%, 60%, 0.08);
  --gold: var(--tertiary-500);
  --gold-light: var(--tertiary-200);
  --teal: var(--success-500);
  --border: var(--neutral-200);
  --border-light: var(--neutral-100);

  /* Shadow System - Using Design System */
  --shadow-sm: var(--shadow-1);
  --shadow-md: var(--shadow-2);
  --shadow-lg: var(--shadow-3);

  /* Border Radius - FIXED: Now using correct design system values */
  /* Design System provides: --radius-sm (4px), --radius-md (8px), --radius-lg (16px), --radius-xl (24px) */
  /* No custom mappings needed - use design system values directly */

  /* Typography - Mapping to Design System */
  --type-display-sm: var(--type-display-sm);  /* 24-32px */
  --type-h1: var(--type-display-sm);          /* 24-32px */
  --type-h2: var(--type-heading-1);           /* 22-28px */
  --type-h3: var(--type-heading-2);           /* 20-24px */
  --type-h4: var(--type-heading-3);           /* 18-20px */
  --type-body: var(--type-body-md);           /* 16px */
  --type-body-lg: var(--type-body-lg);        /* 18px */
  --type-small: var(--type-body-sm);          /* 14px */
  --type-caption: var(--type-body-xs);        /* 12px */
  --type-overline: 10.5px;                    /* Small caps text */

  /* Layout Constraints */
  --max-w: 780px;
  --max-w-wide: 960px;
}

/* ── Base Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 18px;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  padding-top: calc(88px + 32px) !important; /* Space for top bar (32px) + navigation (88px) */
}

/* Progress bar styles moved to components/blog-progress-bar.css */
/* Top bar styles moved to components/blog-top-bar.css */

/* ── Navigation Adjustment for Top Bar ── */
#zivvy-header nav {
  top: 32px !important; /* Position below top bar */
}

/* ── Navigation ── */
.nav {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: var(--space-m) var(--space-l);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: hsl(0, 0%, 100%, 0.92);
}
.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--type-h4);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span {
  color: var(--accent);
}
.nav-cta {
  background: var(--accent);
  color: hsl(0, 0%, 100%);
  padding: var(--space-xs) 20px;
  border-radius: var(--radius-md);
  font-size: var(--type-caption);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--accent-dark);
}

/* ── Hero ── */
.hero {
  width: 100%;
  margin: 0;
  background: linear-gradient(165deg, var(--ink) 0%, hsl(224, 48%, 16%) 100%);
  color: hsl(0, 0%, 100%);
  padding: 80px var(--space-l) 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, hsl(355, 78%, 56%, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, hsl(31, 53%, 64%, 0.10) 0%, transparent 50%);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: hsl(0, 0%, 100%, 0.08);
  border: 1px solid hsl(0, 0%, 100%, 0.12);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--type-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-l);
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), hsl(0, 100%, 71%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: var(--type-body-lg);
  color: hsl(0, 0%, 100%, 0.7);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 36px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: var(--type-caption);
  color: hsl(0, 0%, 100%, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Article Body ── */
.article-wrap {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-xxl);
  padding: var(--space-xxl) var(--space-l) 80px;
  align-items: start;
}
@media (max-width: 860px) {
  .article-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* TOC styles moved to components/blog-toc.css */

/* ── Article Content ── */
.article {
  max-width: var(--max-w);
}
.article h2 {
  font-family: var(--font-display);
  font-size: var(--type-h2);
  font-weight: 900;
  margin: 56px 0 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 80px;
}
.article h2:first-of-type {
  margin-top: 0;
}

/* Drop cap styling */
.drop-cap {
  float: left;
  font-size: 4.5rem;
  line-height: 0.85;
  font-weight: 700;
  color: var(--primary-600);
  font-family: var(--font-display);
  margin-right: 0.1em;
  margin-top: 0.08em;
}
.article h3 {
  font-size: var(--type-h4);
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--ink-light);
}
.article h4 {
  font-size: var(--type-body);
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  color: var(--ink);
}
.article p {
  margin-bottom: 20px;
  color: var(--ink-light);
  font-size: var(--type-body);
  line-height: 1.8;
}
.article strong {
  color: var(--ink);
  font-weight: 700;
}
.article ul {
  margin: var(--space-l) 0;
  padding-left: var(--space-xl);
}
.article ul li {
  margin-bottom: var(--space-s);
  color: var(--ink-light);
  font-size: var(--type-body);
  line-height: 1.8;
}
.article ul li::marker {
  color: var(--accent);
}

/* ── Key Takeaway Box ── */
.key-takeaway {
  background: var(--accent-glow);
  border-left: 4px solid var(--accent);
  padding: var(--space-l) 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-xl) 0;
}
.key-takeaway-label {
  font-size: var(--type-overline);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.key-takeaway p {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0;
  font-size: var(--type-body-lg);
  line-height: 1.65;
}

/* ── Stat Card ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-m);
  margin: var(--space-xl) 0;
}
.stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: var(--type-display-sm);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .label {
  font-size: var(--type-caption);
  color: var(--ink-muted);
  font-weight: 500;
}

/* ── Comparison Table ── */
.comparison {
  margin: 36px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.comparison-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.comparison-header div {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}
.comparison-header .bad-header {
  background: hsl(0, 86%, 97%);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.comparison-header .good-header {
  background: hsl(138, 76%, 97%);
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
}
.comparison-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.comparison-body div {
  padding: 14px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-light);
  line-height: 1.5;
}
.comparison-body div:nth-child(odd) {
  border-right: 1px solid var(--border-light);
  background: hsl(0, 100%, 99%);
}
.comparison-body div:nth-child(even) {
  background: hsl(120, 33%, 99%);
}

/* ── Cycle Diagram ── */
.cycle-diagram {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px var(--space-xl);
  margin: 36px 0;
  box-shadow: var(--shadow-md);
}
.cycle-diagram h4 {
  font-family: var(--font-display);
  font-size: var(--type-h4);
  font-weight: 700;
  margin-bottom: var(--space-l);
  text-align: center;
  color: var(--ink);
}
.cycle-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  margin-bottom: var(--space-xxs);
  position: relative;
}
.cycle-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: hsl(0, 0%, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-caption);
  font-weight: 700;
  position: relative;
  z-index: 2;
}
.cycle-connector {
  width: 2px;
  height: 20px;
  background: var(--border);
  margin-left: 17px;
  position: relative;
}
.cycle-connector.loop {
  background: var(--accent);
  opacity: 0.3;
}
.cycle-content h5 {
  font-size: var(--type-body);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.cycle-content p {
  font-size: var(--type-small);
  color: var(--ink-muted);
  margin-bottom: 0;
  line-height: 1.5;
}
.cycle-loop-label {
  text-align: center;
  font-size: var(--type-overline);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-top: var(--space-xs);
  padding-top: var(--space-s);
  border-top: 2px dashed hsl(355, 78%, 56%, 0.2);
}

/* ── Volume Threshold Visual ── */
.threshold-visual {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: 36px 0;
  box-shadow: var(--shadow-sm);
}
.threshold-bar {
  display: flex;
  height: var(--space-xxl);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin: 20px 0 var(--space-s);
  box-shadow: inset 0 2px 4px hsl(0, 0%, 0%, 0.06);
}
.threshold-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-overline);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(0, 0%, 100%);
}
.zone-red {
  background: var(--danger-500);
  flex: 2;
}
.zone-yellow {
  background: var(--warning-500);
  flex: 1;
  color: var(--ink);
}
.zone-green {
  background: var(--teal);
  flex: 2;
}
.threshold-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--type-overline);
  color: var(--ink-muted);
}
.threshold-labels span:nth-child(2) {
  margin-left: 10%;
}

/* ── Inline CTA ── */
.inline-cta {
  background: linear-gradient(135deg, var(--ink) 0%, hsl(224, 48%, 16%) 100%);
  color: hsl(0, 0%, 100%);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  margin: var(--space-xxl) 0;
  position: relative;
  overflow: hidden;
}
.inline-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, hsl(355, 78%, 56%, 0.15), transparent 70%);
  border-radius: 50%;
}
.inline-cta h3 {
  font-family: var(--font-display);
  font-size: var(--type-h3);
  font-weight: 700;
  margin-bottom: 10px;
  color: hsl(0, 0%, 100%);
  position: relative;
}
.inline-cta p {
  color: hsl(0, 0%, 100%, 0.7);
  margin-bottom: var(--space-l);
  font-size: var(--type-body);
  max-width: 500px;
  position: relative;
}
.inline-cta .cta-btn {
  display: inline-block;
  background: var(--accent);
  color: hsl(0, 0%, 100%);
  padding: 14px var(--space-xl);
  border-radius: var(--radius-m);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--type-small);
  transition: all 0.2s;
  position: relative;
}
.inline-cta .cta-btn:hover {
  background: hsl(356, 100%, 65%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px hsl(355, 78%, 56%, 0.3);
}

/* ── Blockquote ── */
.article blockquote {
  border: none;
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  padding: 28px var(--space-xl);
  margin: var(--space-xl) 0;
  font-family: var(--font-display);
  font-size: var(--type-body-lg);
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  position: relative;
}
.article blockquote::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 4rem;
  position: absolute;
  top: -8px;
  left: 20px;
  color: var(--gold);
  opacity: 0.4;
  line-height: 1;
}

/* ── Deep Dive Links ── */
.deep-dive {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-l);
  margin: var(--space-m) 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.deep-dive:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.deep-dive-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.deep-dive-text {
  flex: 1;
}

.deep-dive-label {
  font-size: var(--type-caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--space-xxs);
}

.deep-dive-title {
  font-size: var(--type-body);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.deep-dive-arrow {
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.deep-dive:hover .deep-dive-arrow {
  transform: translateX(4px);
}

/* ── Feature Grid ── */
/* ── Feature Grid (Zivvy Solution - Numbered List Style) ── */
.feature-grid {
  counter-reset: feature;
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  margin: var(--space-xxl) 0;
  padding-left: 0;
}

.feature-item {
  counter-increment: feature;
  display: flex;
  gap: var(--space-l);
  padding: var(--space-l);
  background: transparent;
  border: none;
  position: relative;
}

.feature-item::before {
  content: counter(feature);
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-500);
  background: hsl(239, 84%, 67%, 0.08);
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.feature-item:hover::before {
  background: var(--primary-500);
  color: white;
  transform: scale(1.05);
  border-color: var(--primary-500);
}

.feature-item h4 {
  font-family: var(--font-display);
  font-size: var(--type-h4);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.feature-item p {
  color: var(--ink-light);
  margin-bottom: 0;
  font-size: var(--type-body-md);
  line-height: 1.7;
}

/* ── Numbered List (Clean) ── */
.journey-list {
  counter-reset: journey;
  margin: 28px 0;
}
.journey-item {
  counter-increment: journey;
  display: flex;
  gap: var(--space-m);
  align-items: flex-start;
  margin-bottom: 20px;
}
.journey-item::before {
  content: counter(journey);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-caption);
  font-weight: 700;
  color: var(--ink-muted);
}
.journey-item-content h5 {
  font-size: var(--type-body);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.journey-item-content p {
  font-size: var(--type-small);
  margin-bottom: 0;
}

/* Cluster Hub styles moved to components/blog-cluster-hub.css */
/* ── Bottom CTA Section ── */
.final-cta {
  background: linear-gradient(165deg, var(--ink) 0%, hsl(224, 48%, 16%) 100%);
  padding: 80px var(--space-l);
  text-align: center;
  color: hsl(0, 0%, 100%);
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, hsl(355, 78%, 56%, 0.1) 0%, transparent 60%);
}
.final-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-size: 2.5rem; /* 45px - significantly larger */
  font-weight: 900;
  margin-bottom: var(--space-m);
  line-height: 1.2;
}
.final-cta p {
  color: hsl(0, 0%, 100%, 0.65);
  font-size: var(--type-body-lg);
  line-height: 1.7;
  margin-bottom: 36px;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  justify-content: center;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--accent);
  color: hsl(0, 0%, 100%);
  padding: var(--space-m) 36px;
  border-radius: var(--radius-m);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--type-body);
  transition: all 0.2s;
}
.cta-primary:hover {
  background: hsl(356, 100%, 65%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px hsl(355, 78%, 56%, 0.3);
}
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: transparent;
  color: hsl(0, 0%, 100%);
  padding: var(--space-m) 36px;
  border-radius: var(--radius-m);
  border: 1px solid hsl(0, 0%, 100%, 0.2);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--type-body);
  transition: all 0.2s;
}
.cta-secondary:hover {
  background: hsl(0, 0%, 100%, 0.06);
  border-color: hsl(0, 0%, 100%, 0.35);
}

/* Footer styles now handled by centralized blog-footer.js component */
/* Author Box styles moved to components/blog-author-box.css */

/* Share component styles moved to components/blog-share.css */

/* ── Responsive ── */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .hero { padding: var(--space-xxl) 20px 56px; }
  .article-wrap { padding: var(--space-xl) 20px 60px; }
  .stat-row { grid-template-columns: 1fr; }
  .comparison-header, .comparison-body { grid-template-columns: 1fr; }
  .comparison-header .bad-header { border-bottom: none; }
  .comparison-body div:nth-child(odd) { border-right: none; }
  .cta-buttons { flex-direction: column; }
}
