/* Ajustes leves de responsividade, fluidez e animação de abertura */
html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

html.opening-lock,
html.opening-lock body {
  overflow: hidden;
}

.opening-animation {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background:
    radial-gradient(circle at 25% 20%, rgba(208, 162, 111, 0.15), transparent 42%),
    radial-gradient(circle at 75% 72%, rgba(208, 162, 111, 0.1), transparent 45%),
    linear-gradient(180deg, #070b12 0%, #0a121f 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.opening-animation.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-content {
  text-align: center;
}

.opening-logo-wrap {
  width: clamp(90px, 18vw, 164px);
  margin: 0 auto;
  position: relative;
}

.opening-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -28%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(247, 204, 155, 0.48) 0%, rgba(247, 204, 155, 0.14) 34%, rgba(247, 204, 155, 0) 72%);
  filter: blur(8px);
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
  animation: opening-halo-pulse 960ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards 180ms;
}

.opening-logo-wrap::after {
  content: "";
  position: absolute;
  top: -16%;
  left: -125%;
  width: 64%;
  height: 132%;
  /* brilho deslizante em branco */
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: opening-logo-glint 760ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards 360ms;
}

.opening-logo {
  width: 100%;
  height: auto;
  display: block;
}

.opening-logo-base {
  opacity: 0;
  transform: scale(0.96);
  animation:
    opening-logo-show 360ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards 120ms,
    opening-logo-radiance 940ms ease-out forwards 220ms;
}

.opening-text {
  margin: 1rem auto 0;
  width: auto;
  white-space: normal;
  color: #f7cc9b;
  font-family: "Red Hat Display", "Inter", sans-serif;
  font-size: clamp(1.08rem, 3.4vw, 1.65rem);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translate3d(0, 9px, 0);
  animation: opening-text-show 320ms ease forwards 300ms;
}

@keyframes opening-logo-show {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes opening-halo-pulse {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  45% {
    opacity: 0.95;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.38;
    transform: scale(1.18);
  }
}

@keyframes opening-logo-glint {
  0% {
    left: -125%;
    opacity: 0;
  }
  16% {
    opacity: 0.92;
  }
  100% {
    left: 148%;
    opacity: 0;
  }
}

@keyframes opening-logo-radiance {
  0% {
    filter: drop-shadow(0 0 0 rgba(247, 204, 155, 0));
  }
  42% {
    filter: drop-shadow(0 0 14px rgba(247, 204, 155, 0.62)) drop-shadow(0 0 28px rgba(247, 204, 155, 0.32));
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(247, 204, 155, 0.4));
  }
}

@keyframes opening-text-show {
  from {
    opacity: 0;
    transform: translate3d(0, 9px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* Evita overflow em componentes com largura fixa no mobile */
@media (max-width: 640px) {
  .w-96,
  .w-80,
  .w-72,
  .w-64,
  .max-w-md,
  .max-w-lg {
    width: 100% !important;
    max-width: 100% !important;
  }

  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-4xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

@media (max-width: 1024px) {
  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-4xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Integra melhor o hero com o formulário na primeira dobra do mobile */
@media (max-width: 1023px) {
  .hero-mobile-banner,
  .min-h-screen.bg-white > .relative.min-h-\[50vh\].sm\:min-h-\[70vh\] {
    position: relative;
    overflow: visible;
    align-items: flex-end !important;
    padding-bottom: 3.25rem;
    min-height: clamp(22rem, 70vh, 34rem);
    background-position: center 34% !important;
  }

  .hero-mobile-banner::after,
  .min-h-screen.bg-white > .relative.min-h-\[50vh\].sm\:min-h-\[70vh\]::after {
    content: none;
  }

  .hero-mobile-overlap,
  .min-h-screen.bg-white > .block.lg\:hidden {
    position: relative;
    z-index: 25;
    margin-top: -8.8rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .hero-mobile-overlap > .bg-white,
  .min-h-screen.bg-white > .block.lg\:hidden > .bg-white {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(6px) saturate(118%);
    -webkit-backdrop-filter: blur(6px) saturate(118%);
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
      0 20px 42px rgba(15, 23, 42, 0.24),
      0 3px 10px rgba(15, 23, 42, 0.12);
  }

  .hero-mobile-overlap h2,
  .min-h-screen.bg-white > .block.lg\:hidden h2 {
    color: #111827 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .hero-mobile-overlap .text-gray-700,
  .min-h-screen.bg-white > .block.lg\:hidden .text-gray-700 {
    color: #1f2937 !important;
  }

  .hero-mobile-overlap .text-gray-600,
  .min-h-screen.bg-white > .block.lg\:hidden .text-gray-600 {
    color: #334155 !important;
  }

  .hero-mobile-overlap .border-gray-300,
  .min-h-screen.bg-white > .block.lg\:hidden .border-gray-300 {
    border-color: rgba(71, 85, 105, 0.34) !important;
  }

  .hero-mobile-overlap input::placeholder,
  .min-h-screen.bg-white > .block.lg\:hidden input::placeholder {
    color: #64748b !important;
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .hero-mobile-banner,
  .min-h-screen.bg-white > .relative.min-h-\[50vh\].sm\:min-h-\[70vh\] {
    min-height: clamp(21rem, 64vh, 30rem);
    padding-bottom: 2.75rem;
    background-position: center 30% !important;
  }

  .hero-mobile-overlap,
  .min-h-screen.bg-white > .block.lg\:hidden {
    margin-top: -7.6rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Reduz custo de animações em dispositivos com preferência por movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .opening-logo-wrap::before,
  .opening-logo-wrap::after,
  .opening-logo-base,
  .opening-text {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .opening-logo-wrap::before,
  .opening-logo-wrap::after {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Botão flutuante do WhatsApp sempre circular */
a[href*="wa.me/5511915853292"][class*="fixed"][class*="bottom-6"][class*="right-6"] {
  width: 58px !important;
  height: 58px !important;
  padding: 0 !important;
  border-radius: 9999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28) !important;
}

a[href*="wa.me/5511915853292"][class*="fixed"][class*="bottom-6"][class*="right-6"] > .relative {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 640px) {
  a[href*="wa.me/5511915853292"][class*="fixed"][class*="bottom-6"][class*="right-6"] {
    width: 56px !important;
    height: 56px !important;
  }
}

/* Quote card synced with Admin Loc pricing */
[data-quote-admin="1"] {
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 198, 139, 0.2), transparent 40%),
    linear-gradient(148deg, #ffffff 0%, #f7f9fc 58%, #eef3f9 100%) !important;
  border: 1px solid rgba(100, 116, 139, 0.3) !important;
  border-radius: 20px !important;
  box-shadow:
    0 20px 44px rgba(15, 23, 42, 0.2),
    0 6px 16px rgba(15, 23, 42, 0.1) !important;
}

[data-quote-admin="1"] h2 {
  letter-spacing: 0.015em;
  font-weight: 800 !important;
}

[data-quote-admin="1"] > div:first-child button[type="button"] {
  border-radius: 999px !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.22);
}

[data-quote-admin="1"] input[type="text"],
[data-quote-admin="1"] input[type="email"],
[data-quote-admin="1"] input[type="tel"],
[data-quote-admin="1"] button[role="combobox"] {
  border-radius: 12px !important;
  border-color: rgba(71, 85, 105, 0.35) !important;
  background-color: rgba(255, 255, 255, 0.86) !important;
}

[data-quote-admin="1"] button[type="submit"] {
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0b1220 0%, #1d2b42 100%) !important;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.28);
  letter-spacing: 0.02em;
}

[data-quote-admin="1"] button[type="submit"]:disabled {
  background: #6b7280 !important;
  box-shadow: none !important;
}

.quote-admin-price-panel {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(248, 250, 252, 0.88);
}

.quote-admin-price-head {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  color: #0f172a;
}

.quote-admin-price-status {
  margin-top: 0.35rem;
  font-size: 0.81rem;
  color: #334155;
}

.quote-admin-price-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.quote-admin-price-item {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.45rem 0.48rem;
}

.quote-admin-price-item span {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quote-admin-price-item strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: #0f172a;
  line-height: 1.2;
}

.quote-admin-price-route {
  margin-top: 0.42rem;
  font-size: 0.73rem;
  color: #475569;
  line-height: 1.35;
}

.quote-admin-price-panel.is-found {
  border-color: rgba(16, 185, 129, 0.38);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.82) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.quote-admin-price-panel.is-miss {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.quote-admin-price-panel.is-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.quote-admin-price-panel.is-loading .quote-admin-price-status::after {
  content: " ...";
  animation: quote-admin-dots 1.1s steps(3, end) infinite;
}

@keyframes quote-admin-dots {
  0% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
  }
}

@media (max-width: 480px) {
  .quote-admin-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
