/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --navy-900: #0C1130;
  --navy-800: #131A44;
  --navy-700: #1A2455;
  --navy-500: #1C2861;
  --gold: #C19851;
  --gold-soft: #D7B478;
  --text: #F2F4FB;
  --text-muted: #A6AECB;
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --shadow: 0 24px 60px rgba(6, 9, 26, 0.55);
}

/* ==========================================================================
   2. Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

img {
  max-width: 100%;
}

/* ==========================================================================
   3. Base
   ========================================================================== */
body {
  background: var(--navy-900);
  color: var(--text);
  font-family: "Karla", system-ui, sans-serif;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
}

/* ==========================================================================
   4. Composição gráfica — o fundo é construído em CSS, sem fotografia
   ========================================================================== */
.page-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.page-glow--one {
  width: 620px;
  height: 620px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(193, 152, 81, 0.20), transparent 70%);
}

.page-glow--two {
  width: 720px;
  height: 720px;
  bottom: -260px;
  left: -180px;
  background: radial-gradient(circle, rgba(28, 40, 97, 0.55), transparent 70%);
}

.page-hex {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(60deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(-60deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 64px);
  background-size: 64px 110px;
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 56px);
  max-width: var(--max-width);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  height: 38px;
  width: auto;
}

.header-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--gold);
}

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 5vw, 64px);
  max-width: var(--max-width);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--gold);
  margin: 0 0 16px;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.eyebrow--center {
  justify-content: center;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.06rem;
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 0 28px;
}

.benefits {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.benefit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.benefit__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(193, 152, 81, 0.14);
  border: 1px solid rgba(193, 152, 81, 0.35);
  color: var(--gold);
  font-size: 0.8rem;
}

.benefit strong {
  display: block;
}

.benefit small {
  color: var(--text-muted);
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(242, 244, 251, 0.10);
  padding-top: 22px;
}

.social-proof p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.proof-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  font-family: "Poppins", sans-serif;
}

/* ==========================================================================
   7. Card do chat
   ========================================================================== */
.chat-card {
  background: linear-gradient(180deg, rgba(26, 36, 85, 0.92), rgba(19, 26, 68, 0.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(242, 244, 251, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(78vh, 720px);
}

.chat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(242, 244, 251, 0.08);
}

.agent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
}

.agent__avatar span {
  width: 8px;
  height: 8px;
  background: #3FD08A;
  border-radius: 50%;
  position: absolute;
  right: 0;
  bottom: 0;
  border: 2px solid var(--navy-700);
}

.agent strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.94rem;
}

.agent small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(63, 208, 138, 0.10);
  color: #7FE3B4;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
}

.progress-area {
  padding: 0 20px 14px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.progress-track {
  height: 4px;
  background: rgba(242, 244, 251, 0.10);
  border-radius: 999px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 999px;
  transition: width 0.35s ease;
  display: block;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.message {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

/* .message--bot usa a grade padrão de .message (avatar + bolha), sem
   declaração adicional. */

.message--user {
  justify-content: flex-end;
}

.message--user .bubble {
  background: var(--gold);
  color: var(--navy-900);
}

.bubble {
  background: rgba(242, 244, 251, 0.06);
  border: 1px solid rgba(242, 244, 251, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.55;
  max-width: 88%;
}

.bubble p {
  margin: 0 0 8px;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: piscar 1.2s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.30s;
}

@keyframes piscar {
  0%, 60%, 100% {
    opacity: 0.25;
  }
  30% {
    opacity: 1;
  }
}

/* ==========================================================================
   8. Composer
   ========================================================================== */
.composer {
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(242, 244, 251, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--navy-900);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  font-weight: 700;
  font-size: 1rem;
  font-family: "Karla", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

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

.primary-button:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.options {
  display: grid;
  gap: 8px;
}

.option-button {
  text-align: left;
  background: rgba(242, 244, 251, 0.05);
  border: 1px solid rgba(242, 244, 251, 0.14);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-button:hover {
  border-color: var(--gold);
  background: rgba(193, 152, 81, 0.12);
}

.field {
  display: grid;
  gap: 8px;
}

.field__input {
  background: rgba(12, 17, 48, 0.65);
  border: 1px solid rgba(242, 244, 251, 0.16);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text);
  font: inherit;
  width: 100%;
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 152, 81, 0.18);
}

.field__error {
  color: #FF9A8B;
  font-size: 0.84rem;
  min-height: 1.2em;
}

.privacy-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  margin: 0;
}

.error-box {
  background: rgba(255, 120, 100, 0.10);
  border: 1px solid rgba(255, 120, 100, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 8px 4px;
}

/* Hexágono de destaque do bloco de sucesso: reaproveita o clip-path e a cor
   de .proof-mark, redimensionado para 56px neste contexto. */
.success .proof-mark {
  width: 56px;
  height: 56px;
  font-size: 1.3rem;
}

.success h3 {
  margin: 0;
}

.success p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.success .primary-button {
  width: 100%;
}

/* ==========================================================================
   9. Honeypot — invisível sem display: none, para não ser ignorado por bots
   ========================================================================== */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   10. Seção "Como funciona"
   ========================================================================== */
.how {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 56px);
  max-width: var(--max-width);
  margin-inline: auto;
  text-align: center;
}

.how h2 {
  margin: 0 0 40px;
}

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

.steps article {
  background: rgba(242, 244, 251, 0.04);
  border: 1px solid rgba(242, 244, 251, 0.08);
  border-radius: var(--radius);
  padding: 26px;
  text-align: left;
}

.steps article span {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.steps article h3 {
  margin: 0 0 8px;
}

.steps article p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px 56px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--gold-soft);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* .brand--footer não recebe regra própria: herda de .brand/.brand__logo,
   que já fixam a altura do logo (38px no desktop, 30px em telas pequenas —
   ver seção 12), garantindo que o logo do rodapé nunca fique maior que o
   do header. */

/* ==========================================================================
   12. Responsivo
   ========================================================================== */
@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .chat-card {
    order: -1;
    max-height: none;
  }
}

@media (max-width: 480px) {
  .site-header,
  .hero,
  .how {
    padding-inline: 16px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
  }

  .brand__logo {
    height: 30px;
  }
}

/* ==========================================================================
   13. Acessibilidade
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
