/* Layout: faixas horizontais de largura total (hero, estilos, processo lilás, quadros, CTA), conteúdo em coluna central de 1120px */
:root {
  --creme: #fdf4ec;
  --creme-2: #f9e9dc;
  --card: #fdf1e6;
  --lilas: #f1e8f4;
  --ameixa: #4a1d3c;
  --texto: #3b2a2a;
  --texto-suave: #6d5a57;
  --coral: #e8604c;
  --coral-escuro: #cf4b38;
  --mostarda: #f2b33d;
  --borda: #f0dccd;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-texto: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  --raio: 18px;
  --max: 1120px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

h1, h2, h3 { font-family: var(--f-display); color: var(--ameixa); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Cabeçalho ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--creme);
}
.topo {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: color-mix(in srgb, var(--creme) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
}
.topo .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--f-texto); font-weight: 800; font-size: 1.45rem; color: var(--ameixa); letter-spacing: -0.01em;
}
.logo svg { width: 30px; height: 30px; color: var(--coral); }
.logo .e { color: var(--coral); }
.menu { display: flex; gap: 40px; margin-left: auto; margin-right: auto; }
.menu a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--texto); }
.menu a:hover { color: var(--coral); }
.acoes { display: flex; gap: 14px; }
.icone-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ameixa); text-decoration: none;
}
.icone-btn:hover { background: var(--creme-2); }
.icone-btn svg { width: 24px; height: 24px; }

/* ---------- Botão ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--coral); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.15rem; padding: 16px 34px; border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(207, 75, 56, 0.6);
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--coral-escuro); transform: translateY(-2px); }
.btn svg { width: 24px; height: 24px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(100deg, var(--creme) 40%, var(--creme-2));
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center; gap: 32px; padding-block: 40px 48px;
}
.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.4rem); line-height: 0.98; font-weight: 800; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--coral); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; right: -0.55em; top: 0.25em; width: 0.45em; height: 0.45em;
  background:
    linear-gradient(var(--mostarda), var(--mostarda)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--mostarda), var(--mostarda)) 0 50% / 100% 3px no-repeat,
    linear-gradient(var(--mostarda), var(--mostarda)) 0 100% / 100% 3px no-repeat;
  transform: rotate(-30deg) skewX(-10deg);
}
.hero .sub { font-size: 1.2rem; color: var(--texto); margin-top: 20px; max-width: 30ch; }
.hero .btn { margin-top: 28px; }
.selos {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 440px;
}
.selos li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  font-size: 0.85rem; line-height: 1.3; padding-inline: 10px;
}
.selos li + li { border-left: 1px solid var(--borda); }
.selos svg { width: 28px; height: 28px; color: var(--ameixa); }
.hero-img { border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(74, 29, 60, 0.45); }
.hero-img img { width: 100%; height: auto; aspect-ratio: 584 / 387; object-fit: cover; }

/* ---------- Títulos de seção ---------- */
.titulo { text-align: center; display: grid; gap: 8px; justify-items: center; margin-bottom: 32px; }
.titulo h2 { display: inline-flex; align-items: center; gap: 16px; }
.titulo h2::before, .titulo h2::after {
  content: ""; width: 26px; height: 22px; flex: none;
  background:
    linear-gradient(var(--mostarda), var(--mostarda)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--mostarda), var(--mostarda)) 0 50% / 80% 3px no-repeat,
    linear-gradient(var(--mostarda), var(--mostarda)) 0 100% / 100% 3px no-repeat;
}
.titulo h2::before { transform: rotate(-20deg); }
.titulo h2::after { transform: scaleX(-1) rotate(-20deg); }
.titulo p { font-size: 1.05rem; color: var(--texto); }

section { padding-block: 56px; }

/* ---------- Estilos ---------- */
.estilos-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
}
.estilo {
  background: var(--card); border-radius: var(--raio); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none;
  box-shadow: 0 10px 24px -20px rgba(74, 29, 60, 0.5);
  transition: transform .25s;
}
.estilo:hover { transform: translateY(-4px); }
.estilo img { width: 100%; aspect-ratio: 182 / 150; object-fit: cover; }
.estilo .info { padding: 14px 14px 18px; text-align: center; display: grid; gap: 6px; }
.estilo h3 {
  font-family: var(--f-texto); font-size: 1.05rem; font-weight: 800; color: var(--ameixa);
  display: inline-flex; gap: 8px; align-items: center; justify-content: center;
}
.estilo h3 svg { width: 20px; height: 20px; }
.estilo p { font-size: 0.85rem; color: var(--texto-suave); line-height: 1.4; }

/* ---------- Processo ---------- */
.processo { background: var(--lilas); position: relative; }
.passos {
  list-style: none; margin: 0; padding: 0; counter-reset: passo;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
.passo { display: grid; justify-items: center; gap: 14px; position: relative; }
.passo .ilustra {
  width: 96px; height: 80px; display: grid; place-items: center; color: var(--ameixa);
}
.passo .ilustra svg { width: 72px; height: 72px; }
.passo:not(:last-child)::after {
  content: ""; position: absolute; top: 36px; left: calc(50% + 64px); right: calc(-50% + 64px);
  border-top: 2px dashed rgba(74, 29, 60, 0.45);
}
.passo .texto { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.passo .num {
  counter-increment: passo; width: 28px; height: 28px; border-radius: 50%;
  background: var(--coral); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
}
.passo .num::before { content: counter(passo); }
.passo h3 { font-family: var(--f-texto); font-size: 1.15rem; font-weight: 800; color: var(--ameixa); }
.passo p { grid-column: 2; font-size: 0.9rem; color: var(--texto); line-height: 1.4; }

/* ---------- Quadros ---------- */
.quadros-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.quadro {
  background: var(--card); border-radius: var(--raio); overflow: hidden;
  box-shadow: 0 10px 24px -20px rgba(74, 29, 60, 0.5);
}
.quadro img { width: 100%; aspect-ratio: 230 / 163; object-fit: cover; }
.quadro .info { padding: 14px 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
.quadro svg { width: 22px; height: 22px; color: var(--ameixa); grid-row: span 2; margin-top: 1px; }
.quadro h3 { font-family: var(--f-texto); font-size: 1rem; font-weight: 800; color: var(--ameixa); }
.quadro p { font-size: 0.85rem; color: var(--texto-suave); line-height: 1.4; }
.quadro .preco { grid-column: 2; font-size: 0.85rem; font-weight: 700; color: var(--coral-escuro); margin-top: 4px; }

/* ---------- CTA final ---------- */
.cta { padding-block: 24px 0; }
.cta-box {
  background: linear-gradient(90deg, var(--creme-2), #fbdccc);
  border-radius: 200px 200px 0 0; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 24px;
}
.cta-box img { width: 100%; aspect-ratio: 350 / 120; object-fit: cover; object-position: left bottom; }
.cta-box .txt { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 28px 24px 32px; }
.cta-box h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
.cta-box .btn { font-size: 1.05rem; padding: 13px 30px; }

/* ---------- Rodapé ---------- */
.rodape { background: var(--creme); border-top: 1px solid var(--borda); }
.rodape .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.rodape .logo { font-size: 1.1rem; }
.rodape .logo svg { width: 22px; height: 22px; }
.rodape nav { display: flex; flex-wrap: wrap; gap: 8px 28px; flex: 1; justify-content: center; }
.rodape nav a { text-decoration: none; font-size: 0.85rem; }
.rodape nav a:hover { color: var(--coral); }
.redes { display: flex; gap: 6px; }
.redes .icone-btn { width: 36px; height: 36px; }
.redes svg { width: 20px; height: 20px; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .menu { display: none; }
  .acoes { margin-left: auto; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 28px 40px; }
  .hero .sub { max-width: none; }
  .estilos-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    padding-bottom: 8px; scrollbar-width: thin;
  }
  .estilo { flex: 0 0 min(62%, 240px); scroll-snap-align: start; min-width: 0; }
  .passos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .passo:nth-child(2)::after { display: none; }
  .quadros-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  section { padding-block: 40px; }
  .btn { width: 100%; justify-content: center; }
  .selos li { font-size: 0.78rem; }
  .titulo h2::before, .titulo h2::after { display: none; }
  .passos { grid-template-columns: minmax(0, 1fr); }
  .passo::after { display: none; }
  .quadros-grid { gap: 10px; }
  .quadro .info { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .quadro svg { display: none; }
  .quadro .preco { grid-column: 1; }
  .cta-box { grid-template-columns: minmax(0, 1fr); border-radius: 60px 60px 0 0; }
  .cta-box img { order: 2; }
  .rodape .wrap { justify-content: center; }
}

/* =========================================================
   Animações e interações
   ========================================================= */

/* Título do hero: palavras sobem em sequência ao carregar */
.hero h1 .w { display: inline-block; animation: sobe .8s cubic-bezier(.2,.9,.3,1.3) both; }
.hero h1 .w:nth-child(2) { animation-delay: .08s; }
.hero h1 .w:nth-child(3) { animation-delay: .16s; }
.hero h1 .w:nth-child(4) { animation-delay: .24s; }
.hero h1 em { display: inline-block; animation: sobe .8s .34s cubic-bezier(.2,.9,.3,1.3) both, gingado 3.5s 1.4s ease-in-out infinite; transform-origin: 30% 90%; }
@keyframes sobe { from { transform: translateY(.6em) rotate(4deg); } to { transform: none; } }
@keyframes gingado { 0%, 100% { transform: rotate(0); } 8% { transform: rotate(-4deg); } 16% { transform: rotate(3deg); } 24% { transform: rotate(0); } }

.hero .sub, .hero .btn, .selos { animation: aparece .7s .5s backwards; }
.selos { animation-delay: .65s; }
@keyframes aparece { from { transform: translateY(14px); } to { transform: none; } }

/* Imagem do hero com inclinação 3D (JS define --rx/--ry) */
.hero-img {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  animation: entraImg 1s .2s cubic-bezier(.2,.9,.3,1.2) backwards;
  will-change: transform;
}
@keyframes entraImg { from { transform: perspective(1000px) rotateY(-14deg) scale(.94); } }

/* Patinhas e corações flutuando no fundo do hero */
.hero { position: relative; isolation: isolate; }
.flutua { position: absolute; pointer-events: none; z-index: -1; color: var(--coral); opacity: .22; animation: boia 7s ease-in-out infinite; }
.flutua svg { width: 100%; height: 100%; }
.flutua.f1 { width: 46px; height: 46px; left: 2%; top: 62%; animation-delay: -1s; }
.flutua.f2 { width: 30px; height: 30px; left: 46%; top: 12%; color: var(--mostarda); opacity: .5; animation-duration: 6s; }
.flutua.f3 { width: 38px; height: 38px; left: 3%; top: 18%; animation-duration: 8s; animation-delay: -3s; }
.flutua.f4 { width: 26px; height: 26px; left: 40%; bottom: 8%; color: var(--ameixa); opacity: .15; animation-delay: -4s; }
@keyframes boia { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-18px) rotate(10deg); } }

/* Botão: brilho passando + "magnético" (JS define --mx/--my) */
.btn { position: relative; overflow: hidden; isolation: isolate; translate: var(--mx, 0) var(--my, 0); transition: background .2s, transform .2s, translate .2s ease-out; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: brilho 3.2s 1.5s ease-in-out infinite;
}
@keyframes brilho { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn:hover svg { animation: pula .5s ease; }
.btn:active { transform: scale(.96); }
@keyframes pula { 40% { transform: translateY(-5px); } 70% { transform: translateY(1px); } }

/* Cards de estilo: inclinação 3D + zoom na imagem + ícone gira */
.estilo { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .2s ease-out, box-shadow .3s; position: relative; }
.estilo:hover { --ty: -6px; transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty)); box-shadow: 0 22px 34px -22px rgba(74, 29, 60, .6); }
.estilo img { transition: transform .5s cubic-bezier(.2,.9,.3,1); }
.estilo:hover img { transform: scale(1.08); }
.estilo:hover h3 svg { animation: gira .6s ease; }
@keyframes gira { 50% { transform: rotate(-18deg) scale(1.25); } }
.estilo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.35), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.estilo:hover::after { opacity: 1; }

/* Processo: linhas tracejadas "andando" e ilustrações balançando */
.passo:not(:last-child)::after {
  border-top: none; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(74,29,60,.45) 0 8px, transparent 8px 14px);
  background-size: 28px 2px; animation: marcha 1s linear infinite;
}
@keyframes marcha { to { background-position: 28px 0; } }
.passo .ilustra { animation: balanca 4s ease-in-out infinite; }
.passo:nth-child(2) .ilustra { animation-delay: -1s; }
.passo:nth-child(3) .ilustra { animation-delay: -2s; }
.passo:nth-child(4) .ilustra { animation-delay: -3s; }
@keyframes balanca { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
.passo:hover .num { animation: pulsa .6s ease; }
@keyframes pulsa { 50% { transform: scale(1.35); } }

/* Quadros: balançam como se estivessem pendurados */
.quadro { transition: box-shadow .3s; }
.quadro img { transform-origin: 50% 0; transition: transform .3s; }
.quadro:hover img { animation: pendulo 1.4s ease-out; }
.quadro:hover { box-shadow: 0 20px 34px -22px rgba(74, 29, 60, .6); }
@keyframes pendulo { 0% { transform: rotate(0); } 15% { transform: rotate(3deg); } 35% { transform: rotate(-2.2deg); } 55% { transform: rotate(1.3deg); } 75% { transform: rotate(-.6deg); } 100% { transform: rotate(0); } }

/* CTA: pets "respirando" */
.cta-box img { animation: respira 4s ease-in-out infinite; transform-origin: 30% 100%; }
@keyframes respira { 50% { transform: scale(1.03); } }

/* Revelação ao rolar (só transform: o conteúdo fica sempre visível) */
@supports (animation-timeline: view()) {
  .estilo, .quadro, .passo, .titulo {
    animation: revela linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
  .estilo:nth-child(2), .quadro:nth-child(2) { animation-range: entry 5% entry 80%; }
  .estilo:nth-child(3), .quadro:nth-child(3) { animation-range: entry 10% entry 90%; }
  .estilo:nth-child(4), .quadro:nth-child(4) { animation-range: entry 15% entry 100%; }
  .estilo:nth-child(5) { animation-range: entry 20% cover 30%; }
  @keyframes revela { from { translate: 0 50px; scale: .92; } to { translate: 0 0; scale: 1; } }
}

/* Rastro de patinhas e explosão de corações (criados pelo JS) */
.rastro, .estouro {
  position: fixed; pointer-events: none; z-index: 50; left: 0; top: 0; width: 18px; height: 18px;
  color: var(--coral);
}
.rastro { animation: somePata .9s ease-out forwards; }
@keyframes somePata { from { opacity: .7; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); } to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.4); } }
.estouro { width: 22px; height: 22px; animation: voa .9s cubic-bezier(.2,.8,.4,1) forwards; }
@keyframes voa {
  from { opacity: 1; transform: translate(var(--x), var(--y)) scale(.3) rotate(0); }
  to { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(1.1) rotate(var(--r)); }
}

/* Barra de progresso de rolagem no topo */
.progresso {
  position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--coral), var(--mostarda));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: scroll()) {
  .progresso { animation: progresso linear both; animation-timeline: scroll(root); }
  @keyframes progresso { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Logo: patinha dá um "toque" ao passar o mouse */
.logo:hover svg { animation: gira .6s ease; }

@media (prefers-reduced-motion: reduce) {
  .flutua, .rastro, .estouro { display: none; }
  .hero-img, .estilo { transform: none !important; }
}

/* Correções de proporção e alinhamento */
.estilo img, .quadro img, .cta-box img { height: auto; }
.passos { align-items: start; }
.passo .texto { width: 100%; max-width: 250px; }
.cta-box { border-radius: 120px 120px 0 0; }
.cta-box .txt { padding-inline: 24px 64px; }
.cta-box img { -webkit-mask-image: linear-gradient(90deg, #000 75%, transparent); mask-image: linear-gradient(90deg, #000 75%, transparent); }
@media (max-width: 560px) {
  .cta-box .txt { padding-inline: 20px; }
  .cta-box img { -webkit-mask-image: none; mask-image: none; }
}
