/* C.M.I. Education Policy page. The hero banner comes from about.css (same as the other inner pages).
   Every class here starts with cp- so no other page is touched. */

.cp { padding-block: var(--section); background: linear-gradient(180deg, var(--base) 0%, var(--flame-tint) 100%); }

/* the opening statement: large display type with a gold line down its side */
.cp-intro { max-width: 60rem; margin: 0 0 clamp(2.5rem, 1.5rem + 4vw, 5rem); padding-left: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); border-left: 3px solid var(--flame); font-family: var(--display); font-size: clamp(1.5rem, 1.05rem + 1.8vw, 2.6rem); font-weight: 310; line-height: 1.3; letter-spacing: -0.015em; color: var(--maroon); text-wrap: pretty; }

/* the points: numbered cards, two columns */
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 0.5rem + 2vw, 2rem); margin: 0; padding: 0; list-style: none; }
.cp-card { position: relative; padding: clamp(1.5rem, 1.1rem + 2vw, 2.75rem); padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); border: 1px solid var(--line); border-top: 4px solid var(--flame); border-radius: 1.25rem; background: #fff; box-shadow: 0 1.75rem 3.5rem -2.5rem rgba(12, 74, 143, 0.4); }
.cp-card__no { position: absolute; top: 1rem; right: 1.25rem; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--amber); }
.cp-card__title { margin: 0 0 0.85rem; font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; color: var(--maroon); }
.cp-card__text { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.cp-card:last-child:nth-child(odd) { grid-column: 1 / -1; background: linear-gradient(160deg, var(--band) 0%, var(--footer) 100%); border-color: transparent; border-top-color: var(--flame); }
.cp-card:last-child:nth-child(odd) .cp-card__title { color: var(--flame); }
.cp-card:last-child:nth-child(odd) .cp-card__text { max-width: 54rem; color: var(--base); }
@media (max-width: 800px) { .cp-grid { grid-template-columns: minmax(0, 1fr); } }

/* the CMI network, as a path of learning: the heading centred, then the figures in order (kindergartens to universities)
   as steps along a gold line, six to a row on wide screens. Each step: a ringed node on the line, a serif number that
   counts up, the words in small capitals. On phones the line runs down the left side. */
.cp-net { position: relative; isolation: isolate; overflow: clip; padding-block: var(--section); border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--base) 0%, var(--flame-tint) 100%); }
.cp-net::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -18rem; width: min(90vw, 900px); aspect-ratio: 1; margin-left: max(-45vw, -450px); pointer-events: none; --mx: 50%; --my: 50%; background-image: var(--rings);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%); mask-image: radial-gradient(circle, #000 0%, transparent 62%); }
.cp-net__head .h2 { margin-bottom: 1.25rem; }
.cp-net__head .section-head__text { max-width: 40rem; }

.cp-net__path { --per: 6; display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); row-gap: clamp(2.5rem, 2rem + 2vw, 3.75rem); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.cp-net__step { position: relative; display: grid; justify-items: center; align-content: start; gap: 0.55rem; padding: 2.4rem 0.6rem 0; text-align: center; }
/* the line, broken only at the two ends of each row */
.cp-net__step::before { content: ""; position: absolute; top: 0.6rem; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, rgba(254, 182, 40, 0.55), var(--flame), rgba(254, 182, 40, 0.55)); }
.cp-net__step:nth-child(6n + 1)::before { left: 50%; }
.cp-net__step:nth-child(6n)::before, .cp-net__step:last-child::before { right: 50%; }
/* the node */
.cp-net__step::after { content: ""; position: absolute; top: 0; left: 50%; width: 1.25rem; height: 1.25rem; margin-left: -0.625rem; border: 2px solid var(--maroon); border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px var(--base); transition: background-color 0.3s, transform 0.4s var(--ease); }
.cp-net__step:hover::after { background: var(--flame); transform: scale(1.2); }
.cp-net__num { font-family: var(--display); font-size: clamp(2.1rem, 1.5rem + 1.8vw, 3.25rem); font-weight: 300; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; color: var(--maroon); }
.cp-net__label { max-width: 10rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; line-height: 1.5; text-transform: uppercase; color: var(--text); }

/* tablets: three steps to a row */
@media (max-width: 1100px) {
  .cp-net__path { --per: 3; }
  .cp-net__step:nth-child(6n + 1)::before { left: 0; }
  .cp-net__step:nth-child(6n)::before { right: 0; }
  .cp-net__step:nth-child(3n + 1)::before { left: 50%; }
  .cp-net__step:nth-child(3n)::before, .cp-net__step:last-child::before { right: 50%; }
}
/* phones: one line down the left side, each step a row */
@media (max-width: 600px) {
  .cp-net__path { --per: 1; row-gap: 0; position: relative; }
  .cp-net__path::before { content: ""; position: absolute; top: 0.9rem; bottom: 0.9rem; left: 0.6rem; width: 2px; background: var(--flame); }
  .cp-net__step { grid-template-columns: 4.75rem minmax(0, 1fr); justify-items: start; align-items: center; gap: 0.75rem; padding: 0.7rem 0 0.7rem 2.25rem; text-align: left; }
  .cp-net__step::before, .cp-net__step:nth-child(n)::before { display: none; }
  .cp-net__step::after { top: 50%; left: 0; margin: -0.625rem 0 0; }
  .cp-net__num { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .cp-net__step::after { transition: none; } }
