/* =========================================================
   Doceria Miroane — Tela de espera
   Desktop: proporções do Figma (frame 1920x1080) em unidades fluidas
   Mobile/Tablet retrato: layout empilhado
   ========================================================= */

:root {
  --vermelho: #9e1b1e;
  --bege: #f3eee7;
  --amarelo: #e4b415;
  --branco: #ffffff;
  --font-titulo: "Anton SC", "Anton", Impact, "Arial Narrow", sans-serif;
  --font-texto: "Poppins", Arial, Helvetica, sans-serif;
  /* 1u = 1px do Figma numa tela de 1920px */
  --u: calc(100vw / 1920);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bege);
  color: var(--branco);
  font-family: var(--font-texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: none; }

h1, h2, p { margin: 0; font-weight: 400; }

a { color: inherit; text-decoration: none; }

/* ---------- Palco ---------- */
.stage {
  position: relative;
  width: 100%;
  height: calc(var(--u) * 1080);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bege);
}

.bg-onda {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.onda-mobile { display: none; }

.frame {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: calc(var(--u) * 1080);
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.conteudo {
  position: absolute;
  left: calc(var(--u) * 235);
  top: calc(var(--u) * 187);
  width: calc(var(--u) * 712);
  pointer-events: auto;
}

/* ---------- Logo ---------- */
.logo {
  position: relative;
  width: calc(var(--u) * 344);
  height: calc(var(--u) * 96);
  margin-left: calc(var(--u) * 2);
  overflow: hidden;
}

.logo img {
  position: absolute;
  left: -11.9%;
  top: -40%;
  width: 123.79%;
  height: 180%;
}

/* ---------- Textos ---------- */
.tag {
  margin-top: calc(var(--u) * 49);
  height: calc(var(--u) * 44);
  font-family: var(--font-titulo);
  font-size: calc(var(--u) * 32);
  line-height: 1.163;
  color: var(--amarelo);
}

.titulo {
  margin-top: calc(var(--u) * 10);
  min-height: calc(var(--u) * 252);
  width: calc(var(--u) * 702);
  font-family: var(--font-titulo);
  font-size: calc(var(--u) * 82.387);
  line-height: 0.942;
  color: var(--branco);
}

.texto {
  margin-left: calc(var(--u) * 2);
  width: calc(var(--u) * 710);
  font-family: var(--font-texto);
  font-weight: 300;
  font-size: calc(var(--u) * 25);
  line-height: 1.04;
  color: var(--branco);
}

/* ---------- Botão WhatsApp ---------- */
.btn-whats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(var(--u) * 562);
  height: calc(var(--u) * 67);
  margin-top: calc(var(--u) * 37);
  border: 2px solid var(--branco);
  border-radius: 200px;
  transition: background-color .25s ease, transform .25s ease;
}

.btn-whats__label {
  padding-left: calc(var(--u) * 32);
  font-family: var(--font-titulo);
  font-size: calc(var(--u) * 28.608);
  line-height: 0.942;
  color: var(--branco);
  white-space: nowrap;
}

.btn-whats__fone {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  align-self: stretch;
  width: calc(var(--u) * 259);
  margin: -2px -2px -2px 0;
  padding-left: calc(var(--u) * 34);
  background: var(--branco);
  border-radius: 200px;
  font-family: var(--font-titulo);
  font-size: calc(var(--u) * 21.595);
  line-height: 1;
  color: var(--vermelho);
  white-space: nowrap;
  transition: background-color .25s ease;
}

.btn-whats__fone img {
  width: calc(var(--u) * 32);
  height: calc(var(--u) * 32);
  flex: none;
}

.btn-whats:hover,
.btn-whats:focus-visible {
  background-color: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}

.btn-whats:hover .btn-whats__fone,
.btn-whats:focus-visible .btn-whats__fone { background-color: #fff6dc; }

.btn-whats:focus-visible,
.social:focus-visible {
  outline: 3px solid var(--amarelo);
  outline-offset: 4px;
}

/* ---------- Redes sociais ---------- */
.sociais {
  position: absolute;
  top: calc(var(--u) * 54);
  left: calc(var(--u) * 1440);
  display: flex;
  z-index: 3;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--u) * 80);
  height: calc(var(--u) * 67);
  border-radius: 12px;
  transition: transform .25s ease, opacity .25s ease;
}

.social + .social { margin-left: calc(var(--u) * -14); }

.social img {
  width: calc(var(--u) * 67);
  height: calc(var(--u) * 67);
  object-fit: contain;
}

.social:hover { transform: scale(1.08); opacity: .9; }

/* ---------- Bolo ---------- */
.bolo {
  position: absolute;
  left: calc(var(--u) * 980);
  bottom: calc(var(--u) * -126);
  width: calc(var(--u) * 910);
  height: calc(var(--u) * 1137);
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* ---------- Entrada suave ---------- */
@media (prefers-reduced-motion: no-preference) {
  .conteudo > * { animation: subir .8s cubic-bezier(.2, .7, .2, 1) both; }
  .conteudo > *:nth-child(2) { animation-delay: .08s; }
  .conteudo > *:nth-child(3) { animation-delay: .16s; }
  .conteudo > *:nth-child(4) { animation-delay: .24s; }
  .conteudo > *:nth-child(5) { animation-delay: .32s; }
  .bolo { animation: entrarBolo 1.1s cubic-bezier(.2, .7, .2, 1) .2s both; }
}

@keyframes subir {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes entrarBolo {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   Mobile / tablet em retrato
   ========================================================= */
@media (max-width: 1024px), (max-aspect-ratio: 5/4) {
  .stage {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }

  .bg-onda { display: none; }

  .frame {
    position: relative;
    top: auto;
    height: auto;
    transform: none;
    background: var(--vermelho);
    padding: 96px 24px 24px;
    pointer-events: auto;
  }

  .conteudo {
    position: static;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
  }

  .logo {
    width: min(240px, 62vw);
    height: auto;
    aspect-ratio: 344 / 96;
    margin-left: 0;
  }

  .tag {
    margin-top: 32px;
    height: auto;
    font-size: clamp(20px, 4.4vw, 28px);
  }

  .titulo {
    margin-top: 8px;
    width: 100%;
    min-height: 0;
    font-size: clamp(40px, 10.5vw, 72px);
  }

  .texto {
    margin: 20px 0 0;
    width: 100%;
    font-size: clamp(15px, 3.6vw, 20px);
    line-height: 1.35;
  }

  .btn-whats {
    width: 100%;
    max-width: 480px;
    height: 58px;
    margin-top: 28px;
  }

  .btn-whats__label {
    padding-left: 22px;
    font-size: clamp(18px, 4.6vw, 24px);
  }

  .btn-whats__fone {
    width: auto;
    padding: 0 20px;
    gap: 8px;
    font-size: clamp(15px, 3.8vw, 19px);
  }

  .btn-whats__fone img { width: 26px; height: 26px; }

  .sociais {
    top: 20px;
    left: auto;
    right: 16px;
    gap: 4px;
  }

  .social { width: 48px; height: 48px; }
  .social + .social { margin-left: 0; }
  .social img { width: 40px; height: 40px; }

  .onda-mobile {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: -1px;
    line-height: 0;
  }

  .onda-mobile svg {
    display: block;
    width: 100%;
    height: clamp(40px, 9vw, 90px);
  }

  .bolo {
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 2;
    width: min(92vw, 520px);
    height: auto;
    aspect-ratio: 1122 / 1402;
    margin: calc(clamp(40px, 9vw, 90px) * -1 - 36px) 0 0 auto;
  }
}

/* Celulares bem estreitos: botão empilhado */
@media (max-width: 400px) {
  .btn-whats {
    flex-direction: column;
    height: auto;
    border-radius: 28px;
    padding-top: 14px;
  }

  .btn-whats__label { padding: 0 0 12px; }

  .btn-whats__fone {
    width: calc(100% + 4px);
    height: 52px;
    justify-content: center;
    margin: 0 -2px -2px;
    border-radius: 28px;
  }
}
