/* Capstone 2026 – v8 Montessori page (/montessori/?calm on staging, 11/09).
   All of the page's parts come from the v7 page (assets/mosaic-m8.css = mosaic.css scoped to .m8x). This file puts
   them in the playful design: its two fonts, the flat gold buttons, white cards with a light outline and a soft lift,
   color bands with logo shards along their edge, and the playful header, footer and tour form around the page.
   Loaded after style-v8.css, mosaic-m8.css and v8.css. */

/* ---------- Tokens: the v7 parts take the playful fonts, colors and shadows ---------- */
.m8x {
  --serif: var(--head);
  --sans: var(--body);
  --bg: var(--cream);
  --bg-2: #fff4de;
  --sand: #f6ead2;
  --ink: #163452;
  --ink-2: #3d5166;
  --ink-3: #6a7b8e;
  --line: rgba(22, 52, 82, .12);
  --r: 28px;
  --r-sm: 20px;
  --sh-sm: 0 0 0 2px rgba(22, 52, 82, .07), 0 4px 0 rgba(22, 52, 82, .05), 0 16px 28px -20px rgba(22, 52, 82, .42);
  --sh: 0 0 0 2px rgba(22, 52, 82, .08), 0 5px 0 rgba(22, 52, 82, .06), 0 24px 40px -24px rgba(22, 52, 82, .5);
  --hdr: 86px;
  background: var(--cream);
  color: var(--ink-2);
  font: 600 17px/1.6 var(--body);
  overflow-x: clip; /* not hidden: a scroll box would stop the chapter bar from sticking under the header */
}
html:has(.m8x) { scroll-padding-top: 160px; }
.m8x .wrap { width: auto; } /* the playful .wrap: same width and side margins as the header and footer */
.m8x .chnav-in { max-width: var(--wrap); padding: 10px 28px; }

/* The playful stylesheet has parts with the same class names; these keep them out of the v7 parts. */
:where(.m8x) .rv { transform: none; }
:where(.m8x) .ap { margin-top: 0; max-width: none; }
:where(.m8x) .facts li::before { content: none; }
:where(.m8x) .facts li { font-weight: 600; }
:where(.m8x) .plan { display: block; background: none; border-radius: 0; padding: 0; transition: none; }
:where(.m8x) .plan:hover { transform: none; }
:where(.m8x) .plan b { font: inherit; letter-spacing: inherit; color: inherit; margin-top: 0; }
:where(.m8x) .plan p { margin: 0; }
:where(.m8x) .mt-n { border: 0; }
:where(.m8x) .mv { border: 0; }
:where(.m8x) .mv-kick { padding: 0; border: 0; border-radius: 0; background: none; }
:where(.m8x) .t-sky { --d: initial; }

/* ---------- Type: Bricolage headings, Nunito text ---------- */
.m8x h1, .m8x h2, .m8x h3, .m8x h4 { font-family: var(--head); font-weight: 800; font-variation-settings: "opsz" 96; color: var(--ink); letter-spacing: -.015em; line-height: 1.08; }
.m8x h1 { font-size: clamp(46px, 5.6vw, 80px); line-height: .98; letter-spacing: -.028em; }
.m8x h2 { font-size: clamp(36px, 4.3vw, 60px); line-height: 1; letter-spacing: -.025em; }
.m8x .m-hero h1 { font-size: clamp(46px, 5.4vw, 76px); }
.m8x .sub-head h3 { font-size: clamp(26px, 2.4vw, 32px); }
.m8x .lede, .m8x .ch-lede { color: var(--ink-2); }
.m8x .facts b, .m8x .card-n, .m8x .mt-n, .m8x .sp-val, .m8x .study-num, .m8x .glance b,
.m8x .ap-cards b, .m8x .path b, .m8x .myth-f b, .m8x .m-classes b, .m8x .read-body b { font-weight: 800; }
.m8x .glance b { font-size: 18px; letter-spacing: -.01em; }
.m8x .facts b { letter-spacing: -.03em; }
.m8x .tpl-say { font: 800 20px/1.35 var(--body); }
.m8x .m-quote p { font: 800 21px/1.3 var(--head); font-style: normal; letter-spacing: -.01em; }
.m8x .mosaic-art .m-quote p { font-size: 19px; }
.m8x .mv p { font: 700 18.5px/1.6 var(--body); }
.m8x .mv-slogan { font: 800 clamp(26px, 3vw, 40px)/1.1 var(--head); font-style: normal; letter-spacing: -.02em; }
.m8x .scrib path { stroke: var(--sc, var(--sun)); }

/* Chapter labels look like the playful pills: white, a soft lift, the number in a logo color */
.m8x .kick { padding: 8px 16px 8px 9px; background: #fff; color: var(--ink); font: 800 14px/1 var(--body); letter-spacing: .01em; box-shadow: 0 3px 0 rgba(22, 52, 82, .1), inset 0 0 0 1.5px rgba(22, 52, 82, .06); }
.m8x .kick-n { width: 24px; height: 24px; font-size: 12.5px; }
.m8x .band-blue .kick { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }

/* ---------- Buttons: the playful ones (flat logo gold, white) ---------- */
.m8x .btn { min-height: 58px; padding: 0 28px; border: 0; border-radius: 999px; font: 800 17px/1 var(--body); color: var(--ink); transition: transform .25s var(--pop), box-shadow .2s, background-color .2s; }
.m8x .btn:hover { animation: jelly .55s; transform: none; }
.m8x .btn:active { animation: none; transform: translateY(4px); }
.m8x .btn .arr { width: 19px; height: 19px; }
.m8x .btn-main, .m8x .btn-honey { background: #f2b630; color: var(--ink); box-shadow: 0 4px 0 #cf9411; }
.m8x .btn-main:hover, .m8x .btn-honey:hover { background: #f5c04b; color: var(--ink); box-shadow: 0 4px 0 #cf9411; }
.m8x .btn-main:active, .m8x .btn-honey:active { box-shadow: 0 0 0 #cf9411; }
.m8x .btn-line { background: #fff; color: var(--ink); box-shadow: 0 4px 0 #e5ddcc, inset 0 0 0 1.5px rgba(22, 52, 82, .1); }
.m8x .btn-line:hover { background: #fff; color: var(--ink); border-color: transparent; box-shadow: 0 4px 0 #e5ddcc, inset 0 0 0 1.5px rgba(22, 52, 82, .16); }
.m8x .btn-line:active { box-shadow: 0 0 0 #e5ddcc, inset 0 0 0 1.5px rgba(22, 52, 82, .1); }
.m8x .btn-lg { min-height: 60px; padding: 0 30px; font-size: 17.5px; }
.m8x .link-arrow { color: var(--sky-d); font-weight: 800; }
.m8x .link-arrow:hover { color: var(--ink); }
/* small buttons inside the two materials to try */
.m8x .demo-reset, .m8x .demo-next { border: 0; background: #fff; color: var(--ink); box-shadow: 0 3px 0 #e5ddcc, inset 0 0 0 1.5px rgba(22, 52, 82, .12); transition: transform .25s var(--pop), background-color .2s; }
.m8x .demo-reset:hover, .m8x .demo-next:hover { background: #fff8e6; color: var(--ink); animation: jelly .55s; }
.m8x .demo-next { background: #f2b630; box-shadow: 0 3px 0 #cf9411; }
.m8x .demo-next:hover { background: #f5c04b; }
.m8x .tpl-answers button { border: 0; box-shadow: 0 3px 0 #e5ddcc, inset 0 0 0 1.5px rgba(22, 52, 82, .12); }

/* Tabs, chapter bar and topic chips: the playful pills */
.m8x .tab-row, .m8x .path-tabs { box-shadow: 0 3px 0 rgba(22, 52, 82, .07), inset 0 0 0 1.5px rgba(22, 52, 82, .07); }
.m8x .tab, .m8x .pt { font-weight: 800; }
.m8x .tab:hover, .m8x .chnav a:hover { background: #fff1cf; }
.m8x .tab.on { background: var(--sky); color: #fff; }
.m8x .chnav { top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--hdr)); background: rgba(255, 247, 232, .95); border-color: rgba(22, 52, 82, .08); }
.m8x .chnav a { font-weight: 800; color: var(--ink-2); }
.m8x .chnav a i { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(22, 52, 82, .12); }
.m8x .chnav a.on { background: var(--sky); color: #fff; }
.m8x .chnav a.on i { background: #f2b630; color: var(--ink); box-shadow: none; }
.m8x .ptab { border: 0; box-shadow: 0 3px 0 rgba(22, 52, 82, .07), inset 0 0 0 1.5px rgba(22, 52, 82, .1); font-weight: 800; }
.m8x .ptab:hover { transform: translateY(-2px) rotate(-1deg); }
.m8x .ptab.on { box-shadow: 0 3px 0 rgba(22, 52, 82, .12); }

/* ---------- Cards: playful hovers ---------- */
.m8x .card, .m8x .method li, .m8x .facts li, .m8x .glance li, .m8x .read, .m8x .study { transition: transform .35s var(--pop), box-shadow .3s; }
.m8x .card:hover { transform: translateY(-6px) rotate(-1deg); }
.m8x .card:nth-child(even):hover { transform: translateY(-6px) rotate(1deg); }
.m8x .method li:hover { transform: translateY(-4px) rotate(-.5deg); }
.m8x .study:hover { transform: translateY(-4px); }
.m8x .read:hover { transform: translateY(-6px) rotate(-.8deg); }
.m8x .card-ico, .m8x .mt-n { transition: transform .35s var(--pop); }
.m8x .card:hover .card-ico, .m8x .method li:hover .mt-n { transform: rotate(-8deg) scale(1.1); }
.m8x .mt-n { background: var(--sun-tint); color: var(--ink); }
.m8x .method li:nth-child(4n+2) .mt-n { background: var(--berry-tint); color: var(--berry-d); }
.m8x .method li:nth-child(4n+3) .mt-n { background: var(--leaf-tint); color: #157a45; }
.m8x .method li:nth-child(4n) .mt-n { background: var(--sky-tint); color: var(--sky-d); }

/* Photos: white frames like the rest of the playful pages */
.m8x .mt-a, .m8x .mt-c, .m8x .zp-ph { box-shadow: 0 0 0 6px #fff, 0 16px 30px -18px rgba(22, 52, 82, .5); }
.m8x .mt { overflow: hidden; }
.m8x .mosaic-art { padding: 6px; }
.m8x .mosaic-art .m-quote { background: var(--leaf-tint); }

/* ---------- Sections: cream page, color bands with logo shards along the top ---------- */
.m8x .m-ch.alt { position: relative; isolation: isolate; }
.m8x #why-m.alt { background: var(--sky-tint); }
.m8x #try.alt { background: var(--sun-tint); }
.m8x #ages.alt { background: var(--leaf-tint); }
.m8x #read.alt { background: var(--berry-tint); }
.m8x .band-blue { background: var(--sky-d); }
.m8x .m-ch > .edge { z-index: 4; }
.m8x #what { padding-top: 84px; }

/* ---------- Side by side (the same cards as the home page) ---------- */
.m8x .sub-head#compare { scroll-margin-top: 170px; }
.m8x .vs8 { margin-top: 8px; }
.m8x .vs8-badge { font-weight: 800; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .m8x { --hdr: 72px; } /* the playful header is 72px tall on phones, 86px from 641px up */
  html:has(.m8x) { scroll-padding-top: 136px; }
  .m8x .chnav-in { padding: 8px 20px; }
  .m8x h1, .m8x .m-hero h1 { font-size: clamp(40px, 11.5vw, 54px); }
  .m8x h2 { font-size: clamp(31px, 8.6vw, 40px); }
  .m8x .btn { min-height: 54px; padding: 0 22px; font-size: 16px; }
  .m8x .btn-lg { min-height: 56px; }
  .m8x .m-hero .ctas .btn { flex: 1 1 100%; }
  .m8x .mosaic-art .m-quote p { font-size: 14.5px; }
  .m8x .m-ch { padding: 64px 0; }
  .m8x #what { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .m8x .btn:hover, .m8x .demo-reset:hover, .m8x .demo-next:hover { animation: none; }
}

/* Mission band: no floating shards over the heading (the band edge has its own) */
.m8x .fsh-wrap, .m8x .band > .fsh { display: none; }
/* Phone numbers never break across lines */
.m8x a[href^="tel:"] { white-space: nowrap; }

/* What is Montessori: Maria Montessori's words (moved here from the old hero, 11/09) */
.m8x .m8-quote { margin: 26px 0 0; padding: 18px 22px 18px 24px; border-radius: 0 22px 22px 0; background: #fff; box-shadow: inset 6px 0 0 var(--sun), var(--sh-sm); }
.m8x .m8-quote p { margin: 0; font: 800 clamp(19px, 1.7vw, 22px)/1.3 var(--head); letter-spacing: -.01em; color: var(--ink); }
.m8x .m8-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 14px; color: var(--ink-3); }

/* 11/11 (user: fold or drop what repeats on phones): the four number tiles under "What is Montessori?"
   say the same as the four tiles in the page header (five areas, 4 classes, from 6 weeks) */
@media (max-width: 640px) {
  .m8x #what .facts { display: none; }
}

/* 11/11: clips over the area photos; the pause button goes top right, the caption has the bottom */
.m8x .zp-clip img, .m8x .zp-clip .vp { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m8x .zp-clip figcaption { z-index: 2; }
.m8x .zp-clip .vid-btn { top: 12px; bottom: auto; right: 12px; }
