/* ═══════════════════════════════════════════════════════════════
   magazine.css — Équilibre editorial magazine styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --orange: #FF6B2C;
  --orange-light: #FFF3ED;
  --orange-hover: #E55A1B;
  --orange-glow: rgba(255, 107, 44, 0.15);
  --cream: #FAFAF8;
  --cream-dark: #F5F3F0;
  --white: #FFFFFF;
  --warm-bg: #FBF7F2;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-body: #2D2D2D;
  --text-muted: #9B9B9B;
  --border: #E8E5E1;
  --border-light: #F0EDE9;
  --gold: #D4A574;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --navbar-h: 64px;
  --article-w: 680px;
  --wide-w: 900px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ─── Reading Progress ─── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), #FF9B6A);
  z-index: 10000;
  transition: width 80ms linear;
}

/* ─── Glass Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  z-index: 9000;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232, 229, 225, 0.6);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.navbar.scrolled {
  background: rgba(250, 250, 248, 0.95);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}
.navbar-logo img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.navbar-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
}
.navbar-link:hover {
  background: var(--orange-light);
}
.navbar-link-mobile,
.navbar-cta-mobile {
  display: none;
}
.navbar-cta {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, #FF8F5C 100%);
  padding: 9px 20px;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.navbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,44,0.35);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 560px;
  max-height: 860px;
  overflow: hidden;
  margin-top: var(--navbar-h);
}
.hero picture, .hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.02) 30%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.85) 100%);
}
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24px 56px;
}
.hero-content-inner {
  max-width: var(--article-w);
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255,107,44,0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.5vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  margin-bottom: 28px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.hero-meta a {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  transition: color 0.2s;
}
.hero-meta a:hover { color: var(--orange); }
.hero-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

/* ─── Article Body ─── */
.article {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ─── Paragraphs ─── */
.article p {
  font-size: 19px;
  line-height: 1.78;
  color: var(--text-body);
  margin-bottom: 28px;
  letter-spacing: -0.003em;
}

/* ─── Lede ─── */
.article-lede {
  margin-bottom: 8px;
}
.article-lede p {
  font-size: 21px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ─── Drop Cap ─── */
.drop-cap::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 4.2em;
  line-height: 0.8;
  font-weight: 700;
  color: var(--orange);
  padding-right: 10px;
  padding-top: 6px;
}

/* ─── Headings ─── */
.article h2 {
  font-family: var(--font-serif);
  font-size: clamp(27px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 28px;
}

/* ─── Bold & Italic ─── */
.article strong { font-weight: 600; color: var(--text-primary); }
.article em { font-style: italic; }

/* ─── Section Divider ─── */
.section-break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 56px 0;
  color: var(--border);
}
.section-break span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.5;
}
.section-break span:nth-child(2) { opacity: 0.8; }
.section-break span:nth-child(3) { opacity: 0.5; }

/* ─── Section Images — cinematic reveal ─── */
.article-img {
  width: var(--wide-w);
  max-width: 100vw;
  margin: 64px 0;
  margin-left: calc((100% - var(--wide-w)) / 2);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.article-img .img-inner {
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}
.article-img img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.12);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.article-img.revealed img {
  transform: scale(1.0);
}
.article-img .img-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.06) 100%);
  pointer-events: none;
  border-radius: 16px;
}
.article-img figcaption {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 14px 4px 0;
  letter-spacing: 0.01em;
  text-align: center;
  font-style: italic;
}

/* ─── Pull Quotes ─── */
.pullquote {
  position: relative;
  margin: 52px 0;
  padding: 36px 0 36px 32px;
  border-left: 3px solid var(--orange);
}
.pullquote::before {
  content: '\201C';
  position: absolute;
  top: -12px;
  left: -8px;
  font-family: var(--font-serif);
  font-size: 80px;
  line-height: 1;
  color: var(--orange);
  opacity: 0.12;
}
.pullquote p {
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}
.pullquote p strong {
  color: var(--orange);
  font-weight: 700;
}

/* ─── Stat Callout ─── */
.stat-callout {
  position: relative;
  width: var(--wide-w);
  max-width: 100vw;
  margin: 52px 0;
  margin-left: calc((100% - var(--wide-w)) / 2);
  background: linear-gradient(135deg, var(--warm-bg) 0%, #FFF5EF 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 44px 32px;
  text-align: center;
  overflow: hidden;
}
.stat-callout::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--orange-glow);
  filter: blur(40px);
}
.stat-callout .stat-number {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 60px);
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
}
.stat-callout .stat-label {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

/* ─── Standalone short sentence — emphasis ─── */
.emphasis-line {
  font-size: 21px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  margin: 40px 0;
  line-height: 1.6;
}

/* ─── Sources ─── */
.article-sources {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.article-sources h3 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.article-sources p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ─── Footer CTA ─── */
.article-footer {
  background: var(--text-primary);
  padding: 64px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 480px;
  margin: 0 auto;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 28px;
}
.footer-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--orange) 0%, #FF8F5C 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s;
}
.footer-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,44,0.4);
}
.footer-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.footer-cta:hover svg {
  transform: translateX(3px);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* ─── Scroll Animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image cinematic reveal — clip from center outward */
.article-img {
  clip-path: inset(8% 12% 8% 12% round 16px);
  opacity: 0;
  transition:
    clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.article-img.revealed {
  clip-path: inset(0% 0% 0% 0% round 16px);
  opacity: 1;
}

/* Subtle parallax on images while scrolling */
.article-img .img-parallax {
  transition: transform 0.08s linear;
  will-change: transform;
}

/* Stat callout entrance */
.stat-callout {
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-callout.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Pullquote slide-in */
.pullquote {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.pullquote.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Emphasis lines — gentle fade */
.emphasis-line {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.emphasis-line.revealed {
  opacity: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .article-img,
  .stat-callout,
  .pullquote,
  .emphasis-line,
  .fade-up {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .article-img img {
    transform: scale(1) !important;
    transition: none !important;
  }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  :root {
    --navbar-h: 56px;
  }
  .navbar-inner {
    padding: 0 14px;
  }
  .navbar-logo {
    gap: 8px;
    font-size: 1.05rem;
  }
  .navbar-logo img {
    width: 24px;
    height: 24px;
  }
  .navbar-right {
    gap: 6px;
  }
  .navbar-link-desktop,
  .navbar-cta-desktop {
    display: none;
  }
  .navbar-link-mobile,
  .navbar-cta-mobile {
    display: inline;
  }
  .hero {
    height: 70vh;
    min-height: 420px;
  }
  .hero-content {
    padding: 0 20px 40px;
  }
  .hero-badge {
    font-size: 10px;
    padding: 5px 12px;
    margin-bottom: 16px;
  }
  .hero-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .article {
    padding: 40px 20px 60px;
  }
  .article p {
    font-size: 17px;
    line-height: 1.72;
  }
  .article-lede p {
    font-size: 18px;
  }
  .drop-cap::first-letter {
    font-size: 3.5em;
  }
  .article-img {
    width: calc(100% + 40px);
    margin-left: -20px;
    border-radius: 10px;
    clip-path: inset(4% 6% 4% 6% round 10px);
  }
  .article-img.revealed {
    clip-path: inset(0% 0% 0% 0% round 10px);
  }
  .article-img .img-inner {
    border-radius: 10px;
  }
  .stat-callout {
    width: calc(100% + 40px);
    margin-left: -20px;
    padding: 32px 20px;
    border-radius: 12px;
  }
  .stat-callout .stat-number {
    font-size: 40px;
  }
  .pullquote {
    margin: 40px 0;
    padding-left: 20px;
  }
  .pullquote p {
    font-size: 19px;
  }
  .pullquote::before {
    font-size: 60px;
    top: -8px;
    left: -4px;
  }
  .navbar-link {
    font-size: 12.5px;
    padding: 6px 8px;
  }
  .navbar-cta {
    font-size: 12.5px;
    padding: 8px 12px;
  }
  .section-break {
    margin: 44px 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 30px;
  }
  .hero-subtitle {
    font-size: 17px;
  }
  .article h2 {
    font-size: 24px;
  }
}
