:root {
  --navy:  #192854;
  --amber: #FBB228;
  --slate: #475569;
  --blue:  #3651AA;
  --cream: #FAF6EE;
  --white: #FFFFFF;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

main { display: block; }

section {
  min-height: 80vh;
  padding: 10vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section.section-hook  { min-height: 100vh; background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
section.section-cream { background: var(--cream); }
section.section-white { background: var(--white); }
section.section-navy  { background: var(--navy); color: var(--white); }

h1 { font-weight: 800; font-size: clamp(48px, 7vw, 96px); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: clamp(28px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
h3 { font-weight: 700; font-size: 18px; }

p { font-size: 17px; max-width: 640px; color: var(--slate); line-height: 1.55; }
p + p { margin-top: 1rem; }
section.section-navy p, section.section-hook p { color: var(--cream); }

.label {
  font-weight: 700;
  font-size: 12px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
section.section-navy .label, section.section-hook .label { color: var(--amber); opacity: .85; }

.huge-number {
  font-weight: 800;
  font-size: clamp(80px, 12vw, 160px);
  line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

/* Reveal-on-scroll utility */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 600ms ease-out, transform 600ms ease-out; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Validation banner (kept from Task 4) */
#validation-banner {
  background: #b91c1c; color: var(--white); padding: 3rem 8vw;
  min-height: 100vh; font-family: var(--font-body);
}
#validation-banner h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
#validation-banner p { font-size: 16px; margin-bottom: 24px; max-width: 720px; color: var(--white); }
#validation-banner table { width: 100%; max-width: 900px; border-collapse: collapse; background: rgba(255,255,255,.08); }
#validation-banner th, #validation-banner td { padding: 10px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.15); font-variant-numeric: tabular-nums; }
#validation-banner th { background: rgba(0,0,0,.2); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

/* === Section 1: Hook === */
section.section-hook {
  background:
    radial-gradient(ellipse at 80% 30%, rgba(54, 81, 170, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 70%, rgba(251, 178, 40, 0.10) 0%, transparent 60%),
    var(--navy);
  background-size: 200% 200%;
  animation: hookGradient 18s ease-in-out infinite;
}
@keyframes hookGradient {
  0%, 100% { background-position: 0% 0%, 100% 100%; }
  50%      { background-position: 30% 20%, 60% 80%; }
}
.hook-content { max-width: 920px; }
.hook-content h1 { color: var(--white); }
.hook-sub { color: var(--amber); font-weight: 600; font-size: 24px; margin-top: 1.5rem; max-width: 720px; }
.brand {
  font-weight: 600; font-size: 13px; color: var(--cream); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 2rem; opacity: 0.7;
}
.scroll-cue {
  position: absolute; bottom: 4vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: var(--cream); opacity: 0.6; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; animation: scrollBounce 2.4s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* === Section 8: Close === */
.close-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3vw; margin: 2rem 0 3rem; max-width: 1200px; }
.close-col h3 { font-size: 14px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.close-col p { font-size: 14.5px; line-height: 1.6; color: var(--cream); opacity: 0.85; max-width: none; }
.close-sources { font-size: 13px; color: var(--cream); opacity: 0.6; max-width: none; margin-top: 1rem; }
.close-footer { font-size: 12px; color: var(--cream); opacity: 0.5; max-width: none; margin-top: 0.5rem; }

/* === Section 2: Frame === */
.frame-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; margin-top: 2rem; max-width: 1100px; align-items: start; }
.frame-card { background: var(--white); border-radius: 14px; padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.frame-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.frame-firm h3 { color: var(--amber); }
.frame-hh   h3 { color: var(--blue); }
.frame-tag { font-size: 13px; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; max-width: none; }
.frame-list { list-style: none; padding: 0; margin: 0 0 18px; }
.frame-list li { font-size: 15.5px; font-weight: 600; color: var(--navy); padding: 8px 0; border-bottom: 1px solid #eef0f4; }
.frame-list li:last-child { border-bottom: none; }
.frame-note { font-size: 14px; color: var(--slate); max-width: none; line-height: 1.55; }

/* === Section 3: Headline reveal === */
.reveal-content { max-width: 920px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.reveal-setup { font-size: 14px; max-width: 720px; }
.reveal-headline { display: flex; align-items: baseline; gap: 14px; justify-content: center; flex-wrap: wrap; }
.reveal-unit { font-size: 20px; font-weight: 600; color: var(--slate); }
.reveal-split-bar { display: flex; height: 72px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); width: 720px; max-width: 100%; }
.reveal-split-firm { background: var(--amber); color: var(--navy); padding: 0 24px; font-weight: 700; font-size: 18px; display: flex; align-items: center; }
.reveal-split-hh   { background: var(--blue); color: var(--white); padding: 0 24px; font-weight: 700; font-size: 18px; display: flex; align-items: center; }
.reveal-legend { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: var(--slate); margin-top: 8px; max-width: 920px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.dot-firm { background: var(--amber); }
.dot-hh   { background: var(--blue); }
.reveal-caveat { font-size: 13px; color: var(--slate); opacity: 0.75; max-width: 720px; }

/* === Section 4: Spread chart === */
.echart-container { width: 100%; }
.caveat { font-size: 13px; color: var(--slate); opacity: 0.75; max-width: 720px; margin-top: 1rem; }

/* === Section 5: Waterfall controls === */
.wf-controls { display: flex; gap: 14px; align-items: center; margin: 1rem 0 1.5rem; }
.wf-controls label { font-size: 13px; color: var(--slate); font-weight: 600; }
.wf-controls select {
  font: 14px var(--font-body); padding: 8px 14px;
  border: 1px solid var(--slate); border-radius: 6px; background: var(--white);
  color: var(--navy); cursor: pointer;
}

/* === Section 6: Playground === */
.pg-intro { font-size: 17px; max-width: 720px; line-height: 1.55; color: var(--slate); margin-bottom: 2rem; }

.result-strip {
  background: var(--white); border-radius: 14px; padding: 1.6rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: grid; grid-template-columns: auto 1fr auto; gap: 2.5rem;
  align-items: center; margin-bottom: 1.4rem; max-width: 1200px;
}
.rs-head { display: flex; flex-direction: column; gap: 4px; }
.rs-tag { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.rs-num { font-weight: 800; font-size: 64px; line-height: 1; color: var(--amber); letter-spacing: -.02em; }
.rs-unit { font-size: 13px; color: var(--slate); font-weight: 600; }

.rs-split { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rs-bar { display: flex; height: 48px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.rs-bar-firm { background: var(--amber); color: var(--navy); padding: 0 16px; display: flex; align-items: center; font-weight: 700; font-size: 14px; }
.rs-bar-hh   { background: var(--blue); color: var(--white); padding: 0 16px; display: flex; align-items: center; font-weight: 700; font-size: 14px; }
.rs-legend { display: flex; gap: 18px; font-size: 12px; color: var(--slate); }

.rs-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; min-width: 160px; }
.rs-row { font-size: 12px; color: var(--slate); }
.rs-row b { color: var(--navy); }
.rs-pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(54,81,170,.10); color: var(--blue); margin-top: 4px; align-self: flex-end;
}
.rs-pill.up { background: rgba(251,178,40,.18); color: #A36500; }
.reset-btn {
  background: var(--white); border: 1px solid var(--slate); color: var(--navy);
  font: 600 12px var(--font-body); padding: 6px 12px; border-radius: 6px; cursor: pointer; align-self: flex-end;
}

.sliders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 1200px; }
.pg-group { background: var(--white); border-radius: 12px; padding: 1.2rem 1.4rem 1.3rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pg-group-tag {
  display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--navy); margin-bottom: .8rem;
}
.pg-group-tag::before { content: ""; width: 14px; height: 2px; background: var(--amber); }
.pg-slider-row { padding: .55rem 0; border-top: 1px solid #f3f4f6; }
.pg-slider-row:first-of-type { border-top: none; padding-top: .2rem; }
.pg-slider-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; gap: 1rem; }
.pg-slider-val { font-weight: 800; color: var(--navy); font-size: 15px; white-space: nowrap; }
.pg-slider-row input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: var(--cream); border-radius: 2px; outline: none;
}
.pg-slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
  background: var(--amber); border: 2px solid var(--navy); border-radius: 50%;
  cursor: pointer; transition: transform 150ms ease;
}
.pg-slider-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pg-slider-row input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; background: var(--amber); border: 2px solid var(--navy); border-radius: 50%; cursor: pointer;
}
.pg-slider-bounds { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--slate); margin-top: 4px; }

/* ── Section 7 · Archetypes Matrix ── */
.mx-intro { font-size: 17px; max-width: 720px; color: var(--slate); margin-bottom: 2rem; line-height: 1.55; }

.mx-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: 2.5vw; align-items: start; }

.mx-matrix { background: var(--cream); border-radius: 14px; padding: 1.9rem 1.6rem; box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: auto; }
.mx-matrix table { border-collapse: separate; border-spacing: 8px 10px; width: 100%; }
.mx-matrix th, .mx-matrix td { padding: 0; vertical-align: middle; }
.mx-col-head { background: var(--white); border-radius: 8px; padding: .55rem .5rem .65rem; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-width: 88px; }
.mx-ch-name { font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.mx-ch-elec { font-size: 10px; color: var(--slate); margin-top: 6px; font-weight: 600; }
.mx-mini-slider { width: 100%; margin-top: 4px; -webkit-appearance: none; appearance: none; height: 3px; background: var(--cream); border-radius: 2px; outline: none; }
.mx-mini-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 11px; height: 11px; background: var(--amber); border: 1.5px solid var(--navy); border-radius: 50%; cursor: pointer; }
.mx-row-head { background: var(--white); border-radius: 8px; padding: .85rem 1rem; text-align: left; min-width: 120px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mx-rh-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.mx-rh-cnt { font-size: 10px; color: var(--slate); font-weight: 600; margin-top: 1px; }
.mx-cell {
  background: var(--white); border: none; border-radius: 8px; padding: .6rem .4rem;
  text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: pointer;
  font: 700 13px var(--font-body); color: var(--navy);
  transition: background 120ms ease, transform 120ms ease; width: 100%;
}
.mx-cell:hover { background: #fff5dc; transform: translateY(-1px); }
.mx-cell.fra { background: #eaf0ff; } .mx-cell.deu { background: #fff1de; } .mx-cell.jpn { background: #fce5e5; }
.mx-cell.swe { background: #e6f7ec; } .mx-cell.nor { background: #dcefff; } .mx-cell.aus { background: #f3e8ff; }
.mx-cell.nld { background: #fef0db; }
.mx-cell::after { content: " ▾"; font-size: 9px; color: var(--slate); margin-left: 2px; font-weight: 400; }

.mx-pool-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--slate); margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; }
.mx-pool-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.mx-impact { background: var(--cream); border-radius: 14px; padding: 1.6rem 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 24px; }
.mx-impact .res-tag { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.mx-impact-headline { text-align: center; padding: 6px 0 3px; }
.mx-impact-headline .num { font-weight: 800; font-size: 54px; line-height: 1; color: var(--amber); letter-spacing: -.02em; }
.mx-impact-headline .unit { font-size: 12px; color: var(--slate); font-weight: 600; margin-top: 4px; }
.mx-impact h3 { font-size: 14px; font-weight: 700; color: var(--navy); margin: .8rem 0 .5rem; }
.mx-impact-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed #d1d5db; font-size: 12.5px; }
.mx-impact-row:last-child { border-bottom: none; }
.mx-impact-name { font-weight: 600; color: var(--navy); }
.mx-impact-val { font-weight: 800; color: var(--navy); }
.mx-divider { height: 1px; background: #d1d5db; margin: 15px 0; }

.mx-picker {
  position: absolute; background: var(--white); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); padding: .5rem; z-index: 100;
  display: flex; flex-direction: column; gap: 4px;
}
.mx-picker button {
  background: var(--white); border: 1px solid #e5e7eb; border-radius: 6px;
  padding: .4rem .8rem; font: 600 12px var(--font-body); color: var(--navy);
  cursor: pointer; text-align: left;
}
.mx-picker button:hover { background: var(--cream); }
.mx-picker button.selected { border-color: var(--amber); background: #fff5dc; }
