/* Page CSS for the pages built on the taste kit: only what sits inside a visual, one --p-h per card group,
   the app-frame recipe, the rotating outcome and the logo set across the close. */

/* the Waltacre wordmark in the bar and the footer */
.nav__logo .brand-identity, .closing__links .brand-identity { display: inline-flex; }
.nav__logo .brand-lockup { height: 26px; width: auto; display: block; }
.closing__links .brand-lockup { height: 30px; width: auto; display: block; }
.brand-full-stop { fill: var(--p-accent); }

/* the hero: the rotating outcome sits on one line under the h1 */
.hero__rotator { margin: var(--s-4) 0 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; font-size: clamp(22px, 1.1vw + 13px, 28px); line-height: 1.25; }
.hero__rotator-lead { display: block; color: var(--p-muted); font-size: 0.72em; letter-spacing: -0.01em; margin-bottom: 2px; }
.hero__rotator-word { display: inline-block; white-space: nowrap; color: var(--p-ink); border-bottom: 2px solid var(--p-accent); padding-bottom: 2px; transition: opacity .28s ease, transform .28s ease; }
.hero__rotator-word.is-out { opacity: 0; transform: translateY(-8px); }
.hero__rotator-word.is-pre { opacity: 0; transform: translateY(8px); transition: none; }
/* the longest phrase fits the text column on one line at every width (5.8cqi holds 37 characters) */
.hero__text:has(> .hero__rotator) { container-type: inline-size; inline-size: 100%; }
.hero__rotator { font-size: min(28px, 5.8cqi); }
.hero--split .hero__lead { margin-top: var(--s-5); }
@media (min-width: 1024px) { .hero--split .hero__text { align-self: stretch; display: flex; flex-direction: column; } }
.hero__media { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.hero__media .stage { position: absolute; inset: 0; }
.ui-chat__srcimg { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }

/* app-frame (sections-library.md, app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* card groups */
#services .frame--split { --ratio: 100%; }
#outcomes .panel, #how .panel { overflow: hidden; }
#outcomes .panel { --p-h: 300px; }
#how .panel { --p-h: 300px; }
@media (max-width: 639px) { #outcomes .panel { --p-h: 112px; } #services .frame--split { --ratio: 60%; }
  .proof-figures { margin-top: var(--s-7); row-gap: var(--s-6); } .proof-figures .t-stat { font-size: 56px; margin-bottom: var(--s-2); }
  .outcome-row { margin-top: var(--s-6); } #outcomes .mo-mq__track { font-size: 16px; line-height: 1.35; row-gap: 6px; column-gap: 16px; } #outcomes .outcome-row { padding-block: 0; } }
@media (min-width: 640px) and (max-width: 1023px) { #services .frame--split { --ratio: 50%; } }
@media (max-width: 1279px) { #how { --h: 2; } }
@media (min-width: 1024px) and (max-height: 880px) { #questions { --h: 2; } }

/* the marquee of outcomes, the last row of #outcomes */
#outcomes .group { min-width: 0; }
.outcome-row { width: 100%; min-width: 0; max-width: 100%; margin-top: var(--s-7); font-family: var(--font-display); font-size: clamp(22px, 1vw + 14px, 30px); letter-spacing: -0.02em; }

/* proof figures */
.proof-figures { margin-top: var(--s-9); }
.proof-figures .t-stat { font-family: var(--font-display); font-size: clamp(72px, 8vw, 144px); line-height: 1; letter-spacing: -0.04em; margin: 0 0 var(--s-4); }
.proof-figures p:not(.t-stat) { max-width: 26ch; margin: 0; }

/* services tabs */
.services-more { margin-top: auto; }
.tabpanel p { margin: 0; }

/* about */
.about-facts { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.about-facts li { padding-bottom: var(--s-3); border-bottom: 1px solid var(--line, rgba(14,31,25,.12)); }

/* the close: the wordmark across the wrap */
.close__word--logo { margin: 0; line-height: 0; color: var(--p-ink); }
.close__word--logo .brand-identity, .close__word--logo .brand-lockup { display: block; width: 100%; height: auto; }

/* the focus ring in the ink: the signal orange is 2.9:1 on the paper */
:focus-visible { outline-color: var(--p-ink); }
.nav--tone :focus-visible, .ground-inverse :focus-visible { outline-color: var(--p-inv-ink); }

/* phone: figures stay under the h1, the steps fill their two screens */
@media (max-width: 639px) { .hero__rotator { margin-top: var(--s-3); } .hero--split .hero__lead { margin-top: var(--s-4); } .proof-figures .t-stat { font-size: 30px; } #how .panel { --p-h: 260px; } .faq__item--more { display: none; } #about .frame--split { --ratio: 72%; } }

/* about: the portrait fills the screen beside the words */
#about .frame--split { --ratio: 108%; }
@media (max-width: 639px) { #about .frame--split { --ratio: 72%; } }

/* privacy page */
.prose { max-width: 62ch; }
.prose p { margin: 0 0 var(--s-5); }

/* ---------- inner pages ---------- */
/* a hero without a picture (404, portal, privacy): the words alone, on the left line */
.hero--plain .hero__text { grid-column: 1 / span 8; }
.hero--plain .hero-text { max-width: 760px; }

/* linked rows: a ruled list where the whole row is the link */
.link-rows > li { padding: 0; }
.link-rows > li > a, .link-rows > li:not(:has(> a)) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-5); row-gap: var(--s-1); padding-block: var(--s-4); color: inherit; text-decoration: none; }
.link-rows > li:first-child > a, .link-rows > li:first-child:not(:has(> a)) { padding-top: 0; }
.link-rows > li:not(:has(> a)) { padding-block: var(--s-4); }
.link-rows .rows__name { grid-column: 1; font-size: var(--t-card); font-weight: 500; letter-spacing: -0.01em; }
.link-rows > li p { grid-column: 1; margin: 0; max-width: 56ch; }
.link-rows .rows__go, .link-rows .rows__value { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.link-rows .rows__go .m-arrow { width: 14px; height: 14px; transition: transform var(--dur, .2s) var(--ease, ease); }
.link-rows a:hover .rows__name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link-rows a:hover .rows__go .m-arrow { transform: translateX(3px); }
.rows--plain .rows__name { font-size: var(--t-body); font-weight: 400; }
.rows--times .rows__value { font-family: var(--font-mono); font-size: var(--t-small); color: var(--muted); }

/* numbered steps where the order is the content */
.num-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.num-rows > li { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-1); padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.num-rows > li:first-child { padding-top: 0; }
.num-rows__n { grid-row: 1 / span 2; font-family: var(--font-mono); font-size: var(--t-small); color: var(--muted); padding-top: 4px; }
.num-rows__t { font-size: var(--t-card); font-weight: 500; letter-spacing: -0.01em; }
.num-rows p { margin: 0; max-width: 56ch; }

/* text cards: a title, a line or two, an optional foot and arrow */
.tcard { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); text-decoration: none; color: inherit; min-height: 220px; }
.tcard h3 { margin: 0; font-size: var(--t-card); }
.tcard p { margin: 0; }
.tcard__foot { margin-top: auto !important; padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: var(--t-small); }
.tcard__foot .t-label { display: block; color: var(--muted); margin-bottom: 2px; }
.tcard__go { position: absolute; top: var(--s-6); right: var(--s-6); }
.tcard__go .m-arrow { width: 14px; height: 14px; }
a.tcard h3 { padding-right: var(--s-6); }
.tcard .step-num { margin-bottom: var(--s-2); }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.tick-list li { position: relative; padding-left: 28px; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.tick-list--accent li::before { border-color: var(--p-accent); }

/* outcome cards: before and after */
.grid.outcome-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
.grid.outcome-grid > * { grid-column: auto; }
@media (max-width: 1023px) { .grid.outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .grid.outcome-grid { grid-template-columns: minmax(0, 1fr); } }
.control-frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: #a7b4ab; min-height: 440px; align-self: stretch; }
.control-frame .stage { position: absolute; inset: 0; }
.ocard { position: relative; display: grid; gap: var(--s-2); padding: var(--s-5) var(--s-6); text-decoration: none; color: inherit; }
.ocard h3 { margin: 0; font-size: var(--t-card); padding-right: var(--s-6); }
.ocard { align-content: start; min-height: 200px; }
.ocard__shift { margin: 0; display: grid; gap: var(--s-1); color: var(--muted); }
.ocard__shift > span:last-child { color: var(--ink); }
.ocard__to { color: var(--p-accent); }
.ocard .tcard__go { top: var(--s-5); }

/* the twenty everyday wins */
.cat-grid { row-gap: var(--s-7); }
.cat-col h3 { margin: 0 0 var(--s-4); font-size: var(--t-card); }
.cat-col ul { list-style: none; margin: 0; padding: 0; display: grid; }
.cat-col li a { display: grid; gap: 4px; padding-block: var(--s-3); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.cat-col li a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cat-tag { font-size: var(--t-label); color: var(--muted); font-weight: 500; }

/* stages of a process */
.stage-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter, 24px); }
.stage-grid li { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.stage-grid li span { font-family: var(--font-mono); font-size: var(--t-small); color: var(--muted); padding-top: 2px; }
@media (max-width: 1023px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .stage-grid { grid-template-columns: minmax(0, 1fr); } }

/* note cards beside a list */
.note-card { padding: var(--s-6); border-radius: var(--r-lg); background: var(--p-bg); border: 1px solid var(--line); display: grid; gap: var(--s-3); }
.note-card p { margin: 0; }
.note-card .t-label { color: var(--muted); }
.note-card--quiet { background: transparent; }
.sec-note { margin: var(--s-6) 0 0; max-width: 62ch; color: var(--muted); }

/* contact */
.contact-form-col { align-self: start; }
.enquiry-form { display: grid; gap: var(--s-5); padding: var(--s-7); border-radius: var(--r-lg); background: var(--p-surface); }
.enquiry-form h2 { font-size: var(--t-h3, 28px); margin: 0; }
.enquiry-form > p { margin: 0; }
.enquiry-form .field input, .enquiry-form .field textarea { background: var(--p-bg); }
.contact-context { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--p-surface); }
.hero--contact .num-rows { margin-top: var(--s-6); }
.hero--contact .num-rows > li { padding-block: var(--s-4); }
.contact-email { margin: var(--s-5) 0 0; }
/* the booking calendar is Google Calendar's own page, framed so it sits on the site like the form did */
.booking-col { align-self: start; }
.booking-card { border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.booking-frame { display: block; width: 100%; height: 760px; border: 0; }
.booking-fallback { margin: var(--s-3) 0 0; }
@media (max-width: 767px) { .booking-frame { height: 900px; } }
/* the message form now sits on the surface ground, so it takes the page colour to stay distinct */
.contact-enquiry .enquiry-form { background: var(--p-bg); }
.contact-enquiry .enquiry-form .field input, .contact-enquiry .enquiry-form .field textarea { background: var(--p-surface); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 1024px) { .hero--contact .hero__text { align-self: start; display: block; } }
/* the contact hero holds the booking calendar, so it grows past one screen rather than lay it over the next section */
main > .hero.hero--contact { height: auto; min-height: 100vh; min-height: 100svh; }
main > .hero.hero--contact > .wrap { height: auto; }
/* a laptop screen shorter than the content a section holds (1280x800, say): the section grows past its
   screens instead of laying its last rows over the next section; at 1440x900 the heights are unchanged */
@media (min-width: 1280px) {
  main > :is(section, .section), footer.closing { height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh); display: flex; flex-direction: column; }
  main > :is(section, .section) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}
@media (min-width: 640px) {
  main > .hero { height: auto; min-height: 100vh; min-height: 100svh; }
}
@media (max-width: 639px) {
  .ocard { min-height: 0; padding: var(--s-5); }
  .grid.grid--top { row-gap: var(--s-7); }
}
/* a phone: a section is as tall as what it holds, so a short list never sits over a band of empty ground */
@media (max-width: 639px) {
  main > .section.sec-fit, main > #proof.section, main > #questions.section { min-height: 0; }
}
.services-more a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.services-more a:hover { text-decoration-thickness: 2px; }
/* one fact takes the row's width, two share it, so a long fact never wraps a word to a line */
.hero-facts:has(> div:only-child) { grid-template-columns: minmax(0, 1fr); }
.hero-facts:has(> div:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- small touches
   A soft light follows the pointer across cards, panels and the main button; the rotating
   outcome's underline draws in; the logo's full stop hops on hover and drops into place when the
   closing wordmark comes into view. Pointer devices only, and none of it under reduced motion. */
.glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .4s ease; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .glow { background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 102, 64, .12), transparent 62%); }
  .glow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 102, 64, .8), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
  .panel > .glow, .frame > .glow { background: radial-gradient(480px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .45), transparent 60%); mix-blend-mode: soft-light; }
  .panel > .glow::before, .frame > .glow::before { background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .7), transparent 70%); }
  :is(.card, .panel, .frame):hover > .glow { opacity: 1; }
  .btn--primary { background-image: radial-gradient(90px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .32), transparent 70%); background-size: 100% 100%; background-repeat: no-repeat; background-position: 0 0; }
  .btn--primary:not(:hover) { background-image: none; }

  .nav__logo:hover .brand-full-stop, .closing__links .nav__logo:hover .brand-full-stop { animation: stop-hop .6s cubic-bezier(.3, 1.6, .5, 1); }
  .close__word .brand-full-stop { transform-box: fill-box; transform-origin: 50% 100%; }
  .close__word.is-seen .brand-full-stop { animation: stop-drop .9s cubic-bezier(.3, 1.4, .5, 1) .15s both; }
}
.brand-full-stop { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes stop-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-40%) scale(1.15); } }
@keyframes stop-drop { 0% { transform: translateY(-260%); opacity: 0; } 55% { transform: translateY(0) scaleY(.82) scaleX(1.12); opacity: 1; } 75% { transform: translateY(-18%); } 100% { transform: none; } }
/* the rotating outcome's underline draws in with each phrase */
.hero__rotator-word { border-bottom: 0; background: linear-gradient(var(--p-accent), var(--p-accent)) 0 100% / 100% 2px no-repeat; transition: opacity .28s ease, transform .28s ease, background-size .6s cubic-bezier(.2, .8, .2, 1) .12s; }
.hero__rotator-word.is-pre { background-size: 0 2px; }
/* six systems' tabs need more room than a short tablet screen gives the section's fill */
@media (max-width: 1279px) { #services > .wrap > .fill { flex: 1 0 auto; } }
/* Dan's portrait sits smaller than the other pictures: a third of the row, never taller than it is wide by much */
#about .about-photo { --ratio: 118%; align-self: start; }
.hero__media.hero__photo { align-self: center; aspect-ratio: 4 / 5; height: auto; max-height: 520px; }
@media (max-width: 1023px) { .hero__media.hero__photo, #about .about-photo { max-width: 360px; } }
@media (max-width: 639px) { #about .about-photo { max-width: 240px; } .hero__media.hero__photo { max-width: 240px; } }
/* the window in a hero picture leans a degree or two towards the pointer, so it reads as a real screen over the landscape */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero__media { perspective: 1400px; }
  .hero__media > .stage { transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translate3d(var(--shift-x, 0px), var(--shift-y, 0px), 0); transition: transform .9s cubic-bezier(.2, .8, .2, 1); transform-origin: 50% 60%; }
}

/* ---------------------------------------------------------------- phone sweep
   Panels tall enough to show what the screen inside them is doing, the results strip left to the
   rotating line in the hero, tabs in one row that scrolls sideways, and sections as tall as their content. */
@media (max-width: 639px) {
  #outcomes .panel { --p-h: 236px; }
  #outcomes .outcome-row { display: none; }
  main > #outcomes.section, main > #ways.section, main > #services.section, main > #how.section, main > #about.section { min-height: 0; }
  #services .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gut, 24px)); padding-inline: var(--gut, 24px); scroll-padding-inline: var(--gut, 24px); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent); }
  #services .tabs::-webkit-scrollbar { display: none; }
  #services .tabs .tab { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 639px) { #services .frame--split { --ratio: 96%; } }
@media (max-width: 639px) { #proof .proof-figures { margin-top: var(--s-6); } #proof .section-head { margin-bottom: 0; } }
.enquiry-form .field, .enquiry-form .field input, .enquiry-form .field textarea { width: 100%; box-sizing: border-box; }
/* the contact page is the call request itself, so the floating call button stays out of its way */
body:has(#enquiry) .actionbar { display: none; }
@media (max-width: 639px) {
  #systems .panel, .ways-grid .panel { --p-h: 240px; }
  .control-frame { min-height: 340px; }
  .tcard { min-height: 0; }
  .hero__media.hero__photo { justify-self: start; margin-inline: 0; }
  .enquiry-form { padding: var(--s-6) var(--s-5); }
}
.enquiry-sent { display: grid; gap: var(--s-3); padding: var(--s-4) 0; outline: none; }
.enquiry-sent h2 { margin: 0; font-size: var(--t-h3, 28px); }
.enquiry-sent p { margin: 0; }
