/* =================================================================
   Prosperisa by vinci — estilos globais
   (variáveis, fontes, gradientes complexos, efeitos e animações)
   Layout/espaçamento ficam majoritariamente no Tailwind (index.html)
   ================================================================= */

/* ----------------------------------------------------------------
   1. TOKENS GLOBAIS — valores extraídos do Figma (node 46:4)
   ---------------------------------------------------------------- */
:root {
  --primary: #1917f5;
  /* azul de marca / botões / links            */
  --secondary: #080078;
  /* azul profundo dos títulos                 */
  --indigo: #1d0e70;
  /* indigo (footer / card previdência)        */
  --green: #02d458;
  /* verde EnergisaPrev                        */
  --card-indigo: #1d0e70;
  /* fundo card "Prosperisa multi"             */
  --card-green: #1d5435;
  /* fundo card "Prosperisa corporativo"       */
  --teal: #08363a;
  /* textos do diagrama                        */

  --background: #ffffff;
  --surface: #f5f5f5;
  /* fundo do card CTA                         */
  --text: #080078;
  --muted: rgba(8, 0, 120, 0.5);
  --border: #c1c1c1;

  --hero-tint: rgba(30, 62, 89, 0.26);
  --steel: #1c3f5d;
  /* gradiente da seção longevidade            */
}

/* ----------------------------------------------------------------
   2. BASE / TIPOGRAFIA
   ---------------------------------------------------------------- */
* {
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
}

/* ----------------------------------------------------------------
   3. CONTAINERS / LARGURA
   - Banners/cards ocupam ~95% da tela (não encostam nas laterais)
   - Texto fica alinhado ~80px para dentro da borda do banner
   ---------------------------------------------------------------- */
.frame {
  overflow-x: clip;
}

/* contém grafismos sem quebrar o sticky */

/* margem externa dos banners full-bleed (~2,5% de cada lado = 95%) */
.bleed {
  padding-inline: max(16px, 2.5vw);
}

/* recuo interno de conteúdo dentro de um banner */
.pad-in {
  padding-inline: clamp(20px, 5.5vw, 80px);
}

/* seções só de texto: alinham com o conteúdo interno dos banners */
.inset {
  padding-inline: calc(max(16px, 2.5vw) + clamp(20px, 5.5vw, 80px));
}

/* ----------------------------------------------------------------
   4. LINHA DE DESTAQUE (Vector 152×3, gradiente da marca)
   ---------------------------------------------------------------- */
.accent-line {
  width: 152px;
  height: 4px;
  background: url("assets/icons/accent-line.svg") no-repeat center / contain;
}

/* ----------------------------------------------------------------
   5. HERO
   ---------------------------------------------------------------- */
.hero {
  min-height: calc(100vh - 36px);
  height: auto;
}

.hero-media img {
  will-change: transform;
}

/* escurecimento para contraste do texto branco (topo + esquerda) */
.hero-scrim {
  background: linear-gradient(to bottom, rgba(13, 27, 46, 0.55) 0%, rgba(13, 27, 46, 0) 26%), linear-gradient(287deg, rgba(13, 27, 46, 0.62) 0%, rgba(13, 27, 46, 0.18) 38%, rgba(13, 27, 46, 0) 62%);
  opacity: 0.5;
}

@media (min-width: 1024px) {
  .hero {
    height: 784px;
  }
}

/* card de apoio do hero (texto branco sobre a foto) */
.hero-card h2,
.hero-card p {
  text-shadow: 0 1px 14px rgba(8, 18, 33, 0.55);
}

.hero-card .btn-light {
  text-shadow: none;
}

/* ----------------------------------------------------------------
   6. SEÇÃO PROBLEMA / SOLUÇÃO
   ---------------------------------------------------------------- */
/* escurecimento inferior sobre a foto (Figma: gradiente → preto) */
.problem-photo-fade {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ----------------------------------------------------------------
   HEADER fixo — fica azul ao rolar
   ---------------------------------------------------------------- */
#siteHeader {
  background: transparent;
  padding-inline: max(16px, 2.5vw);
}

#siteHeader.is-scrolled {
  background: var(--secondary);
  box-shadow: 0 6px 28px rgba(8, 0, 120, 0.28);
}

/* ----------------------------------------------------------------
   7. CARDS DE PRODUTO — full-bleed, empilham/sobrepõem no scroll
   ---------------------------------------------------------------- */
.cards-stack {
  display: flex;
  flex-direction: column;
}

/* logos coloridos exportados ficam brancos sobre cards escuros */
.logo-white {
  filter: brightness(0) invert(1);
}

.product-card {
  isolation: isolate;
  position: sticky;
  box-shadow: 0 -10px 44px rgba(8, 0, 120, 0.18);
}

.product-card+.product-card {
  margin-top: 10px;
}

/* último card pode encostar mais ao topo (releva o sticky no fim) */
.cards-stack {
  padding-bottom: 10px;
}

.card-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* ----------------------------------------------------------------
   8. LONGEVIDADE — overlay em gradiente (escuro à esquerda)
   ---------------------------------------------------------------- */
.longevity {
  min-height: 480px;
}

.longevity-fade {
  background: linear-gradient(90deg,
      var(--steel) 0%,
      var(--steel) 13.84%,
      rgba(28, 63, 93, 0) 54.9%,
      rgba(28, 63, 93, 0) 65.77%);
}

@media (min-width: 1024px) {
  .longevity {
    min-height: 787px;
  }
}

/* ----------------------------------------------------------------
   9. DIAGRAMA ORBITAL — halos concêntricos de fundo
   ---------------------------------------------------------------- */
.ecosystem-diagram {
  isolation: isolate;
}

.halo-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.halo-1 {
  width: 902px;
  height: 902px;
  background: radial-gradient(circle, rgba(25, 23, 245, 0.05) 0%, rgba(25, 23, 245, 0) 70%);
}

.halo-2 {
  width: 1173px;
  height: 1173px;
  border: 1px solid rgba(8, 0, 120, 0.04);
}

.halo-3 {
  width: 1439px;
  height: 1439px;
  border: 1px solid rgba(8, 0, 120, 0.03);
}

/* ----------------------------------------------------------------
   10. CTA — gradiente de título e foto
   ---------------------------------------------------------------- */
.cta {
  min-height: 360px;
}

@media (min-width: 1024px) {
  .cta {
    min-height: 470px;
  }
}

/* grafismo do CTA — discreto, ao fundo */
.cta-swoosh {
  width: 46%;
  max-width: 540px;
  opacity: 0.5;
}

@media (max-width: 1023px) {
  .cta-swoosh {
    width: 78%;
    opacity: 0.32;
  }
}

.text-cta-gradient {
  background-image: linear-gradient(98.57deg,
      #080078 32.02%,
      #4499a0 59.63%,
      #6acc6b 73.93%,
      rgba(15, 0, 222, 0) 99.39%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------------------------------------------------------
   11. BOTÕES
   ---------------------------------------------------------------- */
.btn-light {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(8, 0, 120, 0.10);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(8, 0, 120, 0.18);
}

.btn-primary {
  background-image: linear-gradient(98.57deg, #080078 0%, #1917f5 60%, #4499a0 120%);
  box-shadow: 0 8px 24px rgba(8, 0, 120, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-outline-light {
  border: 1px solid #fefefe;
  background: transparent;
  transition: background .2s ease;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* texto em gradiente do botão "Conheça a EnergisaPrev" */
.text-energisa-gradient {
  background-image: linear-gradient(90deg, #fefefe 0%, #ffffff 61.56%, #dcb4db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* seta dos botões */
.btn-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") no-repeat center / contain;
}

.btn-arrow-light {
  background-color: #ffffff;
}

/* ----------------------------------------------------------------
   12. ANIMAÇÕES — revelar ao rolar
   ---------------------------------------------------------------- 
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
*/
/* ----------------------------------------------------------------
   13. MODAL DE CONTATO
   ---------------------------------------------------------------- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}

.contact-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 0, 60, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.contact-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 22px;
  padding: 44px clamp(24px, 5vw, 52px) 40px;
  box-shadow: 0 30px 80px rgba(8, 0, 80, 0.35);
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2, .8, .25, 1), opacity .35s ease;
}

.contact-modal.is-open .contact-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* faixa de gradiente no topo do card */
.contact-modal__dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #080078 0%, #1917f5 38%, #4499a0 70%, #6acc6b 100%);
}

.contact-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: var(--indigo);
  background: #f1f0f8;
  transition: background .2s ease, transform .2s ease;
}

.contact-modal__close:hover {
  background: #e4e2f3;
  transform: rotate(90deg);
}

.contact-modal__head {
  margin-bottom: 26px;
}

.contact-modal__head .accent-line {
  margin-bottom: 18px;
}

.contact-modal__head h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 500;
  color: var(--secondary);
  line-height: 1.12;
}

.contact-modal__head p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

/* honeypot escondido */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cf-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .cf-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.cf-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--indigo);
  margin-bottom: 7px;
}

.cf-field label span {
  color: #eb652b;
}

.cf-field input,
.cf-field textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--secondary);
  background: #f7f7fb;
  border: 1.5px solid #e6e4f1;
  border-radius: 10px;
  padding: 13px 15px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  resize: vertical;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: #a9a6c0;
}

.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(25, 23, 245, 0.12);
}

.cf-field.has-error input,
.cf-field.has-error textarea {
  border-color: #e23b4e;
  background: #fff5f6;
}

.contact-modal__submit {
  margin-top: 8px;
  width: 100%;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background-image: linear-gradient(98.57deg, #080078 0%, #1917f5 60%, #4499a0 130%);
  box-shadow: 0 10px 26px rgba(8, 0, 120, 0.28);
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
}

.contact-modal__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.contact-modal__submit:disabled {
  opacity: .7;
  cursor: progress;
  transform: none;
}

/* spinner de carregamento */
.cf-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cf-spin .7s linear infinite;
}

.contact-modal__submit.is-loading .cf-spinner {
  display: inline-block;
}

.contact-modal__submit.is-loading .btn-arrow {
  display: none;
}

@keyframes cf-spin {
  to {
    transform: rotate(360deg);
  }
}

.cf-status {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  min-height: 20px;
}

.cf-status.is-success {
  color: #0f9d58;
  font-weight: 500;
}

.cf-status.is-error {
  color: #e23b4e;
  font-weight: 500;
}

/* trava o scroll do body quando o modal está aberto */
body.modal-open {
  overflow: hidden;
}