/*
 * Phones only. This file loads with media="(max-width: 760px)".
 *
 * Nothing here changes what the pages say. A script in main.js wraps stacked
 * cards into swipe rows, turns long lists into tap-to-open rows and adds small
 * animated graphics. With scripts off, the pages show as they did before.
 */

/* ---- Rhythm: a little tighter, so more than one idea fits a screen ---- */
.m-on .hm-section { padding-block: 2.75rem; }
.m-on .hm-head h2 { font-size: 2.05rem; }
.m-on .hm-head p { font-size: 1rem; }

/* ---- Swipe rows ---- */
.m-on .m-swipe { display: flex; grid-template-columns: none; gap: .75rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: none; margin: 1.25rem -1rem 0; padding: .25rem 1rem .5rem; scroll-padding-inline: 1rem; border: 0; border-radius: 0; background: none; }
.m-on .m-swipe::-webkit-scrollbar { display: none; }
.m-on .m-swipe > * { flex: 0 0 82%; max-width: 21rem; scroll-snap-align: start; margin: 0; }
.m-on .m-swipe > .hm-plan, .m-on .m-swipe > .hm-fit-col, .m-on .m-swipe > .hm-step { flex-basis: 86%; }
.m-on .m-swipe:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -2px; }
.m-on .m-swipe::after { content: none; }

.m-dots { display: flex; justify-content: center; align-items: center; gap: .4rem; height: 1.5rem; margin-top: .25rem; }
.m-dots i { width: .4rem; height: .4rem; border-radius: 999px; background: #C9C5E6; transition: width .25s ease, background-color .25s ease; }
.m-dots i.is-on { width: 1.35rem; background: var(--c-ink); }

/* Cards that had no box of their own get one. */
.m-on .m-swipe > .c-col,
.m-on .m-swipe > .c-term,
.m-on .m-swipe > .c-track-item,
.m-on .m-swipe > .c-ladder-col { display: block; padding: 1.1rem; border: 1px solid var(--c-border); border-radius: 22px; background: #fff; }
.m-on .m-swipe > .hm-pain-item, .m-on .m-swipe > .c-point, .m-on .m-swipe > .c-pair { padding: 1.1rem; border-radius: 22px; }
.m-on .m-swipe h3 { font-size: 1.4rem; line-height: 1.1; }
.m-on .m-swipe > * > p { font-size: .97rem; line-height: 1.5; }

/* Steps: the number and a line running on to the next card. */
.m-on .m-swipe.c-track { counter-reset: trk; }
.m-on .m-swipe > .c-track-item { position: relative; overflow: visible; }
.m-on .m-swipe > .c-track-item::before { position: static; margin-bottom: .9rem; }
.m-on .m-swipe > .c-track-item::after { content: ""; position: absolute; top: 2.45rem; left: 4.6rem; right: -.8rem; height: 2px; background: repeating-linear-gradient(90deg, #C9C5E6 0 6px, transparent 6px 12px); }
.m-on .m-swipe > .c-track-item:last-child::after { right: 1.1rem; }
.m-on .m-swipe > .c-track-item .wp-block-list { font-size: .95rem; gap: .45rem; }

/* Promises: each one its own indigo card. */
.m-on .m-swipe > .c-pledge-item { padding: 1.25rem; border: 0; border-radius: 22px; background: var(--c-ink); }
.m-on .m-swipe > .c-pledge-item .m-art { background: rgba(255, 255, 255, .09); }
.m-on .m-swipe > .c-pledge-item .m-art i { mix-blend-mode: normal; }
.m-on .m-swipe > .c-pledge-item .m-art--3 i:nth-of-type(1) { border-color: rgba(255, 255, 255, .3); }
.m-on .m-swipe > .c-pledge-item .m-art--3 i:nth-of-type(2) { background: #fff; }
.m-on .m-swipe > .c-pledge-item .m-art--5 i:nth-of-type(1) { border-color: rgba(255, 255, 255, .4); }
.m-on .m-swipe > .c-pledge-item .m-art--6 i { background: rgba(255, 255, 255, .16); }

/* Services: name, plain line, where to see it, which plan. */
.m-on .m-swipe > .c-term { position: relative; }
.m-on .m-swipe .c-term-name { font-size: 1.5rem; }
.m-on .m-swipe p.c-term-plain { margin-top: .4rem; font-size: 1rem; }
.m-on .m-swipe p.c-term-price { display: inline-block; margin-top: .9rem; }
.m-on .m-swipe p.c-term-for { margin-top: .75rem; }

/* The plan strip on service pages. */
.m-on .m-swipe.c-ladder { overflow-y: visible; }

/* ---- Small animated graphics at the top of a card ---- */
.m-art { position: relative; display: block; height: 5rem; margin-bottom: 1rem; overflow: hidden; border-radius: 16px; background: var(--tint-sky); }
.m-art i { position: absolute; display: block; }
.m-art svg { position: absolute; z-index: 1; left: 50%; top: 50%; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; color: var(--c-ink); }
.m-card:nth-child(4n+2) > .m-art { background: var(--tint-peach); }
.m-card:nth-child(4n+3) > .m-art { background: var(--tint-mint); }
.m-card:nth-child(4n) > .m-art { background: var(--tint-sun); }
.hm-pain-item > .m-art, .c-point > .m-art { background: rgba(255, 255, 255, .7); }

/* 1. Two dots that meet, like the name mark. */
.m-art--1 i { top: 1.3rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; }
.m-art--1 i:nth-of-type(1) { left: calc(50% - 2.1rem); background: var(--c-accent); animation: m-left 3.6s ease-in-out infinite alternate; }
.m-art--1 i:nth-of-type(2) { left: calc(50% - .3rem); background: var(--c-peri); mix-blend-mode: multiply; animation: m-right 3.6s ease-in-out infinite alternate; }
.m-art--1 i:nth-of-type(3) { display: none; }
@keyframes m-left { to { transform: translateX(-.55rem); } }
@keyframes m-right { to { transform: translateX(.55rem); } }

/* 2. Bars that rise. */
.m-art--2 i { bottom: 1rem; width: .9rem; border-radius: .3rem .3rem 0 0; transform-origin: 50% 100%; animation: m-grow 2.8s ease-in-out infinite alternate; }
.m-art--2 i:nth-of-type(1) { left: calc(50% - 1.9rem); height: 1.3rem; background: var(--c-peri); }
.m-art--2 i:nth-of-type(2) { left: calc(50% - .45rem); height: 2.1rem; background: var(--c-primary); animation-delay: .3s; }
.m-art--2 i:nth-of-type(3) { left: calc(50% + 1rem); height: 3rem; background: var(--c-accent); animation-delay: .6s; }
@keyframes m-grow { from { transform: scaleY(.45); } to { transform: scaleY(1); } }

/* 3. A dot in orbit. */
.m-art--3 i { top: calc(2.5rem - .35rem); left: calc(50% - .35rem); width: .7rem; height: .7rem; border-radius: 50%; }
.m-art--3 i:nth-of-type(1) { top: 1rem; left: calc(50% - 1.5rem); width: 3rem; height: 3rem; border: 2px solid rgba(29, 23, 80, .2); }
.m-art--3 i:nth-of-type(2) { background: var(--c-ink); }
.m-art--3 i:nth-of-type(3) { background: var(--c-accent); animation: m-orbit 4.5s linear infinite; }
@keyframes m-orbit { from { transform: rotate(0deg) translateX(1.5rem); } to { transform: rotate(360deg) translateX(1.5rem); } }

/* 4. A pin that pings. */
.m-art--4 i { top: calc(2.5rem - .5rem); left: calc(50% - .5rem); width: 1rem; height: 1rem; border-radius: 50%; }
.m-art--4 i:nth-of-type(1) { background: var(--c-accent); }
.m-art--4 i:nth-of-type(2), .m-art--4 i:nth-of-type(3) { border: 2px solid var(--c-accent); animation: m-ping 2.6s ease-out infinite; }
.m-art--4 i:nth-of-type(3) { animation-delay: 1.3s; }
@keyframes m-ping { from { transform: scale(1); opacity: .75; } to { transform: scale(4.4); opacity: 0; } }

/* 5. A dot that travels a dotted line. */
.m-art--5 i:nth-of-type(1) { top: 2.45rem; left: 18%; right: 18%; border-top: 2px dashed rgba(29, 23, 80, .3); }
.m-art--5 i:nth-of-type(2) { top: 2.05rem; right: calc(18% - .45rem); width: .9rem; height: .9rem; border-radius: 50%; background: var(--c-peri); }
.m-art--5 i:nth-of-type(3) { top: 2.1rem; left: 18%; width: .8rem; height: .8rem; margin-left: -.4rem; border-radius: 50%; background: var(--c-accent); animation: m-travel 3.4s ease-in-out infinite; }
@keyframes m-travel { 0% { left: 18%; } 80%, 100% { left: 82%; } }

/* 6. Lines that fill in, one after another. */
.m-art--6 i { left: 24%; height: .55rem; overflow: hidden; border-radius: 999px; background: rgba(29, 23, 80, .13); }
.m-art--6 i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; transform-origin: 0 50%; animation: m-fill 3.2s ease-in-out infinite; }
.m-art--6 i:nth-of-type(1) { top: 1.3rem; width: 52%; }
.m-art--6 i:nth-of-type(2) { top: 2.2rem; width: 40%; }
.m-art--6 i:nth-of-type(3) { top: 3.1rem; width: 46%; }
.m-art--6 i:nth-of-type(1)::after { background: var(--c-peri); }
.m-art--6 i:nth-of-type(2)::after { background: var(--c-accent); animation-delay: .45s; }
.m-art--6 i:nth-of-type(3)::after { background: var(--c-green); animation-delay: .9s; }
@keyframes m-fill { 0% { transform: scaleX(0); } 45%, 100% { transform: scaleX(1); } }

/* A service's own icon, with a dot going round it. */
.m-art--icon i { top: calc(2.5rem - .3rem); left: calc(50% - .3rem); width: .6rem; height: .6rem; border-radius: 50%; }
.m-art--icon i:nth-of-type(1) { top: 1rem; left: calc(50% - 1.5rem); width: 3rem; height: 3rem; background: #fff; }
.m-art--icon i:nth-of-type(2) { background: var(--c-accent); animation: m-orbit 5s linear infinite; }
.m-art--icon i:nth-of-type(3) { display: none; }

/* A wider one above a list. */
.m-art--wide { height: 5.5rem; margin: 1.25rem 0 .25rem; background: var(--tint-sky); }
.m-art--wide::before, .m-art--wide::after { content: ""; position: absolute; top: 1.5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.m-art--wide::before { left: 14%; background: var(--c-mint); animation: m-right 4s ease-in-out infinite alternate; }
.m-art--wide::after { right: 14%; background: var(--c-peri); opacity: .55; animation: m-left 4s ease-in-out infinite alternate; }
.m-art--wide i { top: calc(2.75rem - .5rem); }

/* ---- Tap-to-open rows ---- */
.m-on .m-acc { counter-reset: acc; margin-top: .25rem; border-top: 0; }
.m-on .m-acc > .c-term { display: block; padding: 0; border-bottom: 1px solid var(--c-border); background: none; counter-increment: acc; }
.m-on .m-acc .c-term-name { margin: 0; font-size: 1.3rem; line-height: 1.12; }
.m-acc-btn { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) 1.5rem; gap: .75rem; align-items: center; box-sizing: border-box; width: 100%; min-height: 3.75rem; padding: .8rem 0; border: 0; background: none; font: inherit; letter-spacing: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.m-acc-btn::before { content: counter(acc); display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--tint-sky); font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--c-ink); transition: background-color .25s ease, color .25s ease; }
.m-acc-btn::after { content: ""; justify-self: center; width: .55rem; height: .55rem; margin-top: -.25rem; border-right: 2px solid var(--c-ink); border-bottom: 2px solid var(--c-ink); transform: rotate(45deg); transition: transform .25s ease, margin-top .25s ease; }
.m-acc-btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 12px; }
.is-open > .c-term-name > .m-acc-btn::before { background: var(--c-accent); color: var(--c-on-accent); }
.is-open > .c-term-name > .m-acc-btn::after { margin-top: .25rem; transform: rotate(-135deg); }
.m-on .m-acc-body { display: grid; grid-template-rows: 0fr; visibility: hidden; padding-left: 2.85rem; transition: grid-template-rows .3s ease, visibility 0s .3s; }
.m-on .is-open > .m-acc-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .3s ease, visibility 0s; }
.m-acc-in { min-height: 0; overflow: hidden; }
.m-on .m-acc-in > :last-child { margin-bottom: 0; padding-bottom: 1rem; }
.m-on .m-acc-in p { font-size: 1rem; }

/* "See it for" opens a short list of links. */
.m-for-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-paper); font: 600 .9rem var(--font-body); color: var(--c-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.m-for-btn::after { content: ""; width: .45rem; height: .45rem; margin-top: -.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s ease, margin-top .25s ease; }
.is-open > .m-for-btn::after { margin-top: .2rem; transform: rotate(-135deg); }
.m-for-btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.m-for-links { display: none; position: relative; z-index: 1; margin-top: .6rem; line-height: 2.1; }
.is-open > .m-for-links { display: block; }

/* ---- Visitors who asked for less motion, or pressed Pause motion ---- */
.is-still .m-art *, .is-still .m-art::before, .is-still .m-art::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
	.m-art *, .m-art::before, .m-art::after, .m-art i::after { animation: none; }
	.m-on .m-swipe { scroll-behavior: auto; }
	.m-dots i, .m-acc-btn::before, .m-acc-btn::after, .m-for-btn::after, .m-on .m-acc-body { transition: none; }
}

/* ---- Short lists of jobs and places: pills that wrap, not one long column ---- */
.m-on .pg-jobs { display: flex; flex-wrap: wrap; gap: .5rem; }
.m-on .pg-jobs li { gap: .5rem; padding: .45rem .95rem .45rem .45rem; border-radius: 999px; font-size: .93rem; line-height: 1.25; }
.m-on .pg-jobs li::before { width: 28px; height: 28px; border-radius: 50%; background-size: 14px; }

/* ---- Dots on the indigo sections ---- */
.hm-steps .m-dots i, .pg-diff .m-dots i { background: rgba(255, 255, 255, .35); }
.hm-steps .m-dots i.is-on, .pg-diff .m-dots i.is-on { background: #fff; }

/* ---- The phone illustrations: a little smaller, so the words beside them
   share the screen ---- */
.m-on .fx { gap: 1.25rem; }
.m-on .fx-panel { padding: 1rem .75rem; }
.m-on .fx-panel > .xp { zoom: .8; }
.m-on .fx-copy .wp-block-list { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; font-size: .9rem; }


/* ---- Typeface (2.2.0): heading sizes on phones ---- */
.m-on body:not(.look-a) .hm-head h2 { font-size: 1.65rem; }
.m-on body:not(.look-a) .m-swipe h3 { font-size: 1.15rem; }
