/* ============================================================
   INS-247 - maturity.network home page, chapters build.
   Scoped entirely to .mnc-. Adds no element selectors, so it
   cannot reach the shared shell in header.mn-gbar / footer.mn-foot.
   Colour, radius and type come from /css/tokens_v2.css; dark is
   inherited from its prefers-color-scheme block, so nothing here
   declares a colour literal except the two brand accents.
   Container matches .mn-shell-in exactly so chapter content lines
   up with the lockup above it and the footer columns below.
   ============================================================ */

/* 44px sticky chapter bar + air. The global bar is position:relative
   (shell.css, height 64px) and scrolls away, so it needs no clearance. */
.mnc section[id],
.mnc #transform { scroll-margin-top: 68px; }

.mnc { display: block; background: var(--page); }

.mnc-in {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 30px);
}

.mnc-eyb {
  display: block;
  font-family: var(--f-data), Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
}

/* arrows travel on hover; never decorative, always on a link */
.mnc-aw { display: inline-block; transition: transform .28s ease; }
.mnc-door:hover .mnc-aw,
.mnc-cta:hover .mnc-aw,
.mnc-bar a:hover .mnc-aw { transform: translateX(10px); }

.mnc-cta {
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* ---------- hero ---------- */
.mnc-hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  background: var(--page);
}
.mnc-hero-top { flex: 0 0 auto; padding-top: 56px; }

.mnc-h1 {
  margin: 0;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 9.2vw, 132px);
  line-height: .9;
  letter-spacing: -.048em;
  color: var(--ink);
}
.mnc-dot {
  display: inline-block;
  width: .15em;
  height: .15em;
  background: var(--afftile);
  margin-left: .06em;
  vertical-align: baseline;
}
.mnc-lede {
  margin: 26px 0 0 0;
  padding-left: clamp(9px, 2.1vw, 34px);
  font-size: clamp(19px, 2.2vw, 31px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--muted);
}
.mnc-hero-gap { flex: 0 0 auto; height: 54px; }

/* the doors stretch to the fold; the air sits inside each column,
   under the arrow, so the headline pair stays put */
.mnc-doors-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mnc-doors-wrap > .mnc-in { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mnc-doors {
  flex: 1 1 auto;
  min-height: 0;
  margin-inline: calc(clamp(16px, 3vw, 30px) * -1);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
}
.mnc-door {
  background: var(--page);
  min-height: 212px;
  padding: 0 clamp(16px, 3vw, 30px) 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  color: var(--ink);
  transition: background-color .24s ease;
}
.mnc-door:hover { background: var(--surface); color: var(--ink); }
.mnc-door-bar { display: block; width: 0; height: 4px; background: var(--afftile); transition: width .3s ease; }
.mnc-door:hover .mnc-door-bar { width: 56px; }
.mnc-door .mnc-eyb { padding-top: 22px; }
.mnc-door-name {
  display: block;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 2.7vw, 38px);
  letter-spacing: -.035em;
  line-height: 1;
}
.mnc-door-sub {
  display: block;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 30ch;
}
.mnc-door .mnc-aw { margin-top: 16px; font-size: 22px; }

/* ---------- chapter bar: tier-2 sticky, the shell.css pattern ---------- */
.mnc-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--page);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.mnc-bar.is-stuck { opacity: 1; transform: none; pointer-events: auto; box-shadow: var(--shadow-strip); }
.mnc-bar-in { display: flex; align-items: center; gap: 30px; min-height: 44px; overflow-x: auto; }
.mnc-bar a {
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding-block: 11px;
}
.mnc-bar a:hover,
.mnc-bar a.is-cur { color: var(--ink); }
.mnc-bar a.is-cur .mnc-tick { opacity: 1; }
.mnc-tick {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 9px;
  background: var(--afftile);
  opacity: 0;
  transition: opacity .25s ease;
}

/* ---------- chapters ---------- */
.mnc-ch { position: relative; overflow: hidden; background: var(--page); }
.mnc-ch-alt { background: var(--surface); border-top: 1px solid var(--line); }
.mnc-ch > .mnc-in { position: relative; z-index: 1; padding-block: 92px 88px; }

.mnc-ghost {
  position: absolute;
  right: clamp(16px, 3vw, 30px);
  top: 70px;
  z-index: 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(140px, 24vw, 292px);
  letter-spacing: -.06em;
  line-height: .8;
  color: var(--grid);
  user-select: none;
  pointer-events: none;
}
.mnc-h2 {
  margin: 16px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 7vw, 100px);
  line-height: .94;
  letter-spacing: -.045em;
  color: var(--ink);
}
.mnc-stand {
  margin: 22px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.1vw, 29px);
  line-height: 1.25;
  letter-spacing: -.02em;
  max-width: 24ch;
  color: var(--ink);
}
.mnc-intro { margin: 18px 0 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 62ch; }

.mnc-trio {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 36px;
}
.mnc-item { border-top: 1px solid var(--ink); padding-top: 18px; }
.mnc-item h3 {
  margin: 12px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.028em;
  line-height: 1.15;
  color: var(--ink);
}
.mnc-item p { margin: 10px 0 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); }

.mnc-foot-row {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 36px;
}
.mnc-foot-row p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 56ch; }
.mnc-foot-row .mnc-cta { font-size: 20px; white-space: nowrap; }

/* ---------- chapter 03 rides the affiliate token, which has its own dark value ---------- */
.mnc-aff { background: var(--affiliate); }
.mnc-aff .mnc-eyb { color: var(--affink); }
.mnc-aff .mnc-h2,
.mnc-aff .mnc-stand,
.mnc-aff .mnc-item h3,
.mnc-aff .mnc-cta { color: var(--ink); }
.mnc-aff .mnc-intro,
.mnc-aff .mnc-item p,
.mnc-aff .mnc-body { color: var(--affink); }
.mnc-aff .mnc-item { border-top-color: var(--affline); }
.mnc-aff .mnc-ghost { color: color-mix(in srgb, var(--affink) 14%, var(--affiliate)); }
.mnc-chip {
  font-family: var(--f-data), Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--affink);
  border: 1px solid var(--affline);
  border-radius: var(--r-chip);
  padding: 7px 12px;
}
.mnc-split {
  margin-top: 56px;
  border-top: 1px solid var(--affline);
  padding-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 60px;
}
.mnc-split h3 {
  margin: 16px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -.032em;
  color: var(--ink);
}
.mnc-split .mnc-cta { display: inline-block; margin-top: 24px; font-size: 20px; }
.mnc-body { margin: 0; font-size: 16px; line-height: 1.6; }
.mnc-body + .mnc-body { margin-top: 14px; }
.mnc-punch { margin: 18px 0 0 0; font-size: 16px; line-height: 1.6; font-weight: 600; color: var(--ink); }
.mnc-chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 10px; }

/* ---------- peer snapshot ---------- */
.mnc-panel {
  margin-top: 52px;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 30px 32px;
}
.mnc-panel h3 {
  margin: 10px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.028em;
  line-height: 1.15;
  color: var(--ink);
}
.mnc-pair {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 34px 56px;
}
.mnc-mhead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.mnc-mname { font-family: var(--f-display), Arial, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.mnc-mdom { font-size: 13px; color: var(--soft); }

.mnc-track { position: relative; height: 11px; margin-top: 26px; background: var(--track); border-radius: 8px; }
.mnc-band { position: absolute; top: 0; height: 11px; border-radius: 8px; background: var(--band); }
.mnc-avg {
  position: absolute; top: -5px; margin-left: -10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--page);
  border: 2px solid var(--raccoon);
}
.mnc-you {
  position: absolute; top: -5px; left: 75%; margin-left: -10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px dashed var(--soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-data), Arial, sans-serif;
  font-size: 11px; font-weight: 700; color: var(--soft);
}
.mnc-axis {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-family: var(--f-data), Arial, sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--data-label);
}
.mnc-note { margin: 14px 0 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.mnc-panel-foot {
  margin-top: 24px;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 14px 24px;
}
.mnc-panel-foot p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--soft); max-width: 52ch; }
.mnc-scale { display: flex; align-items: center; gap: 9px; flex: none; }
.mnc-scale .mnc-eyb { font-size: 10px; }

/* five levels, or the same figures x20 for executive reporting */
.mnc-seg { display: inline-flex; align-items: stretch; border: 1px solid var(--inputline); border-radius: var(--r-pill); overflow: hidden; flex: none; }
.mnc-seg button {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--f-data), Arial, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted);
  padding: 0 11px;
  min-height: 26px;
  cursor: pointer;
}
/* the pill stays small; the tap target does not */
.mnc-seg button::after { content: ""; position: absolute; inset: -10px 0; }
.mnc-seg button:hover { color: var(--ink); }
.mnc-seg button.is-on { background: var(--ink); color: var(--page); }

/* ---------- closing band inverts on --raccoon, the production pattern ---------- */
.mnc-close { background: var(--raccoon); color: var(--page); }
.mnc-close > .mnc-in { padding-block: 88px 92px; }
.mnc-close a { color: var(--page); }
.mnc-close a:hover { color: color-mix(in srgb, var(--page) 72%, transparent); }
.mnc-close .mnc-eyb { color: color-mix(in srgb, var(--page) 70%, transparent); }
.mnc-close h2 {
  margin: 22px 0 0 0;
  font-family: var(--f-display), Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -.04em;
  max-width: 18ch;
  color: var(--page);
}
.mnc-close .mnc-body { margin: 22px 0 0 0; font-size: 18px; line-height: 1.55; max-width: 56ch; color: color-mix(in srgb, var(--page) 82%, transparent); }
.mnc-close .mnc-two { margin: 26px 0 0 0; font-size: 17px; line-height: 1.5; font-weight: 700; max-width: 56ch; color: var(--page); }
.mnc-close .mnc-two-sub { margin: 8px 0 0 0; font-size: 16px; line-height: 1.55; max-width: 60ch; color: color-mix(in srgb, var(--page) 82%, transparent); }
.mnc-close .mnc-cta { color: var(--page); font-size: 20px; }
.mnc-close-row { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px 40px; }
.mnc-already { font-size: 15px; color: color-mix(in srgb, var(--page) 82%, transparent); }
.mnc-already a { font-weight: 700; }

/* ---------- the page arrives once, on load ---------- */
.mnc-a-grow { display: grid; grid-template-columns: 0fr; animation: mncGrow .52s cubic-bezier(.22,.9,.24,1) 1.16s forwards; }
.mnc-a-grow > span { overflow: hidden; white-space: nowrap; min-width: 0; }
.mnc-a-alone { display: block; opacity: 0; transform: translateY(18px); animation: mncRise .54s cubic-bezier(.19,1,.22,1) forwards; }
.mnc-a-dot { opacity: 0; transform: scale(.25); animation: mncPop .30s cubic-bezier(.22,.9,.24,1) 1.64s forwards; }
.mnc-a-sub { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(10px); animation: mncWipe .52s cubic-bezier(.22,.9,.24,1) 1.58s forwards; }
.mnc-a-doors { opacity: 0; transform: translateY(44px); animation: mncRise .62s cubic-bezier(.19,1,.22,1) 1.70s forwards; }
@keyframes mncRise { to { opacity: 1; transform: translateY(0); } }
@keyframes mncGrow { to { grid-template-columns: 1fr; } }
@keyframes mncPop  { to { opacity: 1; transform: scale(1); } }
@keyframes mncWipe { to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); } }

.mnc-ch:target > .mnc-in { animation: mncFade .55s cubic-bezier(.19,1,.22,1); }
@keyframes mncFade { from { opacity: .2; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .mnc-ghost { display: none; }
  .mnc-ch > .mnc-in { padding-block: 64px 60px; }
  .mnc-hero-top { padding-top: 36px; }
  .mnc-hero-gap { height: 34px; }
  .mnc-panel { padding: 22px 20px; }
  /* the 56px under each arrow fills the desktop fold; stacked on a phone it is just three gaps */
  .mnc-door { min-height: 0; padding-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .mnc-a-alone, .mnc-a-dot, .mnc-a-sub, .mnc-a-doors { animation: none; opacity: 1; transform: none; clip-path: none; }
  .mnc-a-grow { animation: none; grid-template-columns: 1fr; }
  .mnc-ch:target > .mnc-in { animation: none; }
  .mnc-aw, .mnc-door, .mnc-door-bar, .mnc-bar { transition: none; }
}

/* anchor jumps glide rather than cut; only this page loads this file */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
