/* =========================================================================
   correlation.css
   GoldBridge — correlation.html only.
   Editorial strategy page: 6 sections + perf placeholder + final CTA.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Page hero (correlation variant — taller)
   ------------------------------------------------------------------------- */
.corr-hero {
  position: relative;
  padding-top: calc(var(--nav-height) + clamp(64px, 11vw, 128px));
  padding-bottom: clamp(80px, 11vw, 128px);
  overflow: hidden;
  border-bottom: 1px solid var(--border-dim);
}

.corr-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 80% at 50% 0%, var(--gold-glow), transparent 70%);
  pointer-events: none;
}

.corr-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 720px;
}

.corr-hero__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(48px, 7.4vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--text);
}

.corr-hero__sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
}

/* -------------------------------------------------------------------------
   Editorial section
   ------------------------------------------------------------------------- */
.editorial {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 680px;
  margin-inline: auto;
}

.editorial__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  color: var(--text);
}

.editorial__title--center {
  text-align: center;
}

.editorial__body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  opacity: 0.85;
}

.editorial__body p + p {
  margin-top: var(--space-5);
}

.editorial__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.45;
  color: var(--text);
  border-left: 2px solid var(--gold);
  padding-left: var(--space-4);
  margin: var(--space-5) 0;
}

/* -------------------------------------------------------------------------
   Divergence diagram (animated SVG)
   ------------------------------------------------------------------------- */
.diagram {
  margin-top: var(--space-7);
  padding: clamp(28px, 4vw, 48px);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  overflow: hidden;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram__legend {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.diagram__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.diagram__legend-dot {
  width: 12px;
  height: 2px;
  background: var(--gold);
}
.diagram__legend-dot--copper { background: var(--copper); }

.diagram__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.diagram__caption strong {
  color: var(--gold);
  font-weight: 400;
}

/* Animated curves — gold (XAUUSD) + copper (XAUEUR) */
.line-usd {
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3s var(--ease-out) forwards;
}

.line-eur {
  stroke: var(--copper);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3s var(--ease-out) 0.3s forwards;
}

/* Filled gap polygon between the two curves */
.gap-area {
  opacity: 0;
  animation: fadeIn 1000ms var(--ease-out) 1.4s forwards;
}

/* Entry / exit markers */
.marker-entry,
.marker-exit {
  opacity: 0;
}
.marker-entry { animation: fadeIn 600ms var(--ease-out) 2.4s forwards; }
.marker-exit  { animation: fadeIn 600ms var(--ease-out) 2.8s forwards; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .line-usd, .line-eur { animation: none; stroke-dashoffset: 0; }
  .gap-area, .marker-entry, .marker-exit { opacity: 1; animation: none; }
}

/* -------------------------------------------------------------------------
   Why gold pairs — 2-col editorial
   ------------------------------------------------------------------------- */
.why-gold {
  background: var(--bg-surface);
}

.why-gold__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.why-gold__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.why-gold__body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  opacity: 0.82;
  max-width: 560px;
}

.why-gold__body p + p { margin-top: var(--space-4); }

.why-gold__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: clamp(32px, 4vw, 56px);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.why-gold__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 60% at 50% 0%, var(--gold-glow), transparent 70%);
  pointer-events: none;
}

.why-gold__stat {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(72px, 12vw, 144px);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.why-gold__stat-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.scatter {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin-top: var(--space-3);
}

.scatter svg {
  width: 100%;
  height: auto;
}

@media (min-width: 1024px) {
  .why-gold__grid { grid-template-columns: 1.2fr 1fr; }
}

/* -------------------------------------------------------------------------
   How GoldBridge applies — 3 horizontal steps
   ------------------------------------------------------------------------- */
.applies__head {
  text-align: center;
  margin-inline: auto;
  margin-bottom: clamp(48px, 6vw, 80px);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.applies__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
}

.applies__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.apply-step {
  position: relative;
  padding: clamp(28px, 3.5vw, 40px);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.apply-step:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.apply-step__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.apply-step__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.apply-step__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

@media (min-width: 768px) {
  .applies__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .apply-step:hover { transform: none; }
}

/* -------------------------------------------------------------------------
   Risk explainer — 2x2 grid
   ------------------------------------------------------------------------- */
.risk {
  background: var(--bg-surface);
}

.risk__head {
  margin-inline: auto;
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.risk__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.1;
}

.risk__note {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 520px;
  margin-inline: auto;
}

.risk__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 920px;
  margin-inline: auto;
}

.risk-card {
  padding: clamp(28px, 3.5vw, 40px);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  position: relative;
  transition: border-color var(--dur-base) var(--ease-out);
}
.risk-card:hover { border-color: var(--border); }

.risk-card__icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.risk-card__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.risk-card__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

@media (min-width: 768px) {
  .risk__grid { grid-template-columns: repeat(2, 1fr); }
}

/* -------------------------------------------------------------------------
   Final CTA block
   ------------------------------------------------------------------------- */
.final-cta {
  /* placed inside .container */
}

.final-cta__box {
  position: relative;
  padding: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(60% 100% at 50% 0%, var(--gold-glow), transparent 70%),
    var(--bg-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
  overflow: hidden;
}

.final-cta__box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent);
}

.final-cta__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.1;
  color: var(--text);
  max-width: 740px;
}

.final-cta__body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 580px;
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}
