/* ─── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-deep:    #0a1f6e;
  --blue-mid:     #1a4bcc;
  --blue-vivid:   #1e7eef;
  --blue-bright:  #29c0f0;
  --blue-pale:    #e8f3fd;
  --blue-glass:   rgba(30,126,239,.08);
  --text-dark:    #0d1b3e;
  --text-mid:     #3a4f7a;
  --text-light:   #7a90b8;
  --white:        #ffffff;
  --surface:      #f5f9ff;
  --border:       rgba(30,126,239,.15);
  --shadow-sm:    0 2px 12px rgba(10,31,110,.08);
  --shadow-md:    0 8px 32px rgba(10,31,110,.12);
  --shadow-lg:    0 20px 60px rgba(10,31,110,.16);
  --radius:       16px;
  --radius-sm:    10px;
  --grad-main:    linear-gradient(135deg, var(--blue-deep), var(--blue-vivid), var(--blue-bright));
  --grad-btn:     linear-gradient(135deg, var(--blue-vivid) 0%, var(--blue-bright) 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── NAVBAR ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 5%;
  background: rgba(5, 15, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(41, 192, 240, 0.12);
  transition: background 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: rgb(5, 15, 46);
  box-shadow: 0 4px 32px rgba(5, 15, 46, 0.6);
}

/* ── Logo ── */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  z-index: 2;
}
.nav-logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* ── Links centro ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.nav-links li a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

/* ── Ações direita ── */
.nav-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

/* ── Botão CTA ── */
.nav-cta {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--blue-bright);
  text-decoration: none;
  border: 1.5px solid rgba(41, 192, 240, 0.45);
  padding: 8px 18px;
  border-radius: 100px;
  white-space: nowrap;
  transition: all 0.25s;
}
.nav-cta:hover {
  background: var(--blue-bright);
  color: var(--blue-deep);
  border-color: var(--blue-bright);
}

/* ── Hamburguer ── */
.nav-hamburger {
  display: none; /* oculto no desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255, 255, 255, 0.14); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile ── */
@media (max-width: 768px) {

  nav { height: 64px; padding: 0 4%; }

  /* Mostrar hamburguer, esconder CTA */
  .nav-hamburger { display: flex !important; }
  .nav-cta       { display: none !important; }

  /* Links viram dropdown */
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: rgba(5, 15, 46, 0.99);
    border-bottom: 1px solid rgba(41, 192, 240, 0.2);
    padding: 8px 0 16px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links li a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 0;
  }
  .nav-links li a:hover {
    background: rgba(41, 192, 240, 0.08);
    color: #fff;
  }
}

/* ─── HERO ─────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 5% 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #050f2e 0%, #0a1f6e 45%, #0f3a9e 75%, #0e2d82 100%);
}

/* Mesh background */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(41,192,240,.2) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 85%, rgba(30,126,239,.25) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 8% 75%, rgba(41,192,240,.12) 0%, transparent 55%);
  pointer-events: none;
}

/* Floating dots grid */
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(30,126,239,.12) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 80%);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .78rem; font-weight: 500;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeUp .7s .1s both;
}
.hero-badge span.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-bright);
  animation: pulse 2s infinite;
}

.hero-headline {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #ffffff;
  max-width: 780px;
  margin-bottom: 20px;
  animation: fadeUp .7s .2s both;
}
.hero-headline .gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.6);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 48px;
  animation: fadeUp .7s .3s both;
}

/* ─── SEARCH BOX ────────────────────────────────────── */
.search-box {
  width: 100%; max-width: 760px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp .7s .4s both;
  transition: border-color .3s, box-shadow .3s;
  position: relative; z-index: 2;
}
.search-box:focus-within {
  border-color: var(--blue-vivid);
  box-shadow: 0 20px 60px rgba(30,126,239,.2), 0 0 0 4px rgba(30,126,239,.08);
}

.search-field {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.search-field:last-of-type { border-bottom: none; }

.search-icon {
  flex-shrink: 0; width: 22px; height: 22px;
  color: var(--blue-vivid); opacity: .7;
}

.search-field input {
  flex: 1; border: none; outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; color: var(--text-dark);
  background: transparent;
}
.search-field input::placeholder { color: var(--text-light); font-weight: 300; }

.search-actions {
  display: flex; align-items: center;
  padding: 16px 20px;
  gap: 12px;
  background: var(--surface);
}

.search-hint {
  flex: 1; font-size: .78rem; color: var(--text-light);
  display: flex; align-items: center; gap: 6px;
}
.search-hint svg { width: 14px; height: 14px; opacity: .6; }

.btn-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--grad-btn);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: .95rem;
  border: none; border-radius: 12px;
  padding: 14px 28px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(30,126,239,.35);
  transition: transform .2s, box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn-search:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(30,126,239,.45); }
.btn-search:active { transform: translateY(0); }
.btn-search:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-search svg { width: 18px; height: 18px; }

/* spinner */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}
.loading .spinner { display: block; }
.loading .btn-icon { display: none; }

/* success / error feedback */
.feedback-msg {
  display: none; align-items: center; gap: 8px;
  margin-top: 16px; font-size: .88rem; font-weight: 500;
  padding: 10px 20px; border-radius: 100px;
  animation: fadeUp .4s both;
}
.feedback-msg.success { display: flex; background: rgba(22,163,74,.1); color: #16a34a; }
.feedback-msg.error   { display: flex; background: rgba(220,38,38,.1); color: #dc2626; }

/* ─── TRUST STRIP ───────────────────────────────────── */
.trust-strip {
  margin-top: 56px;
  display: flex; align-items: center; justify-content: center;
  gap: 32px; flex-wrap: wrap;
  animation: fadeUp .7s .55s both;
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: rgba(255,255,255,.45); font-weight: 400;
}
.trust-item svg { width: 16px; height: 16px; color: var(--blue-bright); }

/* ─── SECTION COMMONS ───────────────────────────────── */
section { padding: 100px 5%; }
.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-vivid);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800; letter-spacing: -.02em;
  color: var(--text-dark); line-height: 1.15;
  max-width: 560px; margin-bottom: 16px;
}
.section-desc {
  font-size: 1rem; color: var(--text-mid); font-weight: 300;
  max-width: 480px; margin-bottom: 56px;
}

/* ─── DIFERENCIAIS ──────────────────────────────────── */
#diferenciais { background: var(--surface); }
#diferenciais .inner { max-width: 1140px; margin: 0 auto; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-btn);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 52px; height: 52px;
  background: var(--blue-glass);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: background .3s;
}
.card:hover .card-icon { background: var(--blue-pale); }
.card-icon svg { width: 26px; height: 26px; color: var(--blue-vivid); }

.card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 10px;
}
.card p { font-size: .9rem; color: var(--text-mid); font-weight: 300; line-height: 1.65; }

/* ─── COMO FUNCIONA ─────────────────────────────────── */
#como-funciona .inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}

.steps-list { display: flex; flex-direction: column; gap: 0; }

.step {
  display: flex; gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: all .3s;
}
.step:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-glass);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: .95rem;
  color: var(--blue-vivid);
  transition: all .3s;
}
.step:hover .step-num {
  background: var(--grad-btn);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 16px rgba(30,126,239,.3);
}

.step-content h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--text-dark);
  margin-bottom: 6px;
}
.step-content p { font-size: .88rem; color: var(--text-mid); font-weight: 300; line-height: 1.6; }

/* visual right side */
.como-visual {
  background: var(--blue-glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 36px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.como-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30,126,239,.12), transparent 70%);
  pointer-events: none;
}

.chat-bubble {
  padding: 14px 18px; border-radius: 14px;
  font-size: .88rem; line-height: 1.55; max-width: 90%;
  animation: fadeUp .5s both;
}
.chat-bubble.user {
  background: var(--blue-vivid); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
  background: var(--white); color: var(--text-dark);
  align-self: flex-start; border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.chat-bubble.ai .ai-label {
  font-size: .7rem; font-weight: 600; color: var(--blue-vivid);
  letter-spacing: .06em; text-transform: uppercase;
  display: block; margin-bottom: 4px;
}

.result-card-mini {
  background: var(--white);
  border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: center;
  align-self: flex-start;
}
.result-thumb {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--grad-btn);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.result-thumb svg { width: 26px; height: 26px; color: rgba(255,255,255,.9); }
.result-info { font-size: .82rem; }
.result-info strong { display: block; color: var(--text-dark); font-weight: 600; margin-bottom: 2px; }
.result-info span { color: var(--text-mid); font-weight: 300; }
.match-badge {
  margin-left: auto; background: rgba(22,163,74,.1);
  color: #16a34a; font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 100px;
}

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  background: var(--text-dark);
  padding: 48px 5%;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}

footer img.footer-logo { height: 32px; filter: brightness(0) invert(1); opacity: .9; }

.footer-nav {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.footer-nav a {
  font-size: .85rem; color: rgba(255,255,255,.5);
  text-decoration: none; padding: 6px 14px;
  border-radius: 100px; border: 1px solid transparent;
  transition: all .25s; cursor: pointer;
  font-weight: 400;
}
.footer-nav a:hover {
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
}

footer p.copy {
  font-size: .75rem; color: rgba(255,255,255,.3);
  letter-spacing: .03em;
}

/* ─── MODAL ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,31,110,.45);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-card {
  background: var(--white);
  border-radius: 24px 24px 16px 16px;
  width: 100%; max-width: 560px;
  max-height: 80vh; overflow-y: auto;
  padding: 36px 32px;
  transform: translateY(40px); transition: transform .35s cubic-bezier(.22,1,.36,1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal-card { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.4rem; color: var(--text-dark);
}
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid); transition: background .2s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--blue-pale); color: var(--blue-vivid); }
.modal-body { font-size: .92rem; color: var(--text-mid); font-weight: 300; line-height: 1.75; }
.modal-body h4 {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 1rem; color: var(--text-dark); margin: 20px 0 8px;
}
.modal-body p { margin-bottom: 12px; }
.modal-body a { color: var(--blue-vivid); }

/* ─── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.85); }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 72px 5%; }

  .search-actions { flex-direction: column; align-items: stretch; }
  .search-hint { justify-content: center; }
  .btn-search { justify-content: center; }

  #como-funciona .inner { grid-template-columns: 1fr; gap: 48px; }
  .como-visual { display: none; }

  .trust-strip { gap: 20px; }
}