/*
 * LP PME — Unimed Porto Alegre
 * Revisão completa de UX: hero fullscreen, modal conversiva, seções polidas.
 * Referência visual: https://lp.unimedpoa.com.br/pme/
 *
 * Decisões de UX documentadas:
 *   1. Hero ocupa 100vh — headline legível, CTA único, sem formulário inline.
 *   2. Formulário em modal overlay — não compete com hero/conteúdo; abre via JS.
 *   3. Sticky CTA bar no topo após scroll — conversão acessível em qualquer ponto.
 *   4. Seções com ritmo visual claro (branco → verde → escuro → foto → verde → footer).
 *   5. Tipografia com contraste AA+ em todas as superfícies.
 *   6. Mobile-first: grids colapsam em coluna única; modal ocupa tela cheia.
 */

:root {
  --green: #00a14b;
  --green-dark: #0d4d2b;
  --green-bright: #00c853;
  --lime: #c8f7a0;
  --gold: #ffe066;
  --text: #1a1a1a;
  --muted: #4a5568;
  --white: #fff;
  --off-white: #f7faf8;
  --gray-bg: #eef2f5;
  --shadow-lg: 0 20px 60px rgba(0,0,0,.22);
  --shadow-md: 0 8px 28px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.pme {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 100% - 2rem);
  margin: 0 auto;
}

/* ───────────────────────────────────────
   ALERTS (obrigado / erro)
   ─────────────────────────────────────── */
.alert-bar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 900;
  padding: .85rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: .92rem;
  animation: slideDown .4s var(--transition);
}
.alert-bar--ok  { background: #dcfce7; color: #166534; }
.alert-bar--err { background: #fee2e2; color: #991b1b; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ───────────────────────────────────────
   STICKY CTA BAR (aparece após scroll)
   ─────────────────────────────────────── */
.sticky-cta {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 800;
  background: var(--green-dark);
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transform: translateY(-100%);
  transition: transform .35s var(--transition);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta__text {
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  font-weight: 600;
}
.sticky-cta .btn { padding: .5rem 1.25rem; font-size: .75rem; }

/* ───────────────────────────────────────
   HERO — fullscreen, limpo, sem form
   ─────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--green-dark);
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("/static/img/pme/59d8af68-896bbafb-banner-xl-10000001hc0h2001000000.jpg") center/cover no-repeat;
}
@media (max-width: 768px) {
  .hero__bg {
    background-image: url("/static/img/pme/82230d59-banner-xs.jpg");
    background-position: 30% top;
  }
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13,77,43,.92) 0%,
    rgba(13,77,43,.82) 30%,
    rgba(13,77,43,.45) 55%,
    rgba(13,77,43,.15) 100%
  );
}
@media (max-width: 768px) {
  .hero__overlay {
    background: linear-gradient(180deg,
      rgba(13,77,43,.4) 0%,
      rgba(13,77,43,.85) 50%,
      rgba(13,77,43,.95) 100%
    );
  }
}

.hero__inner {
  position: relative; z-index: 2;
  width: min(700px, 100% - 2rem);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
  text-align: left;
}
@media (max-width: 768px) {
  .hero__inner {
    text-align: center;
    width: min(520px, 100% - 2rem);
    padding-bottom: 2rem;
  }
}

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .4rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.hero h1 .hl { color: var(--gold); }

.hero__sub {
  color: rgba(255,255,255,.92);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.55;
}
@media (max-width: 768px) {
  .hero__sub { margin-left: auto; margin-right: auto; }
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
@media (max-width: 768px) {
  .hero__ctas { justify-content: center; }
}

.hero__trust {
  position: relative; z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
  margin-top: 2.5rem;
}
@media (max-width: 768px) {
  .hero__trust { justify-content: center; }
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  font-weight: 600;
}
.hero__trust-item img {
  width: 20px; height: 20px;
  filter: brightness(0) invert(1);
  opacity: .8;
}

/* ───────────────────────────────────────
   BUTTONS
   ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .85rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--lime);
  color: var(--green-dark);
  box-shadow: 0 4px 16px rgba(200,247,160,.35);
}
.btn--primary:hover { filter: brightness(1.04); box-shadow: 0 6px 24px rgba(200,247,160,.5); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.btn--green {
  background: var(--green-bright);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0,200,83,.25);
}
.btn--green:hover { filter: brightness(1.06); }

.btn--dark {
  background: var(--green-dark);
  color: var(--white);
}
.btn--dark:hover { filter: brightness(1.12); }

.btn--white {
  background: var(--white);
  color: var(--green-dark);
  font-weight: 700;
}

/* ───────────────────────────────────────
   SECTIONS
   ─────────────────────────────────────── */
.section {
  padding: clamp(3rem, 7vw, 5rem) 1rem;
}
.section__tag {
  display: block;
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .75rem;
}
.section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 800;
  margin: 0 auto .85rem;
  max-width: 48rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.section .lead-p {
  text-align: center;
  color: var(--muted);
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  font-size: .95rem;
  line-height: 1.6;
}
.cta-row { text-align: center; margin-top: .5rem; }

/* White */
.section--white { background: var(--white); }

/* Green */
.section--green { background: var(--green); color: var(--white); }
.section--green .section__tag { color: var(--lime); }
.section--green h2 { color: var(--white); }
.section--green .lead-p { color: rgba(255,255,255,.88); }

/* Dark */
.section--dark { background: var(--green-dark); color: var(--white); }
.section--dark .section__tag { color: var(--lime); }
.section--dark h2 { color: var(--white); }
.section--dark .lead-p { color: rgba(255,255,255,.82); }

/* Light gray */
.section--light { background: var(--off-white); }

/* ───────────────────────────────────────
   GRIDS
   ─────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.grid--4 { grid-template-columns: repeat(4,1fr); }
.grid--3 { grid-template-columns: repeat(3,1fr); }
.grid--2 { grid-template-columns: repeat(2,1fr); }
@media (max-width: 900px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 520px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* Card genérico */
.card {
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); }

.card--white {
  background: var(--white);
  border: 1px solid #e8edf2;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.card--white:hover { box-shadow: var(--shadow-md); }

.card--glass {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
}
.card--glass:hover { background: rgba(255,255,255,.15); }

.card__icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}
.card p { margin: 0; font-size: .92rem; }
.card--glass .card__icon { filter: brightness(0) invert(1); opacity: .9; }
.card--glass .card__icon[src$=".svg"] { filter: none; }

/* ───────────────────────────────────────
   SPLIT (texto + imagem)
   ─────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.split__text h2 { text-align: left; }
.split__text .lead-p { text-align: left; margin-left: 0; }

.split__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Mini benefits */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (max-width: 900px) { .mini-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .mini-grid { grid-template-columns: 1fr; } }

.mini-item {
  text-align: center;
  padding: 1rem .75rem;
}
.mini-item img {
  width: 44px; height: 44px;
  margin: 0 auto .65rem;
}
.mini-item p {
  margin: 0;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ───────────────────────────────────────
   MODAL (formulário conversivo)
   ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: min(440px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(24px) scale(.97);
  transition: transform .35s var(--transition);
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}
@media (max-width: 520px) {
  .modal {
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 16px 16px 0 0;
    align-self: flex-end;
  }
}

.modal__head {
  background: var(--green);
  color: var(--white);
  padding: 1.15rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  line-height: 1.35;
  position: relative;
}
.modal__close {
  position: absolute;
  top: .75rem; right: .75rem;
  background: rgba(255,255,255,.15);
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal__close:hover { background: rgba(255,255,255,.3); }

.modal__body { padding: 1.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .3rem;
}
.form-group input {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid #d1d8e0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,161,75,.12);
}

.checkbox-row {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.checkbox-row input[type="checkbox"] {
  margin-top: .15rem;
  flex-shrink: 0;
  accent-color: var(--green);
}

.modal .btn { width: 100%; }

/* ───────────────────────────────────────
   FOOTER
   ─────────────────────────────────────── */
.footer {
  background: var(--gray-bg);
  padding: 2.5rem 1rem;
  font-size: .72rem;
  color: var(--muted);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.footer__brand img { height: 44px; }
.footer__trust {
  text-align: center;
  flex: 1;
  min-width: 200px;
}
.footer__trust strong { display: block; color: var(--green-dark); margin-bottom: .3rem; font-size: .78rem; }
.footer__trust a { color: var(--green); font-weight: 600; }

.footer__legal {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.5;
  text-align: justify;
}

.footer__kaizen {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #dde3ea;
}
.footer__kaizen img { height: 32px; margin: 0 auto; }
