/* base.css — estrutura, acessibilidade e comportamento. SEM identidade visual.
   A identidade (cores, tipografia, hero, ritmo das seções) é escrita em main.css por site.
   main.css redefine os tokens abaixo em :root. */
:root {
  --c-bg: #ffffff;
  --c-surface: #f5f5f4;
  --c-text: #1c1917;
  --c-muted: #57534e;
  --c-primary: #1d4ed8;
  --c-on-primary: #ffffff;
  --c-accent: #f59e0b;
  --c-border: rgb(0 0 0 / .12);
  --c-dark: #111111;
  --c-on-dark: #f5f5f4;
  --c-wa: #1fa855;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-h1: clamp(2.1rem, 1.3rem + 3.6vw, 4rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.9vw, 2.6rem);
  --fs-h3: clamp(1.15rem, 1.05rem + .45vw, 1.4rem);
  --lh-body: 1.6;
  --lh-head: 1.12;
  --space-section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --gap: clamp(1rem, .7rem + 1.2vw, 2rem);
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --radius-btn: 999px;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / .25);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: 400 var(--fs-body)/var(--lh-body) var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; height: auto; }
img { object-fit: cover; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: var(--lh-head); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .75rem 1rem; background: var(--c-dark); color: var(--c-on-dark); border-radius: 6px; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* layout */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr)); }
.split { display: grid; gap: calc(var(--gap) * 1.5); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--wide-media { grid-template-columns: 1.2fr 1fr; } }

/* header + menu mobile */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-bg); transition: box-shadow .25s var(--ease), background .25s; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--c-border), 0 8px 24px -16px rgb(0 0 0 / .3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; }
.nav { display: flex; align-items: center; gap: clamp(.8rem, 1.6vw, 1.8rem); }
.nav a:not(.btn) { text-decoration: none; font-size: var(--fs-small); font-weight: 500; padding-block: .5rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 1.25rem 1.5rem; background: var(--c-bg); box-shadow: var(--shadow); transform: translateY(-120%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--c-border); font-size: 1.05rem; }
  .nav .btn { margin-top: 1rem; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .8rem 1.4rem; border-radius: var(--radius-btn); border: 2px solid transparent; font-weight: 600; line-height: 1.1; text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-wa { background: var(--c-wa); color: #fff; }
.btn-sm { min-height: 40px; padding: .55rem 1rem; font-size: var(--fs-small); }
.btn-block { width: 100%; }

/* FAQ com <details> */
.faq details { border-bottom: 1px solid var(--c-border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4em; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.15rem; color: var(--c-muted); }

/* formulário */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-bg); }
.field textarea { min-height: 110px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #b91c1c; }
.field-error { color: #b91c1c; font-size: .875rem; margin: 0; }
.hp { position: absolute; left: -9999px; }

/* WhatsApp flutuante */
.wa-float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--c-wa); color: #fff; box-shadow: 0 10px 25px -8px rgb(0 0 0 / .45); transition: transform .2s var(--ease); }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* rodapé */
.site-footer { background: var(--c-dark); color: var(--c-on-dark); padding-block: 3.5rem 1.5rem; }
.site-footer a { text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .14); font-size: .875rem; opacity: .8; }
.footer-bottom p { margin: 0; }

/* reveal: conteúdo visível sem JS; com JS anima ao entrar na tela */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .wa-float, .nav-toggle { display: none !important; } }

/* ===== camada de hover (adaptada do taste-skill, MIT) =====
   Só com ponteiro fino; nada mexe na rolagem. Classes: .card--link, .m-zoom, .link, .m-arrow */
.card--link { display: block; color: inherit; text-decoration: none; border: 1px solid var(--c-border); transition: transform .18s var(--ease), border-color .14s, box-shadow .18s; }
.m-zoom, .card--link .card-media { overflow: hidden; }
.m-zoom img, .card--link .card-media img { transition: transform .6s var(--ease); }
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat, linear-gradient(var(--c-border), var(--c-border)) 0 100% / 100% 1px no-repeat; transition: background-size .2s var(--ease); padding-bottom: 2px; }
.nav a:not(.btn) { background: linear-gradient(currentColor, currentColor) 0 calc(100% - 2px) / 0 1px no-repeat; transition: background-size .2s var(--ease); }
.m-arrow { display: inline-block; width: 1em; height: 1em; transition: transform .14s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(1px) scale(.985); transition-duration: .09s; }
  .card--link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c-text) 30%, transparent); box-shadow: 0 12px 24px -12px rgb(0 0 0 / .1); }
  .m-zoom:hover img, a:hover > .m-zoom img, .card--link:hover .card-media img { transform: scale(1.03); }
  .link:hover, .nav a:not(.btn):hover { background-size: 100% 1px, 100% 1px; }
  a:hover .m-arrow, button:hover .m-arrow { transform: translateX(3px); }
}
:focus-visible { transition: outline-offset .2s var(--ease); }

/* entrada do hero com GSAP (motion.js): escondido só enquanto o JS prepara; volta sozinho em 2,5 s */
.m-hero [data-m-i] { opacity: 0; }
[data-m="parallax"] { will-change: transform; }
.m-faixa { overflow: hidden; }
.m-faixa-trilho { display: flex; width: max-content; }

/* novos movimentos (motion.js). Sem JS ou com "reduzir movimento" tudo fica parado e visível */
.m-palavra { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.m-palavra > span { display: inline-block; }
.m-coluna { overflow: hidden; }
.m-coluna-trilho { display: flex; flex-direction: column; gap: inherit; }
[data-m="leque"] { position: relative; display: grid; place-items: center; }
[data-m="leque"] > [data-m-item] { grid-area: 1 / 1; transform: translateX(calc(var(--d, 0) * 22%)) rotate(calc(var(--d, 0) * 7deg)); }
[data-m="zoom"] [data-m-zoom] { overflow: hidden; }
[data-m-item].is-ativo { --ativo: 1; }

/* seletor de serviços do hero (main.js): sem JS todos os painéis aparecem */
.js [data-seletor] [role="tabpanel"][hidden] { display: none; }
[data-seletor] [role="tab"] { cursor: pointer; min-height: 44px; }
