/* ==========================================================================
   Fio de Ouro — sistema de design das landing pages
   Compartilhado entre paginas. Especificidades de uma pagina so entram aqui
   se forem reaproveitaveis; o resto vive no <style> da propria pagina.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Superficies */
  --ink: #141210;          /* fundo escuro base */
  --ink-2: #1E1A16;        /* superficie elevada (campos, modal) */
  --cream: #F6F1E7;        /* fundo claro alternado */

  /* Texto sobre escuro */
  --on-ink: #F3ECE0;       /* 15.92:1 sobre --ink */
  --on-ink-muted: #B8AE9E; /*  8.53:1 sobre --ink */
  --on-ink-faint: #8F887C; /*  5.32:1 sobre --ink — usado no rodape */

  /* Texto sobre claro */
  --on-cream: #2B241C;       /* 13.60:1 sobre --cream */
  --on-cream-muted: #6E6353; /*  5.22:1 sobre --cream */

  /* Ouro — tres tons por motivo de contraste, nao por estetica.
     --gold e --gold-light so passam sobre fundo escuro.
     Sobre creme, texto precisa de --gold-ink (4.69:1) e grafico de
     --gold-graphic (3.33:1); o --gold-line original da 2.43:1 e por isso
     fica restrito a filete/borda decorativa, que a WCAG isenta. */
  --gold: #F7B800;          /* 10.51:1 sobre --ink */
  --gold-light: #FFD24D;    /* 12.97:1 sobre --ink */
  --gold-ink: #8A6600;      /*  4.69:1 sobre --cream — texto */
  --gold-graphic: #A87D00;  /*  3.33:1 sobre --cream — traco de icone */
  --gold-line: #C79400;     /* decorativo apenas */

  /* Tipografia */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Ritmo */
  --pad-section: clamp(72px, 12vw, 120px);
  --pad-inline: 24px;
  --measure: 640px;

  /* Movimento */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --reveal-dur: .7s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  /* clip e nao hidden: hidden cria contexto de scroll e mata o
     position:sticky da barra de progresso. */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: rgba(247, 184, 0, .28); color: var(--on-ink); }

/* Pula direto para o formulario — a acao principal da pagina. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; color: var(--ink); }

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */
.h1, .h2, .h3 {
  font-family: var(--font-serif);
  font-weight: 340;
  line-height: 1.06;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(44px, 7.5vw, 88px); }
.h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.01em; }
.h3 { font-size: clamp(26px, 4vw, 34px); }

.lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.45;
  margin: 0;
}

/* 13px e o piso: abaixo disso o texto para de ser legivel em tela pequena. */
.eyebrow {
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold);
  margin: 0;
}
.section--light .eyebrow { color: var(--gold-ink); }

.serif-accent { font-family: var(--font-serif); color: var(--gold-light); font-style: normal; }
.section--light .serif-accent { color: var(--gold-ink); }

p { margin: 0; }

/* --------------------------------------------------------------------------
   4. Layout de secao
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  z-index: 1;
  padding: var(--pad-section) var(--pad-inline);
}
.section--light { background: var(--cream); color: var(--on-cream); }
.section--light .lead,
.section--light .h1,
.section--light .h2 { color: var(--on-cream); }

.wrap { max-width: var(--measure); margin-inline: auto; }
.wrap--wide { max-width: 920px; }
.wrap--narrow { max-width: 560px; }

.stack { display: grid; gap: 26px; }
.stack--lg { gap: 40px; }
.center { text-align: center; justify-items: center; }

/* Filete decorativo que separa as secoes. Puramente ornamental:
   aria-hidden no HTML e isento de contraste. */
.filament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(220px, 50vw);
  margin: 0 auto clamp(40px, 7vw, 64px);
}
.filament span:first-child,
.filament span:last-child { height: 1px; flex: 1; }
.filament span:first-child { background: linear-gradient(to right, transparent, rgba(247, 184, 0, .55)); }
.filament span:last-child { background: linear-gradient(to left, transparent, rgba(247, 184, 0, .55)); }
.filament i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(247, 184, 0, .5);
}
.section--light .filament span:first-child { background: linear-gradient(to right, transparent, rgba(199, 148, 0, .55)); }
.section--light .filament span:last-child { background: linear-gradient(to left, transparent, rgba(199, 148, 0, .55)); }
.section--light .filament i { background: var(--gold-line); box-shadow: 0 0 8px rgba(199, 148, 0, .45); }

/* Moldura de cantos — quatro cantoneiras em vez de borda fechada. */
.framed { position: relative; padding: clamp(36px, 6vw, 56px) clamp(20px, 4vw, 44px); }
.framed::before,
.framed::after,
.framed > .corner-b::before,
.framed > .corner-b::after {
  content: "";
  position: absolute;
  width: 30px; height: 30px;
  pointer-events: none;
}
.framed::before { top: 0; left: 0; border-top: 1px solid rgba(247,184,0,.45); border-left: 1px solid rgba(247,184,0,.45); }
.framed::after { top: 0; right: 0; border-top: 1px solid rgba(247,184,0,.45); border-right: 1px solid rgba(247,184,0,.45); }
.framed > .corner-b::before { bottom: 0; left: 0; border-bottom: 1px solid rgba(247,184,0,.45); border-left: 1px solid rgba(247,184,0,.45); }
.framed > .corner-b::after { bottom: 0; right: 0; border-bottom: 1px solid rgba(247,184,0,.45); border-right: 1px solid rgba(247,184,0,.45); }

/* Grao de filme sobre a pagina inteira. */
.grain {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 6;
  opacity: .035;
}

/* --------------------------------------------------------------------------
   5. Botoes
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(340px, 100%);
  min-height: 56px;            /* alvo de toque bem acima dos 44px */
  padding: 19px 32px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--gold-light);
  color: var(--ink);
  transform: scale(1.02);
  box-shadow: 0 0 28px rgba(247, 184, 0, .3);
}
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .72; cursor: progress; transform: none; }
.btn--block { width: 100%; }

/* Sheen: uma faixa de luz que varre o botao. Roda sozinha em ciclo lento
   (o botao precisa se anunciar mesmo sem o mouse chegar perto) e dispara
   de novo no hover. */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 250, 235, .45), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.btn--sheen::after { animation: sheen 5.5s ease-in-out 2s infinite; }
.btn:hover::after { animation: sheen .7s ease forwards; }

@keyframes sheen {
  0%   { left: -60%; }
  18%  { left: 120%; }
  100% { left: 120%; }
}

/* --------------------------------------------------------------------------
   6. Barra de progresso de leitura
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 30;
  background: transparent;
  pointer-events: none;
}
.progress__bar {
  height: 100%;
  width: 0;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold-line), var(--gold), var(--gold-light));
  box-shadow: 0 0 10px rgba(247, 184, 0, .5);
  transition: width .1s linear;
}

/* --------------------------------------------------------------------------
   7. CTA flutuante
   -------------------------------------------------------------------------- */
.floating-cta {
  position: fixed;
  left: 16px; right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), visibility .4s;
}
.floating-cta.is-visible { opacity: 1; visibility: visible; transform: none; }
.floating-cta .btn {
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(247, 184, 0, .25);
}
@media (min-width: 640px) {
  .floating-cta { left: auto; right: 28px; bottom: 28px; }
  .floating-cta .btn { width: auto; padding-inline: 34px; }
}

/* --------------------------------------------------------------------------
   8. Scroll reveal — desfoque para nitido
   -------------------------------------------------------------------------- */

/* FAILSAFE: o seletor e `.js .reveal`, nunca `.reveal` sozinho.
   A classe `js` so existe se o script inline do <head> rodou, e ela e
   removida por timeout se o lp.js nao carregar em 2.5s. Sem isso, uma falha
   de JS deixaria a pagina inteira em opacity:0 — em pagina com trafego pago
   isso e dinheiro queimado em tela branca. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition:
    opacity var(--reveal-dur) var(--ease-out),
    transform var(--reveal-dur) var(--ease-out),
    filter var(--reveal-dur) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform, filter;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
}

/* Imagens revelam por cortina, nao por blur: blur em foto grande custa caro
   na GPU e aparece como jank no meio do scroll. */
.js .reveal-img {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.2s var(--ease-out);
}
.js .reveal-img.is-visible { clip-path: inset(0 0 0 0); }

/* --------------------------------------------------------------------------
   9. Acordeao de FAQ (um aberto por vez)
   Componente do sistema: fica pronto aqui para as proximas paginas.
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 0; }
.faq__item { border-bottom: 1px solid rgba(247, 184, 0, .18); }
.section--light .faq__item { border-bottom-color: rgba(199, 148, 0, .28); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 56px;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  color: var(--on-ink);
}
.section--light .faq__q { color: var(--on-cream); }

.faq__icon { flex: 0 0 20px; transition: transform .35s var(--ease-out); stroke: var(--gold); }
.section--light .faq__icon { stroke: var(--gold-graphic); }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;                 /* anima altura sem medir em JS */
  transition: grid-template-rows .4s var(--ease-out);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { padding-bottom: 24px; color: var(--on-ink-muted); font-size: 16px; }
.section--light .faq__a p { color: var(--on-cream-muted); }

/* --------------------------------------------------------------------------
   10. Formulario
   -------------------------------------------------------------------------- */
.field {
  width: 100%;
  min-height: 54px;
  padding: 15px 18px;
  background: var(--ink-2);
  border: 1px solid rgba(247, 184, 0, .25);
  border-radius: 4px;
  color: var(--on-ink);
  font-family: var(--font-sans);
  font-size: 16px;              /* < 16px faz o iOS dar zoom ao focar */
  line-height: 1.4;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.field::placeholder { color: var(--on-ink-muted); opacity: .75; }
.field:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 184, 0, .18);
}
.field[aria-invalid="true"] { border-color: #E4735B; }

.field-error {
  font-size: 13px;
  line-height: 1.5;
  color: #F0A08D;             /* 7.2:1 sobre --ink */
  margin-top: -8px;
}
.field-error:empty { display: none; }

.form-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--on-ink-muted);
  letter-spacing: .02em;
}

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(20, 18, 16, .25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   11. Modal de confirmacao
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 8, 6, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 44px 28px 34px;
  background: var(--ink-2);
  border: 1px solid rgba(247, 184, 0, .4);
  border-radius: 6px;
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.modal__close {
  position: absolute;
  top: 6px; right: 6px;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--on-ink-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--on-ink); }

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .55; filter: drop-shadow(0 0 2px rgba(247, 184, 0, .35)); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 7px rgba(247, 184, 0, .85)); }
}

/* --------------------------------------------------------------------------
   12. Componentes de conteudo
   -------------------------------------------------------------------------- */

/* Utilitario para rotulo so de leitor de tela. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Hero com imagem sangrada --------------------------------------------- */
.hero { text-align: center; }
.hero__bg { position: absolute; inset: 0; overflow: hidden; animation: heroIn 1.6s var(--ease-out) both; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Degrade que devolve contraste ao texto: sem ele o subtitulo cinza cai em
   cima da area clara do fio e some. */
.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--ink) 6%,
    rgba(20, 18, 16, .82) 34%,
    rgba(20, 18, 16, .45) 75%,
    rgba(20, 18, 16, .35) 100%
  );
}
.hero__content { position: relative; z-index: 1; }

.hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--on-ink-muted);
}
.hero__rule { width: 24px; height: 1px; flex: 0 0 24px; background: rgba(247, 184, 0, .4); }

@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* --- Secao com imagem de fundo esmaecida ---------------------------------- */
.mecanismo { overflow: hidden; }
.mecanismo__bg { position: absolute; inset: 0; opacity: .16; }
.mecanismo__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.6); }
.mecanismo__veil { position: absolute; inset: 0; background: rgba(20, 18, 16, .35); pointer-events: none; }

/* --- Lista de beneficios --------------------------------------------------- */
.beneficios { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.beneficios__item { display: flex; gap: 26px; align-items: flex-start; }
.beneficios__icon { flex: 0 0 48px; margin-top: 2px; }
.beneficios__item p { font-size: 17px; line-height: 1.8; }

@media (max-width: 420px) {
  .beneficios { gap: 32px; }
  .beneficios__item { gap: 18px; }
  .beneficios__icon { flex-basis: 40px; width: 40px; height: 40px; }
}

/* --- Layout de duas colunas que colapsa ----------------------------------- */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(36px, 6vw, 64px);
  align-items: center;
  justify-items: center;
}

/* --- Retrato emoldurado ---------------------------------------------------- */
.retrato { padding: 10px; border-radius: 2px; }
.retrato--ouro { border: 1px solid rgba(247, 184, 0, .45); }
.retrato--linha { border: 1px solid rgba(199, 148, 0, .6); }

/* min() com 100% garante que a moldura nunca estoure a viewport em 375px. */
.retrato__janela {
  position: relative;
  overflow: hidden;
  width: min(var(--retrato-w, 300px), 78vw, 100%);
  height: min(var(--retrato-h, 390px), 96vw);
}
.retrato__janela img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85);
}
.retrato__veu { position: absolute; inset: 0; pointer-events: none; background: rgba(20, 18, 16, .3); }

/* --- Base do rodape -------------------------------------------------------- */
.rodape__base {
  margin-top: clamp(48px, 8vw, 72px);
  padding-top: 26px;
  border-top: 1px solid rgba(247, 184, 0, .14);
}
.rodape__base p {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--on-ink-faint);
}

/* --------------------------------------------------------------------------
   13. Movimento reduzido
   Nao desliga o reveal — desliga a *animacao* dele. O conteudo aparece
   direto, em vez de nunca aparecer.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .js .reveal-img { clip-path: none; }
  .btn--sheen::after { animation: none; }
}
