/* =============================================================================
   CSS CRÍTICO — acima da dobra. Injetado inline no <head> pelo scripts/gerar-html.js
   (junto com tokens.css). Não precisa ser linkado.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
/* Sem scroll-behavior: smooth no CSS: conflita com as medições do ScrollTrigger.
   A rolagem suave das âncoras é feita no main.js (e desligada com reduced motion). */
body {
  min-height: 100vh; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-weight: var(--fw-regular); font-size: var(--fs-base); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, picture, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--color-link); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
strong, b { font-weight: var(--fw-bold); }
h1, h2, h3, h4 { line-height: var(--lh-tight); text-wrap: balance; font-weight: var(--fw-bold); }
p { text-wrap: pretty; }
ul[role='list'] { list-style: none; padding: 0; }
[hidden] { display: none !important; } /* nenhuma regra de layout (grid/flex) pode anular o atributo hidden */
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 8px; box-shadow: 0 0 0 6px var(--yellow-500); }
.secao--escura :focus-visible, .hero :focus-visible, .rodape :focus-visible { outline-color: var(--cream-50); box-shadow: 0 0 0 6px var(--ink-900); }

/* Até o style.css chegar, o que fica abaixo do hero não aparece (evita salto de layout/CLS) */
.js main > .secao:not(.hero), .js .rodape, .js .flutuantes { visibility: hidden; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
@media (min-width: 1200px) {
  .container { width: min(100% - 2 * var(--gutter) - 2 * var(--mascote-gutter), var(--container)); }
}
.container--estreito { max-width: var(--container-narrow); }
.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; }
.pular-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink-900); color: var(--cream-50); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.pular-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Botões (retrô discreto) ---------- */
.btn {
  --btn-bg: var(--orange-500); --btn-fg: var(--ink-900); --btn-shadow: var(--shadow-retro-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.75em 1.4em; border: var(--border); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-shadow);
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-sm); line-height: 1.15;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink-900); text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn--primary { --btn-bg: var(--orange-500); }
.btn--secondary { --btn-bg: var(--cream-25); }
.btn--yellow { --btn-bg: var(--yellow-500); }
.btn--ink { --btn-bg: var(--ink-900); --btn-fg: var(--cream-50); --btn-shadow: 2px 2px 0 var(--yellow-500); }
.btn--ink:hover { box-shadow: 1px 1px 0 var(--yellow-500); }
.btn--ghost { --btn-bg: transparent; --btn-shadow: none; border: 1.5px dashed rgba(17, 17, 17, 0.45); }
.btn--ghost:hover { --btn-bg: var(--cream-50); border-style: solid; border-color: var(--ink-900); box-shadow: none; transform: none; }
.btn--whatsapp { --btn-bg: var(--orange-500); }
.btn--whatsapp .icon { color: var(--ink-900); --icon-inner: var(--cream-50); }
.btn--sm { min-height: 44px; padding: 0.55em 1.05em; font-size: var(--fs-xs); }
.btn--lg { min-height: 54px; padding: 0.85em 1.7em; font-size: var(--fs-base); --btn-shadow: 3px 3px 0 var(--ink-900); }
.btn--lg:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink-900); }
.btn--ink.btn--lg { --btn-shadow: 3px 3px 0 var(--yellow-500); }
.btn--bloco { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header); height: var(--header-h);
}
/* O desfoque fica num pseudo-elemento: backdrop-filter no próprio header prenderia o menu mobile
   (position: fixed) dentro dele. */
.header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(254, 234, 188, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header__inner { height: 100%; display: flex; align-items: center; gap: var(--space-3); }
.header__logo { flex: none; margin-right: auto; border-radius: 8px; }
.header__logo img { width: 80px; height: auto; }
.header__cta { flex: none; padding-inline: 0.95em; }
.header__cta .icon { width: 1.1em; height: 1.1em; }
.nav { order: 3; }
.nav__toggle {
  display: inline-grid; place-items: center; min-height: 44px; min-width: 44px; border-radius: 50%;
  background: var(--ink-900); color: var(--cream-50);
}
.nav__toggle .icon { width: 22px; height: 22px; }
.nav__toggle-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav__painel {
  position: fixed; inset: var(--header-h) 0 0; z-index: var(--z-overlay); background: var(--cream-50);
  padding: var(--space-6) var(--gutter); display: flex; flex-direction: column; gap: var(--space-6);
  width: 100%; max-width: 100vw; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.nav[data-aberto] .nav__painel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
html.menu-aberto, html.menu-aberto body { overflow: hidden; } /* a página de trás não rola com o menu aberto */
.nav__lista a, .nav__extras > * { max-width: 100%; overflow-wrap: anywhere; }
.nav__lista { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.nav__lista a {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-xl); color: var(--ink-900); text-decoration: none; padding: 6px 0;
}
.nav__extras { display: grid; gap: var(--space-4); justify-items: start; }
.nav__fone a { color: var(--ink-900); font-weight: 700; font-size: var(--fs-md); }
@media (max-width: 380px) { .header__cta { font-size: 0.75rem; padding-inline: 0.75em; } .header__cta .icon { display: none; } }

@media (min-width: 1024px) {
  :root { --header-h: 80px; }
  .header__logo img { width: 92px; }
  .nav { order: 0; }
  .nav__toggle { display: none; }
  .nav__painel { position: static; inset: auto; visibility: visible; opacity: 1; transform: none; background: none; padding: 0; flex-direction: row; overflow: visible; }
  .nav__lista { display: flex; gap: clamp(0.25rem, 1vw, 1rem); }
  .nav__lista a { font-family: var(--font-body); font-style: normal; font-weight: 700; font-size: var(--fs-xs); color: var(--ink-900); padding: 8px; border-radius: 8px; }
  .nav__lista a { position: relative; transition: color 0.3s var(--ease-out); }
  .nav__lista a::after {
    content: ''; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 8px; background: var(--orange-500);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M2 8c7-8 13-8 19.5 0s12.5 8 19 0 12.5-8 19 0 12.5 8 19 0 12.5-8 19 0 12.5 8 19.5 0' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 26px 8px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M2 8c7-8 13-8 19.5 0s12.5 8 19 0 12.5-8 19 0 12.5 8 19 0 12.5-8 19 0 12.5 8 19.5 0' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 26px 8px;
    transform: scaleX(0); transform-origin: left center; transition: transform 0.4s var(--ease-out);
  }
  .nav__lista a:hover, .nav__lista a[aria-current] { color: var(--orange-700); }
  .nav__lista a:hover::after, .nav__lista a[aria-current]::after { transform: scaleX(1); }
  .nav__extras { display: none; }
}

/* ---------- Hero (laranja, leve: arco translúcido + linhas onduladas) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--orange-500); color: var(--ink-900);
  padding: calc(var(--header-h) + var(--space-5)) 0 calc(var(--space-8) + 24px);
}
.hero__rabisco { position: absolute; z-index: -1; pointer-events: none; fill: none; stroke-linecap: round; }
.hero__rabisco--1 { width: min(560px, 80vw); right: -120px; top: calc(var(--header-h) + 10px); stroke: var(--yellow-500); stroke-width: 3; }
.hero__rabisco--2 { width: 380px; left: -150px; bottom: 60px; stroke: var(--cream-50); stroke-width: 2.5; opacity: 0.55; }
.hero__inner { display: grid; gap: var(--space-5); align-items: center; justify-items: center; text-align: center; }
.hero__marca { position: relative; width: min(80vw, 380px); padding: 12% 8% 6%; }
.hero__arco {
  position: absolute; inset: 0; z-index: -1; border-radius: 999px 999px 48px 48px;
  background: rgba(254, 234, 188, 0.16); border: 1.5px solid rgba(254, 234, 188, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 30px 60px -30px rgba(80, 30, 0, 0.5);
}
/* Batatinha: personagem central do hero (o frame tem respiro para o pulo, por isso a área é maior que o arco) */
.hero__mascote { position: relative; width: 150%; margin: -22% -25% -20%; aspect-ratio: 1; }
.hero__mascote img { width: 100%; height: 100%; }
.hero__texto { display: grid; gap: var(--space-4); justify-items: center; max-width: 36rem; }
.hero__chamada {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.1rem); line-height: 0.98; letter-spacing: -0.025em; color: var(--ink-900);
}
.hero__chamada span { text-decoration: underline wavy var(--cream-50) 2.5px; text-underline-offset: 0.06em; text-decoration-skip-ink: none; }
.hero__titulo {
  font-weight: 700; font-size: var(--fs-sm); line-height: var(--lh-snug);
  background: var(--ink-900); color: var(--cream-50); padding: 0.5em 1.05em; border-radius: var(--radius-pill); transform: rotate(-1.5deg);
}
.hero__sub { font-size: var(--fs-base); font-weight: 600; max-width: 30rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-2); }
@media (min-width: 900px) {
  .hero { padding-top: calc(var(--header-h) + var(--space-7)); min-height: min(100vh, 860px); display: grid; align-items: center; }
  .hero__inner { grid-template-columns: 1fr 1fr; text-align: left; justify-items: start; gap: var(--space-7); }
  .hero__marca { order: 2; width: min(100%, 480px); justify-self: center; }
    .hero__texto { justify-items: start; }
  .hero__ctas { justify-content: flex-start; }
  .hero__sub { font-size: var(--fs-md); }
}

.onda { position: absolute; left: 0; width: 100%; height: clamp(24px, 4vw, 60px); pointer-events: none; }
.onda--baixo { bottom: -1px; }
.onda--topo { top: -1px; }

/* ---------- Preloader (1ª visita) ---------- */
.preloader {
  position: fixed; inset: 0; z-index: var(--z-preloader); display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--orange-500);
  animation: preloader-sai 0.35s var(--ease-out) 1.2s forwards; /* garantia: some sozinho mesmo sem JS */
}
.sem-preloader .preloader { display: none; }
.preloader__mascote { animation: quica 0.55s cubic-bezier(.5,0,.5,1) infinite alternate; transform-origin: 50% 100%; }
.preloader__mascote img { width: 110px; height: auto; }
.preloader__barra { width: 140px; height: 10px; border-radius: var(--radius-pill); background: rgba(254, 234, 188, 0.4); overflow: hidden; }
.preloader__barra span { display: block; height: 100%; background: var(--cream-50); border-radius: inherit; transform-origin: 0 50%; animation: barra 1.1s var(--ease-out) forwards; }
@keyframes quica { from { transform: translateY(0) scale(1.06, 0.92); } 40% { transform: translateY(-6px) scale(0.96, 1.05); } to { transform: translateY(-34px) scale(1, 1); } }
@keyframes barra { from { transform: scaleX(0.05); } to { transform: scaleX(1); } }
@keyframes preloader-sai { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Mascote viajante: escondido até o main.js assumir (evita flash) */
.mascote { position: fixed; left: 0; top: 0; z-index: var(--z-mascote); pointer-events: none; visibility: hidden; width: 600px; height: 600px; transform-origin: 0 0; will-change: transform; }
.mascote__lado { width: 100%; height: 100%; will-change: transform; }
.mascote canvas { width: 100%; height: 100%; transform-origin: 50% 88%; }

/* Brilho que percorre as linhas do hero (criado pelo main.js) */
.hero__brilho { stroke: var(--cream-50); stroke-width: 5; fill: none; }
.hero__rabisco--2 .hero__brilho { stroke: var(--yellow-500); stroke-width: 4; }
