/* ============================================
   MARKET CYCLES: WHAT IF YOU STAYED?
   Light theme · Scoped to .mc-wrapper
   ============================================ */

/* ── Hide CMS elements ── */

body:has(.mc-wrapper) .back-to-top,
body:has(.mc-wrapper) .c-matter__meta,
body:has(.mc-wrapper) .c-matter__title {
  display: none !important;
}

/* ── Reset ── */
.mc-wrapper *,
.mc-wrapper *::before,
.mc-wrapper *::after {
  box-sizing: border-box;
}

/* ── Wrapper ── */
.mc-wrapper {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  color: #0f172a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mc-wrapper h2 {
  text-align: left;
  margin: 0;
}

/* ── Progress Bar ── */
.mc-wrapper .mc-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #059669;
  z-index: 9999;
  pointer-events: none;
}

/* ── Hero ── */
.mc-wrapper .mc-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f8fafc;
  overflow: hidden;
  padding: 40px 24px;
}

.mc-wrapper .mc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.13) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.mc-wrapper .mc-hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.mc-wrapper .mc-hero__overline {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #059669;
  margin: 0 0 16px;
  opacity: 0;
  transform: translateY(20px);
}

.mc-wrapper .mc-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin: 0 0 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
}

.mc-wrapper .mc-hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #475569;
  margin: 0 0 40px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(30px);
}

.mc-wrapper .mc-hero__scroll-cue {
  color: #94a3b8;
  font-size: 0.85rem;
  opacity: 0;
}

.mc-wrapper .mc-hero__arrow {
  font-size: 1.4rem;
  margin-top: 6px;
  animation: mc-bounce 2s ease-in-out infinite;
}

@keyframes mc-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Sections ── */
.mc-wrapper .mc-section {
  padding: 80px 24px;
}

.mc-wrapper .mc-section__inner {
  max-width: 720px;
  margin: 0 auto;
}

.mc-wrapper .mc-intro .mc-section__inner p,
.mc-wrapper .mc-transition .mc-section__inner p {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  line-height: 1.7;
  color: #334155;
  margin: 0 0 24px;
  text-align: center;
}

.mc-wrapper .mc-intro .mc-section__inner p:last-child,
.mc-wrapper .mc-transition .mc-section__inner p:last-child {
  margin-bottom: 0;
}

.mc-wrapper .mc-transition {
  background: #f8fafc;
}

/* Fade-in initial state (GSAP animates these) */
.mc-wrapper .fade-in {
  opacity: 0;
  transform: translateY(30px);
}

/* ── Crash Scenes ── */
.mc-wrapper .mc-crash-scene {
  position: relative;
  width: 100%;
}

.mc-wrapper .mc-crash-scene__sticky {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mc-wrapper .mc-crash-scene__inner {
  max-width: 860px !important;
  width: 100% !important;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 28px 32px !important;
  overflow: visible !important;
}

.mc-wrapper .mc-crash-scene__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.mc-wrapper .mc-crash-scene__label {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  text-align: left;
}

.mc-wrapper .mc-crash-scene__period {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.mc-wrapper .mc-drop-badge {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 6px 14px;
  border-radius: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Chart area */
.mc-wrapper .mc-crash-scene__chart-area {
  position: relative;
  width: 100%;
  height: 300px;
  margin-bottom: 16px;
  contain: layout;
}

.mc-wrapper .mc-crash-scene__chart-area canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Narration */
.mc-wrapper .mc-crash-scene__narration {
  min-height: 44px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 16px;
  transition: opacity 0.25s ease;
}

/* Value items */
.mc-wrapper .mc-crash-scene__values {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
}

.mc-wrapper .mc-val-item {
  display: block !important;
  padding: 6px 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.mc-wrapper .mc-val-dot {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  max-width: 10px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
}

.mc-wrapper .mc-dot-green { background: #059669; }
.mc-wrapper .mc-dot-red { background: #dc2626; }

.mc-wrapper .mc-val-label {
  font-size: 0.82rem !important;
  color: #64748b !important;
  display: inline !important;
  margin-right: 12px !important;
  white-space: nowrap !important;
  max-width: none !important;
}

.mc-wrapper .mc-val-amount {
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  font-variant-numeric: tabular-nums !important;
  display: block !important;
  margin-top: 2px !important;
}

.mc-wrapper .mc-val-stayed .mc-val-amount { color: #059669; }
.mc-wrapper .mc-val-sold .mc-val-amount { color: #dc2626; }

/* ── Interactive ── */
.mc-wrapper .mc-interactive {
  background: #ffffff;
}

.mc-wrapper .mc-interactive__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  text-align: center;
}

.mc-wrapper .mc-interactive__subtitle {
  font-size: 1rem;
  color: #64748b;
  text-align: center;
  margin: 0 0 40px;
  line-height: 1.6;
}

.mc-wrapper .mc-interactive__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 600px;
  margin: 0 auto 40px;
}

.mc-wrapper .mc-control-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.mc-wrapper .mc-control-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.mc-wrapper .mc-control-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.mc-wrapper .mc-control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: #2563eb;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mc-wrapper .mc-control-group input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #2563eb;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mc-wrapper .mc-control-range {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* Interactive results */
.mc-wrapper .mc-interactive__result {
  max-width: 600px;
  margin: 0 auto;
}

.mc-wrapper .mc-interactive__hero-stat {
  text-align: center;
  margin-bottom: 32px;
}

.mc-wrapper .mc-interactive__hero-label {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 4px;
  text-align: center;
}

.mc-wrapper .mc-interactive__hero-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #dc2626;
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.mc-wrapper .mc-interactive__comparison {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mc-wrapper .mc-interactive__comp-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-wrapper .mc-interactive__comp-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #475569;
  min-width: 120px;
  flex-shrink: 0;
}

.mc-wrapper .mc-interactive__comp-bar-wrap {
  flex: 1;
  height: 28px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.mc-wrapper .mc-interactive__comp-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 4px;
}

.mc-wrapper .mc-bar-stayed { background: #059669; }
.mc-wrapper .mc-bar-sold { background: #dc2626; }

.mc-wrapper .mc-interactive__comp-value {
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
}

/* ── Closing ── */
.mc-wrapper .mc-closing {
  background: #f8fafc;
  padding: 100px 24px;
}

.mc-wrapper .mc-closing__content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.mc-wrapper .mc-closing__content h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
  text-align: center;
}

.mc-wrapper .mc-closing__content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #475569;
  line-height: 1.7;
  margin: 0 0 8px;
}

/* ── Footer ── */
.mc-wrapper .mc-footer {
  background: #f8fafc;
  padding: 0 24px 80px;
  margin-bottom: 60px;
}

.mc-wrapper .mc-disclaimer {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.72rem;
  line-height: 1.6;
  color: #475569;
  border-top: 1px solid #1e293b;
  padding-top: 24px;
}

/* ── Back to Top ── */
.mc-wrapper .mc-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.mc-wrapper .mc-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mc-wrapper .mc-back-to-top:hover {
  background: #1e293b;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .mc-wrapper .mc-section {
    padding: 60px 20px;
  }

  .mc-wrapper .mc-crash-scene__inner {
    padding: 20px 18px;
    border-radius: 12px;
  }

  .mc-wrapper .mc-crash-scene__chart-area {
    height: 220px;
  }

  .mc-wrapper .mc-crash-scene__values {
    flex-direction: column;
    gap: 10px;
  }

  .mc-wrapper .mc-interactive__controls {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mc-wrapper .mc-interactive__comp-row {
    flex-wrap: wrap;
  }

  .mc-wrapper .mc-interactive__comp-label {
    min-width: 100%;
  }

  .mc-wrapper .mc-interactive__comp-value {
    min-width: auto;
    text-align: left;
    margin-left: auto;
  }

  .mc-wrapper .mc-closing {
    padding: 60px 20px;
  }

  .mc-wrapper .mc-back-to-top {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .mc-wrapper .mc-crash-scene__sticky {
    padding: 8px;
  }

  .mc-wrapper .mc-crash-scene__inner {
    padding: 16px 14px;
  }

  .mc-wrapper .mc-crash-scene__header {
    flex-direction: column;
    gap: 8px;
  }

  .mc-wrapper .mc-crash-scene__chart-area {
    height: 180px;
  }

  .mc-wrapper .mc-val-label {
    font-size: 0.75rem;
  }
}

/* ── CMS Overrides ── */
.mc-wrapper .mc-section p,
.mc-wrapper .mc-crash-scene p {
  max-width: none !important;
}
