/* =========================================================
   Aulão Gratuito — Altis Lisboa — V5 (segmentação: Terapeutas)
   Fonte de verdade visual: Referencia/referencia desktop.png
   e Referencia/referencia mobile.png
   ========================================================= */

@font-face {
  font-family: 'Rizoma';
  src: url('fonts/RizomaM-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta idêntica à V4 — mesma identidade de marca do funil */
  --hero-dark-1: #0d2318;   /* verde escuro topo do hero */
  --hero-dark-2: #04140c;   /* verde quase preto, cantos/profundidade */
  --form-card-bg: #0e2a1e;  /* verde do card de formulário (levemente mais claro que o hero) */
  --footer-bg: #04140c;

  --gold: #c9a052;
  --gold-strong: #d8ae5e;
  --gold-dark: #a9803c;

  --cream: #f2efe6;
  --cream-card: #f7f4ec;
  --input-bg: #f6f3ee;

  --text-dark: #1c2b22;
  --text-muted-dark: #5c6b61;
  --text-cream: #f5f2ea;
  --text-muted-light: rgba(245, 242, 234, 0.68);

  --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 14px;
  --radius-full: 999px;

  --font-display: 'Rizoma', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --container-width: 1440px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, blockquote { margin: 0; }
button { font-family: inherit; }
svg { flex-shrink: 0; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

.text-gold { color: var(--gold-strong); }
strong.text-gold { font-weight: 700; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 8% 0%, var(--hero-dark-1) 0%, var(--hero-dark-2) 62%);
  overflow: hidden;
  padding-top: 44px;
  padding-bottom: 0;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(210, 170, 100, 0.16) 0%, rgba(210, 170, 100, 0) 60%),
    linear-gradient(115deg, rgba(4, 20, 12, 0.94) 0%, rgba(4, 20, 12, 0.55) 42%, rgba(4, 20, 12, 0.15) 62%, rgba(4, 20, 12, 0) 78%);
  pointer-events: none;
}

.hero__photo {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__photo--desktop {
  /* Posicionamento real acontece em @media (min-width: 1025px), onde a foto
     vira um background full-bleed atrás de todo o .hero — ver bloco
     desktop mais abaixo. */
  display: none;
}

.hero__photo--mobile {
  top: 0;
  left: 0;
  width: 100%;
  height: 340px;
  display: block;
  object-position: 60% 10%;
}
.hero__photo--mobile::after {
  content: '';
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: block;
  padding-bottom: 48px;
}

.hero__content {
  max-width: 640px;
  padding-top: 8px;
}

.hero__logo {
  width: 260px;
  height: auto;
  margin-bottom: 28px;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-cream);
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.hero__paragraph {
  margin-top: 22px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted-light);
  max-width: 560px;
}

.hero__divider {
  width: 68px;
  height: 3px;
  background: var(--gold);
  margin: 26px 0 24px;
  border-radius: var(--radius-full);
}

/* ---------- info bar (data / hora / formato) ---------- */
.info-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(201, 160, 82, 0.45);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.info-bar::-webkit-scrollbar {
  display: none;
}

.info-bar__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-bar__icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
  flex-shrink: 0;
}

.info-bar__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  white-space: nowrap;
}
.info-bar__text strong {
  color: var(--text-cream);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.info-bar__text span {
  color: var(--text-muted-light);
  font-size: 0.82rem;
}

.info-bar__divider {
  width: 1px;
  height: 30px;
  background: rgba(201, 160, 82, 0.35);
}

/* ---------- CTA (abre o form-card em pop-up, mobile e desktop) + backdrop ---------- */
/* No desktop o botão acompanha o tamanho do texto (não esticado à largura
   da coluna, senão vira uma pílula enorme e vazia nas pontas). No mobile
   ele volta a ocupar a largura toda — ver @media max-width:1025px. */
.btn-cta.btn-cta--mobile-open {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 22px;
}

.modal-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 20, 12, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

/* O form-card já é sempre um modal fixo (ver .form-card abaixo) — .is-success
   só precisa garantir visibilidade mesmo se, por algum motivo, .is-open não
   estiver presente. Nesse momento a promessa/subpromessa do hero ficam
   escondidas (ver .thankyou-active). */
.form-card.is-success {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

body.thankyou-active .hero__headline,
body.thankyou-active .hero__paragraph {
  visibility: hidden;
}

/* =========================================================
   FORM CARD — sempre um modal (mobile e desktop), escondido até
   ganhar .is-open (aberto pelo botão CTA, ver script.js).
   ========================================================= */
.form-card {
  background: var(--form-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 34px 30px;
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.form-card.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.form-card__close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(245, 242, 234, 0.1);
  color: var(--text-cream);
  cursor: pointer;
}
.form-card__close svg { width: 16px; height: 16px; }

.form-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-cream);
  font-size: 1.7rem;
  text-align: center;
  line-height: 1.25;
}

.form-card__subtitle {
  text-align: center;
  color: var(--text-muted-light);
  font-size: 0.86rem;
  margin-top: 8px;
  margin-bottom: 22px;
}

#captureForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border-radius: var(--radius-full);
  padding: 0 16px;
  height: 52px;
}

.input-group__icon {
  width: 19px;
  height: 19px;
  color: #8a8577;
  margin-right: 10px;
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--text-dark);
  min-width: 0;
  min-height: 44px;
}
.input-group input::placeholder { color: #8f8a7c; }

.btn-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--hero-dark-2);
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 16px;
  min-height: 56px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-top: 8px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-cta:hover { background: var(--gold-strong); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta:focus-visible { outline: 3px solid var(--text-cream); outline-offset: 2px; }

.btn-cta__icon { width: 18px; height: 18px; }

.btn-cta__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(4, 20, 12, 0.25);
  border-top-color: var(--hero-dark-2);
  animation: spin 0.7s linear infinite;
}

.btn-cta.is-loading .btn-cta__spinner { display: inline-block; }
.btn-cta.is-loading .btn-cta__icon,
.btn-cta.is-loading .btn-cta__label { opacity: 0.55; }
.btn-cta.is-loading { cursor: wait; pointer-events: none; }

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

.form-card__disclaimer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  color: var(--text-muted-light);
  font-size: 0.78rem;
  margin-top: 14px;
}
.form-card__disclaimer svg {
  width: 13px;
  height: 13px;
  color: var(--gold);
  flex-shrink: 0;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: var(--text-cream);
  padding: 8px 4px 4px;
}
.form-success[hidden] { display: none; }
.form-success svg {
  width: 44px;
  height: 44px;
  color: var(--gold-strong);
  flex-shrink: 0;
}
.form-success h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--text-cream);
  line-height: 1.25;
}
.form-success p { font-size: 0.94rem; line-height: 1.55; color: var(--text-muted-light); max-width: 340px; }
.form-success p strong { color: var(--gold-strong); font-weight: 700; }
.form-success .btn-cta {
  width: 100%;
  margin-top: 6px;
  text-decoration: none;
}

.form-card.is-success #captureForm { display: none; }
.form-card.is-success .form-card__subtitle { display: none; }

/* =========================================================
   TARJA DE FECHAMENTO
   ========================================================= */
.closing-banner {
  background: linear-gradient(100deg, var(--gold-dark) 0%, var(--gold) 45%, var(--gold-strong) 100%);
  padding: clamp(40px, 6vw, 64px) 0;
}

.closing-banner__inner {
  display: flex;
  justify-content: center;
}

.closing-banner__text {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--hero-dark-2);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  line-height: 1.45;
  text-align: center;
  max-width: 780px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--footer-bg);
  padding: 26px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer__logo {
  width: auto;
  height: 22px;
  flex-shrink: 0;
}
.footer__brand span {
  color: var(--text-muted-light);
  font-size: 0.85rem;
}

.footer__items {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted-light);
  font-size: 0.83rem;
  white-space: nowrap;
}
.footer__item svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
  flex-shrink: 0;
}

/* =========================================================
   TRUST ROW (mobile) — selos de confiança dentro do hero,
   logo abaixo do info-bar, igual à referência mobile. No
   desktop o footer já cobre essa função (ver .footer__items).
   ========================================================= */
.trust-row {
  display: none;
}
.trust-row__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted-light);
  font-size: 0.8rem;
  line-height: 1.35;
}
.trust-row__item svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

/* =========================================================
   RESPONSIVE — breakpoint principal 1024px
   ========================================================= */

/* ----- Desktop / tablet-landscape (>= 1025px) ----- */
@media (min-width: 1025px) {
  .hero__photo--mobile { display: none; }

  /* A foto agora é um background full-bleed atrás de todo o .hero (mesmo
     padrão da versão mobile), e não mais um item de grid: isso garante que
     ela cubra a seção inteira de ponta a ponta, como na referência.
     O texto e o form-card ficam posicionados nas duas pontas por cima dela,
     com a imagem visível no vão entre os dois. */
  .hero__photo--desktop {
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 18%;
  }

  .hero__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-top: 20px;
    padding-bottom: 64px;
  }

  .hero__content {
    padding-top: 26px;
    flex: 0 1 640px;
  }
}

/* ----- Mobile / tablet-portrait (<= 1024px) ----- */
/* Nota: usamos max-width:1025px (não 1024px) de propósito. Em telas com
   devicePixelRatio fracionário (ex.: 225% no Windows), o Chromium pode
   arredondar a largura efetiva do viewport para baixo ao avaliar
   min-width, fazendo min-width:1025px falhar exatamente em 1025px CSS.
   Se o breakpoint mobile fosse max-width:1024px, essa mesma largura
   cairia num vão onde NENHUMA das duas media queries bate (nem desktop
   nem mobile), quebrando o layout (card sobrepondo a foto, coluna de
   texto com largura errada). Com max-width:1025px há uma sobreposição
   segura de 1px entre as duas queries: nesse caso o mobile (que vem
   depois no arquivo) sempre vence, então o layout cai limpo para mobile
   em vez de ficar num estado híbrido quebrado. */
@media (max-width: 1025px) {
  /* Empurra o conteúdo para começar já na parte escura/esmaecida da foto
     (foto tem 340px, ver .hero__photo--mobile), em vez de sobrepor o
     trecho ainda claro/nítido da imagem — mas sem deixar um vão vazio
     grande demais entre o fim da foto e o início do texto. */
  .hero { padding-top: 170px; }

  .hero__gradient {
    background:
      radial-gradient(70% 45% at 70% 6%, rgba(210, 170, 100, 0.18) 0%, rgba(210, 170, 100, 0) 60%),
      linear-gradient(180deg, rgba(4, 20, 12, 0.15) 0px, rgba(4, 20, 12, 0.65) 220px, var(--hero-dark-2) 340px, var(--hero-dark-2) 100%);
  }

  .hero__logo { width: 190px; margin-bottom: 16px; }

  .hero__content { max-width: 100%; }

  .hero__headline { font-size: clamp(1.7rem, 8.2vw, 2.3rem); line-height: 1.2; }

  .hero__paragraph {
    max-width: 100%;
    margin-top: 16px;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  /* A referência mobile não mostra uma linha divisória entre o parágrafo
     e o CTA — o espaçamento vem só de margem (ver .btn-cta--mobile-open
     e .info-bar abaixo). */
  .hero__divider { display: none; }

  /* No mobile o CTA volta a ocupar a largura toda (bom alvo de toque),
     diferente do desktop onde ele só acompanha o texto. */
  .btn-cta.btn-cta--mobile-open {
    display: flex;
    width: 100%;
  }

  .info-bar { margin-top: 18px; }

  .trust-row {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: clamp(10px, 4vw, 18px);
    margin-top: 18px;
  }

  .info-bar {
    width: 100%;
    justify-content: flex-start;
    gap: clamp(6px, 2.5vw, 14px);
    padding: 12px clamp(10px, 4vw, 16px);
  }
  .info-bar__item { gap: clamp(6px, 2vw, 10px); }
  .info-bar__icon {
    width: clamp(18px, 5vw, 22px);
    height: clamp(18px, 5vw, 22px);
  }
  .info-bar__text strong { font-size: clamp(0.72rem, 3.2vw, 0.86rem); }
  .info-bar__text span { font-size: clamp(0.64rem, 2.8vw, 0.76rem); }
  .info-bar__divider { height: 24px; flex-shrink: 0; }

  .form-card { padding: 40px 22px 26px; }

  .footer__items { display: none; }
  .footer__inner { justify-content: center; }
  .footer__brand { text-align: center; }
}

@media (max-width: 640px) {
  .hero__logo { margin-bottom: 14px; }
  .hero__paragraph { margin-top: 14px; }
  .hero__divider { margin: 16px 0; }

  .info-bar { padding: 10px clamp(10px, 4vw, 14px); }

  .form-card__title { font-size: 1.4rem; }
  .btn-cta__label { line-height: 1.2; }

  .closing-banner__text { font-size: clamp(1.05rem, 4.6vw, 1.3rem); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-cta, .btn-cta__spinner { animation: none !important; transition: none !important; }
}
