/* MSGROUP GLOBAL / Economic Triad Index
   Navy and gold. Cormorant Garamond for display, Source Sans 3 for reading. */

@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --navy: #0b1a2e;
  --navy-2: #10233d;
  --navy-3: #16304f;
  --rule: #26425f;
  --gold: #c9a84c;
  --gold-soft: #e2cc8a;
  --text: #efe9dc;
  --muted: #a9b5c4;
  --red: #d46c5e;
  --amber: #e4a64c;
  --green: #6fb68b;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(201, 168, 76, 0.35); color: var(--text); }

a { color: var(--gold-soft); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

img, svg { display: block; max-width: 100%; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-variant-numeric: lining-nums;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); line-height: 1.02; letter-spacing: -0.012em; }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.08; letter-spacing: -0.006em; }
h3 { font-size: 1.6rem; line-height: 1.15; }

p { margin: 0 0 1em; }
.prose { max-width: 66ch; }
.prose p:last-child { margin-bottom: 0; }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.38rem); line-height: 1.55; color: var(--text); max-width: 40ch; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 26, 46, 0.96);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(11, 26, 46, 0.88); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; position: relative; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name strong { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; }
.brand-name span { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 1rem;
  padding: 10px 12px; border-radius: 2px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }

.menu-btn {
  display: none;
  background: none; border: 1px solid var(--rule); color: var(--text);
  font: inherit; font-size: 1rem; padding: 8px 14px; cursor: pointer; border-radius: 2px;
}

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-2);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 24px; border-top: 1px solid var(--rule); font-size: 1.1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--rule); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head h2 + p { margin-top: 18px; color: var(--muted); font-size: 1.18rem; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
  padding: 14px 24px; border-radius: 2px; border: 1px solid var(--gold);
  background: var(--gold); color: var(--navy);
}
.btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--gold); color: var(--text); }

/* ---------- Home hero ---------- */

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 56px; }
.hero h1 { max-width: 19ch; font-size: clamp(2.6rem, 6.4vw, 5.1rem); }
.hero-sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-top: 30px; }
.hero-sub .lede { margin: 0; max-width: 46ch; }
.hero-sub .actions { margin-top: 0; flex-direction: column; align-items: stretch; }
@media (max-width: 860px) {
  .hero-sub { grid-template-columns: 1fr; }
  .hero-sub .actions { flex-direction: row; align-items: center; }
}

.triad-words {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--gold-soft);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  margin-top: 26px;
}

/* ---------- Reader (the signature element) ---------- */

.reader {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  border: 1px solid var(--rule);
  background: var(--navy-2);
}
.reader-controls { padding: 32px; border-right: 1px solid var(--rule); }
.reader-controls h2 { font-size: 1.9rem; }
.reader-controls > p { color: var(--muted); margin: 10px 0 26px; font-size: 1.02rem; }

.measure { border: 0; margin: 0; padding: 18px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 18px; }
.measure legend { float: left; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; padding: 0; }
.measure .hint { grid-column: 1 / -1; color: var(--muted); font-size: 0.95rem; margin: 0; }

.seg { display: inline-flex; justify-self: start; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label {
  padding: 8px 16px; font-size: 0.98rem; cursor: pointer; color: var(--muted);
  min-width: 68px; text-align: center; user-select: none;
}
.seg label + input + label { border-left: 1px solid var(--rule); }
.seg input:checked + label { background: var(--gold); color: var(--navy); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--gold-soft); outline-offset: -4px; }

.reader-out { padding: 32px; display: flex; flex-direction: column; position: relative; }
.reader-out::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: var(--band, var(--amber));
}
@media (prefers-reduced-motion: no-preference) {
  .reader-out::before { transition: background 0.35s ease; }
  .reader-out .fade { transition: opacity 0.25s ease; }
}
.band-name { font-weight: 600; font-size: 0.98rem; color: var(--band, var(--amber)); margin: 4px 0 18px; }
.pattern-name { font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.05; }
.pattern-text { margin-top: 18px; color: var(--text); }
.reader-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.98rem; }
.reader-foot a { font-weight: 600; }

@media (max-width: 900px) {
  .reader { grid-template-columns: 1fr; }
  .reader-controls { border-right: 0; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 480px) {
  .reader-controls, .reader-out { padding: 24px 20px; }
  .measure { grid-template-columns: 1fr; }
}

/* ---------- Three measures ---------- */

.triad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.triad > div { padding: 28px 28px 8px 0; }
.triad > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.triad h3 { margin-bottom: 12px; }
.triad p { color: var(--muted); }
.triad .direction { color: var(--gold-soft); font-size: 0.98rem; margin-top: 14px; }

.together { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: start; }
.together ul { list-style: none; margin: 0; padding: 0; }
.together li { padding: 16px 0; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; }
.together li:last-child { border-bottom: 1px solid var(--rule); }

@media (max-width: 860px) {
  .triad { grid-template-columns: 1fr; }
  .triad > div, .triad > div + div { padding: 24px 0 4px; border-left: 0; }
  .triad > div + div { border-top: 1px solid var(--rule); }
  .together { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Capture pattern ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.figure { border: 1px solid var(--rule); background: var(--navy-2); padding: 24px; }
.figure figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; color: var(--muted); margin-bottom: 14px; }
.legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 8px; background: currentColor; }
.legend .out { color: var(--gold); }
.legend .pain { color: var(--red); }
.legend span { color: var(--text); }
.legend .out::before { background: var(--gold); }
.legend .pain::before { background: var(--red); }

@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Bands ---------- */

.bands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.band { padding: 26px 26px 6px 0; border-top: 6px solid var(--c); }
.band + .band { padding-left: 26px; }
.band h3 { color: var(--c); margin-bottom: 10px; }
.band p { color: var(--text); }
.band.red { --c: var(--red); }
.band.amber { --c: var(--amber); }
.band.green { --c: var(--green); }
@media (max-width: 860px) {
  .bands { grid-template-columns: 1fr; gap: 12px; }
  .band, .band + .band { padding: 22px 0 4px; }
}

/* ---------- Two column text ---------- */

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.pair h3 { margin-bottom: 12px; }
.pair p { color: var(--muted); }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Deliverables ---------- */

.deliver { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 14px 0 14px 34px; border-top: 1px solid var(--rule); }
.ticks li:last-child { border-bottom: 1px solid var(--rule); }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 12px;
  border: 2px solid var(--gold); transform: rotate(45deg);
}
@media (max-width: 860px) { .deliver { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Firm strip ---------- */

.firm-strip { background: var(--navy-2); }
.firm-strip .inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.firm-strip svg { width: 64px; height: 64px; }
.firm-strip h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.firm-strip p { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
@media (max-width: 860px) { .firm-strip .inner { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Inner pages ---------- */

.page-head { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { margin-top: 24px; max-width: 52ch; }

.practice { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; padding: 36px 0; border-top: 1px solid var(--rule); }
.practice:last-of-type { border-bottom: 1px solid var(--rule); }
.practice h3 { font-size: 1.75rem; }
.practice .lead { color: var(--muted); margin-top: 12px; }
.practice ul { margin: 0; padding-left: 1.1em; color: var(--text); }
.practice li { margin-bottom: 8px; }
.practice li::marker { color: var(--gold); }
.practice.featured h3 { color: var(--gold-soft); }
@media (max-width: 760px) { .practice { grid-template-columns: 1fr; gap: 16px; } }

.terms { width: 100%; border-collapse: collapse; margin-top: 8px; }
.terms th, .terms td { text-align: left; padding: 20px 16px 20px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.terms tr:last-child th, .terms tr:last-child td { border-bottom: 1px solid var(--rule); }
.terms th { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; width: 38%; }
.terms td.price { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 1.45rem; color: var(--gold-soft); white-space: nowrap; }
.terms td.note { color: var(--muted); }
@media (max-width: 640px) {
  .terms, .terms tbody, .terms tr, .terms th, .terms td { display: block; width: 100%; }
  .terms tr { border-top: 1px solid var(--rule); padding: 16px 0; }
  .terms th, .terms td { border: 0 !important; padding: 2px 0; }
}

.notice { border-left: 3px solid var(--gold); padding: 6px 0 6px 18px; color: var(--muted); max-width: 66ch; }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.principles > div { padding: 26px 0; border-top: 1px solid var(--rule); }
.principles h3 { margin-bottom: 8px; }
.principles p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; }
.facts dt, .facts dd { padding: 14px 0; border-top: 1px solid var(--rule); margin: 0; }
.facts dt { color: var(--muted); padding-right: 32px; }
.facts dd:last-of-type, .facts dt:last-of-type { border-bottom: 1px solid var(--rule); }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; gap: 32px; } }

form.panel { background: var(--navy-2); border: 1px solid var(--rule); padding: 32px; }
@media (max-width: 480px) { form.panel { padding: 24px 20px; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.98rem; margin-bottom: 8px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--text);
  background: var(--navy); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 14px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 16px 0 0; min-height: 1.6em; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--red); }
form.panel .btn { width: 100%; font-size: 1.05rem; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 56px 0 40px; color: var(--muted); font-size: 0.98rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.footer-grid p { max-width: 46ch; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; align-content: start; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.92rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: flex; align-items: center; }
