/* Shared by every template: reset, accessibility, and the motion primitives
   core.js drives. Templates set their own look on top; nothing here picks a
   colour or a font except through the --brand tokens injected per client. */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  interpolate-size: allow-keywords;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h, 96px);
}
body { margin: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; text-wrap: balance; font-weight: inherit; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote, dl, dd { margin: 0; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- a11y */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  padding: 12px 18px; border-radius: 12px;
  background: #111; color: #fff; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--focus, var(--brand)); outline-offset: 3px; border-radius: 4px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* -------------------------------------------------------- reveal */
.js [data-reveal] {
  opacity: 0;
  transition:
    opacity var(--reveal-dur, .9s) var(--ease-out),
    transform var(--reveal-dur, .9s) var(--ease-out),
    filter var(--reveal-dur, .9s) var(--ease-out),
    clip-path 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal=""], .js [data-reveal="up"] { transform: translate3d(0, var(--reveal-dist, 28px), 0); }
.js [data-reveal="down"] { transform: translate3d(0, -20px, 0); }
.js [data-reveal="left"] { transform: translate3d(-32px, 0, 0); }
.js [data-reveal="right"] { transform: translate3d(32px, 0, 0); }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal="blur"] { transform: translate3d(0, 14px, 0); filter: blur(12px); }
.js [data-reveal="clip"] { opacity: 1; clip-path: inset(0 0 100% 0); }
.js [data-reveal="clip-x"] { opacity: 1; clip-path: inset(0 100% 0 0); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
/* Only clip reveals keep a clip-path: on anything else it would crop badges that overflow. */
.js [data-reveal^="clip"].is-in { clip-path: inset(0 0 0 0); }

/* Line-by-line headline reveal: <span class="line"><span>text</span></span> */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > span { display: inline-block; }
.js [data-reveal-lines] .line > span { transform: translate3d(0, 110%, 0); transition: transform 1.1s var(--ease-out); }
.js [data-reveal-lines].is-in .line > span { transform: none; }
.js [data-reveal-lines] .line:nth-child(2) > span { transition-delay: .09s; }
.js [data-reveal-lines] .line:nth-child(3) > span { transition-delay: .18s; }
.js [data-reveal-lines] .line:nth-child(4) > span { transition-delay: .27s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal], .js [data-reveal-lines] .line > span { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
}

html.no-motion { scroll-behavior: auto !important; }
.no-motion *, .no-motion *::before, .no-motion *::after { transition: none !important; animation: none !important; }

/* ------------------------------------------------- details, map, tilt */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete;
}
details[open]::details-content { block-size: auto; }

.map-frame { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
  will-change: transform;
}
[data-tilt]:hover { transition-duration: .12s; }
[data-parallax] { translate: 0 var(--parallax, 0px); }

[data-open-status]:empty { display: none; }

.avatar-mono { display: grid; place-items: center; user-select: none; }

/* -------------------------------------------------------- legal */
.legal { display: grid; gap: .35rem; }
.legal a { text-underline-offset: 3px; }

/* Long button labels ("Quero agendar meu Check-up Day") would push a phone
   layout sideways; let them wrap there. body raises specificity over .btn. */
@media (max-width: 480px) { body .btn { white-space: normal; text-align: center; } }

/* Phones: filter chips become one row that scrolls sideways instead of a
   wrapped block several lines tall. body raises specificity over templates. */
@media (max-width: 640px) {
  body [data-filter-group] {
    display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
    scrollbar-width: none; padding-right: 2.5rem;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  body [data-filter-group]::-webkit-scrollbar { display: none; }
  body [data-filter-group] > * { flex: none; white-space: nowrap; }
}

/* ------------------------------------------------ names that book */
.book-link {
  color: inherit; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out), color .25s;
}
.book-link:hover, .book-link:focus-visible { background-size: 100% 1px; color: var(--brand); }
.book-link .icon {
  width: .82em; height: .82em; margin-left: .32em; vertical-align: -.04em; color: #1faa59;
  opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .3s var(--ease-out);
}
.book-link:hover .icon, .book-link:focus-visible .icon { opacity: 1; transform: none; }
/* Touch screens have no hover: show the WhatsApp mark so the name reads as tappable. */
@media (hover: none) { .book-link .icon { opacity: .85; transform: none; } }

/* ------------------------------------------------ site chat */
.chat-note {
  position: fixed; right: 20px; bottom: 20px; z-index: 300; max-width: min(360px, calc(100% - 40px));
  padding: .8rem 1rem; border-radius: 14px; font-size: .92rem; color: #fff; background: rgb(27 22 24 / .92);
  box-shadow: 0 18px 40px -20px rgb(0 0 0 / .5); animation: pop-in .35s var(--ease-out);
}
.chat-note a { color: #7ee2a8; font-weight: 650; }

/* ------------------------------------------------ CV and preparation */
.pop-btn {
  justify-self: start; width: max-content; max-width: 100%;
  display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; line-height: 1.2; color: var(--brand);
  background: color-mix(in oklab, var(--brand) 8%, white); transition: background-color .25s;
}
.pop-btn:hover { background: color-mix(in oklab, var(--brand) 15%, white); }
.pop-btn .icon { width: 15px; height: 15px; }
.icon-link {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: var(--brand); background: color-mix(in oklab, var(--brand) 8%, white); transition: background-color .25s;
}
.icon-link:hover { background: color-mix(in oklab, var(--brand) 15%, white); }
.icon-link .icon { width: 16px; height: 16px; }
.bio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

.pop {
  width: min(560px, calc(100vw - 2rem)); max-height: min(82vh, 680px); overflow: auto;
  margin: auto; padding: clamp(1.2rem, 3vw, 1.8rem); border: 0; border-radius: var(--pop-radius, 24px);
  color: var(--pop-ink, #1b1416); background: var(--pop-bg, #fff);
  box-shadow: 0 40px 80px -30px rgb(20 10 14 / .5);
}
.pop::backdrop { background: rgb(20 14 16 / .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pop:popover-open { animation: pop-in .4s var(--ease-out); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.pop.is-open { position: fixed; inset: 0; z-index: 200; height: fit-content; }
.pop__head { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.pop__head--plain { grid-template-columns: 1fr auto; }
.pop__avatar { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; }
@media (max-width: 480px) { .pop__avatar { width: 88px; height: 88px; } }
.pop__avatar.avatar-mono { font-size: 1.9rem; }
.pop__role { font-size: .82rem; font-weight: 600; color: var(--brand); }
.pop__title { margin: .15rem 0; font-size: 1.3rem; line-height: 1.2; }
.pop__meta { font-size: .8rem; opacity: .7; }
.pop__close {
  align-self: start; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: var(--brand); background: color-mix(in oklab, var(--brand) 8%, white);
}
.pop__text { margin-top: 1.1rem; line-height: 1.65; }
.pop__list { display: grid; gap: .65rem; margin-top: 1.1rem; }
.pop__list li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.5; }
.pop__list .icon { flex: none; margin-top: .2rem; color: var(--brand); stroke-width: 2.4; }
.pop__note { margin-top: 1rem; font-size: .86rem; opacity: .7; }
.pop__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }

/* ------------------------------------------------ health plans */
.plan-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: .6rem; }
.plan-tile {
  display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; gap: .45rem;
  min-height: 112px; padding: .9rem .7rem .8rem; border-radius: 16px; text-align: center;
  background: #fff; border: 1px solid rgb(0 0 0 / .07); transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.plan-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -18px rgb(0 0 0 / .45); }
.plan-tile img { width: auto; max-width: 100%; max-height: 50px; object-fit: contain; }
.plan-tile strong { font-size: .98rem; font-weight: 650; line-height: 1.2; text-wrap: balance; }
.plan-tile small { font-size: .78rem; line-height: 1.3; opacity: .72; text-wrap: balance; }
.plan-tile:not(:has(small)) { grid-template-rows: 1fr; }
.plan-tile:not(.plan-tile--logo) { grid-template-rows: auto; align-content: center; gap: .3rem; }
.plan-wall.is-searching .plan-tile.is-match { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 18%, transparent); }
@media (max-width: 520px) { .plan-wall { grid-template-columns: repeat(2, 1fr); } .plan-tile { min-height: 100px; } }

/* ------------------------------------------------ rotators */
/* Children stack and cross-fade; core.js moves .is-current. The first child is
   current in the HTML, so without script one portrait still shows. */
[data-rotate] { position: relative; }
[data-rotate] > * { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ease-out), transform 1.6s var(--ease-out); transform: scale(1.03); }
[data-rotate] > .is-current { opacity: 1; transform: none; z-index: 1; }

/* ------------------------------------------------ footer credit */
/* Option B the client chose: one colour — the site's — so the MBMinds mark never clashes
   with a palette; centred and set apart from the fine print above it. */
.legal__credit { display: flex; justify-content: center; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid color-mix(in oklab, currentColor 10%, transparent); }
.legal__credit .credit {
  display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1.05rem .45rem .75rem; border-radius: 999px;
  font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--brand);
  background: color-mix(in oklab, var(--brand) 7%, transparent); border: 1px solid color-mix(in oklab, var(--brand) 24%, transparent);
  transition: transform .3s var(--ease-out), background-color .3s, border-color .3s;
}
.legal__credit .credit:hover, .legal__credit .credit:focus-visible { transform: translateY(-2px); background: color-mix(in oklab, var(--brand) 12%, transparent); border-color: color-mix(in oklab, var(--brand) 40%, transparent); }
/* The mark is a mask filled with the text colour; its path is relative to this file (assets/site/). */
.credit__mark { width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: url(mbminds-mark.png) center / contain no-repeat; mask: url(mbminds-mark.png) center / contain no-repeat; }
.credit strong { font-weight: 750; letter-spacing: -.01em; }

/* ------------------------------------------------ plan wall: names as wordmarks */
/* A plan without a logo stands among the logos in a template's display face. */
.plan-tile:not(.plan-tile--logo) strong { font-family: var(--wordmark, inherit); font-size: 1.16rem; font-weight: 750; line-height: 1.1; letter-spacing: -.03em; }
.plan-tile:not(.plan-tile--logo) small { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

/* ------------------------------------------------ wave seam (wave_seam) */
section:has(> .wave-seam) { position: relative; }
.wave-seam { position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 44px; translate: 0 -50%; pointer-events: none; }
.wave-seam svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wave-seam path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.wave-seam__ghost { stroke: color-mix(in oklab, var(--brand) 16%, transparent); stroke-width: 1.5; }
.wave-seam__line { stroke: var(--brand); stroke-width: 2.4; stroke-dasharray: 160 840; stroke-dashoffset: 1000; animation: wave-run 6s linear infinite; filter: drop-shadow(0 0 5px color-mix(in oklab, var(--brand) 45%, transparent)); }
@keyframes wave-run { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .wave-seam__line { stroke-dasharray: none; animation: none; opacity: .35; } }

/* ------------------------------------------------ preview colour picker (preview.js) */
.preview-scheme {
  position: fixed; left: 12px; bottom: 12px; z-index: 400; display: flex; align-items: center; gap: .4rem;
  padding: .3rem .35rem .3rem .65rem; border-radius: 999px; font: 600 .76rem/1 system-ui, sans-serif; color: #fff;
  background: rgb(20 20 26 / .78); box-shadow: 0 12px 30px -12px rgb(0 0 0 / .5); opacity: .82; transition: opacity .2s;
}
.preview-scheme:hover, .preview-scheme:focus-within { opacity: 1; }
.preview-scheme select { padding: .3rem .5rem; border: 0; border-radius: 999px; font: inherit; color: #14141a; background: #fff; }

/* ------------------------------------------------ touch targets (WCAG 2.5.8: 24 px minimum) */
.ftr__col a, .ftr__reach { min-height: 28px; display: inline-flex; align-items: center; }
