/* ============================================================
   Fazenda Liberdade — Jornada pela Serra (quiz funnel)
   Sistema de design herdado de DESIGN.md
   Verde #274646 · Verde profundo #1A3434 · Creme #FFDCB4
   Títulos: EB Garamond (serif) · Corpo: Noto Sans · Rótulos: Lato
   Assinatura da marca: cantos retos (radius 0), foto aérea + overlay verde
   ============================================================ */

:root {
  --verde: #274646;
  --verde-deep: #1a3434;
  --verde-night: #0f2020;
  --creme: #ffdcb4;
  --creme-soft: #ffe9d2;
  --texto: #606060;
  --branco: #ffffff;
  --terracota: #b9764c;
  --whatsapp: #25d366;

  --fonte-titulo: "EB Garamond", Georgia, serif;
  --fonte-corpo: "Noto Sans", system-ui, -apple-system, sans-serif;
  --fonte-rotulo: "Lato", system-ui, sans-serif;

  /* overlay verde de legibilidade sobre fotos */
  --veil: linear-gradient(180deg, rgba(15,32,32,.42) 0%, rgba(15,32,32,.30) 38%, rgba(15,32,32,.78) 100%);
  --veil-side: linear-gradient(110deg, rgba(15,32,32,.86) 0%, rgba(15,32,32,.50) 46%, rgba(15,32,32,.18) 100%);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);          /* ease-out-expo */
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);

  --z-bg: 0; --z-veil: 1; --z-content: 2; --z-chrome: 5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--fonte-corpo);
  color: var(--branco);
  background: var(--verde-night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ---------- Trilha de progresso (orgânica, não barra clínica) ---------- */
.trail {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 220, 180, .15);
  z-index: var(--z-chrome);
}
.trail__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--creme), var(--creme-soft));
  box-shadow: 0 0 12px rgba(255, 220, 180, .6);
  transition: transform .9s var(--ease-out);
}

/* ---------- Barra superior ---------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(64px, 9vh, 92px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 5vw, 56px);
  z-index: var(--z-chrome);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar__logo {
  height: clamp(34px, 4.4vh, 46px);
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.35));
}
.topbar__back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: rgba(255, 233, 210, .82);
  font-family: var(--fonte-rotulo);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s var(--ease-soft);
}
.topbar__back:hover { color: var(--creme); }
.topbar__back svg { transition: transform .25s var(--ease-soft); }
.topbar__back:hover svg { transform: translateX(-3px); }
.topbar__step {
  font-family: var(--fonte-rotulo);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 233, 210, .72);
  font-weight: 700;
}
.topbar__back + .topbar__step { margin-left: 0; }
.topbar__back[hidden] + .topbar__step { margin-left: auto; }

/* ---------- Palco / cenas ---------- */
.stage { position: absolute; inset: 0; }

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  z-index: var(--z-content);
}

/* fundo fotográfico com Ken Burns lento */
.scene__bg {
  position: absolute;
  inset: -4% ;
  background-size: cover;
  background-position: center;
  z-index: var(--z-bg);
  transform: scale(1.04);
  animation: kenburns 26s ease-out forwards;
  will-change: transform;
}
@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.18) translate3d(-1.5%, -1%, 0); }
}
.scene__veil {
  position: absolute;
  inset: 0;
  background: var(--veil);
  z-index: var(--z-veil);
}
.scene--side .scene__veil { background: var(--veil-side); }

.scene__inner {
  position: relative;
  z-index: var(--z-content);
  align-self: center;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(88px, 14vh, 140px) clamp(22px, 6vw, 72px) clamp(40px, 7vh, 76px);
}
.scene--side .scene__inner { max-width: 1180px; }

/* entrada coreografada do conteúdo — animação CSS (não depende de JS/rAF;
   o conteúdo é visível por padrão, a animação apenas o enriquece) */
.reveal {
  animation: revealIn .9s var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Tipografia das cenas ---------- */
.eyebrow {
  font-family: var(--fonte-rotulo);
  font-weight: 700;
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--creme);
  margin-bottom: clamp(14px, 2.4vh, 22px);
  display: inline-block;
}
.scene__q {
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--branco);
  text-wrap: balance;
  max-width: 16ch;
}
.scene__sub {
  margin-top: clamp(14px, 2.2vh, 22px);
  font-size: clamp(1rem, .9rem + .5vw, 1.18rem);
  line-height: 1.6;
  color: rgba(255,255,255,.82);
  max-width: 46ch;
  text-wrap: pretty;
}
.scene__q em {
  font-style: italic;
  color: var(--creme);
}

/* ---------- INTRO ---------- */
.intro .scene__inner { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 100%; }
.intro__mark {
  font-family: var(--fonte-rotulo);
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: clamp(11px, 1.4vw, 13px);
  color: var(--creme);
  margin-bottom: 20px;
}
.intro__title {
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.2rem + 5vw, 5.2rem);
  line-height: 1.0;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 14ch;
}
.intro__title em { font-style: italic; color: var(--creme); }
.intro__lede {
  margin-top: clamp(18px, 3vh, 30px);
  font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255,255,255,.84);
  max-width: 40ch;
}
.intro__meta {
  margin-top: clamp(26px, 4vh, 40px);
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-family: var(--fonte-rotulo);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 233, 210, .72);
}
.intro__meta span { display: inline-flex; align-items: center; gap: 8px; }
.intro__meta span::before { content: ""; width: 6px; height: 6px; background: var(--creme); border-radius: 50%; }

/* ---------- Botões ---------- */
.btn {
  --bg: var(--creme);
  --fg: var(--verde);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--fonte-corpo);
  font-weight: 600;
  font-size: clamp(.98rem, .9rem + .3vw, 1.08rem);
  padding: 16px 30px;
  border: 0;
  border-radius: 0;              /* cantos retos — assinatura da marca */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.5);
}
.btn svg { position: relative; transition: transform .4s var(--ease-out); }
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--creme-soft);
  transform: translateX(-101%);
  transition: transform .5s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(0,0,0,.6); }
.btn:hover::after { transform: translateX(0); }
.btn:hover svg { transform: translateX(5px); }
.btn > * { position: relative; z-index: 1; }
.btn--wa { --bg: var(--whatsapp); --fg: #06371b; }
.btn--ghost {
  --bg: transparent; --fg: var(--creme);
  box-shadow: inset 0 0 0 1px rgba(255,220,180,.5);
}
.btn--ghost::after { background: rgba(255,220,180,.12); }
.btn--lg { padding: 19px 40px; }
.intro__cta { margin-top: clamp(30px, 5vh, 48px); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.intro__hint { font-family: var(--fonte-rotulo); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,233,210,.6); }

/* ============================================================
   FORK — escolha imersiva em painéis divididos (não cara de quiz)
   ============================================================ */
.fork {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  z-index: var(--z-content);
}
.fork__half {
  position: relative;
  overflow: hidden;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--branco);
  text-align: left;
  isolation: isolate;
}
.fork__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  transition: transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
  z-index: -2;
}
.fork__half::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,32,32,.30), rgba(15,32,32,.86));
  z-index: -1;
  transition: background 1s var(--ease-out);
}
.fork__half:hover .fork__bg,
.fork__half:focus-visible .fork__bg { transform: scale(1.14); filter: saturate(1.08); }
.fork__half:hover::before { background: linear-gradient(180deg, rgba(15,32,32,.22), rgba(39,70,70,.82)); }
.fork__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: clamp(34px, 6vw, 72px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.fork__kicker {
  font-family: var(--fonte-rotulo); font-weight: 700;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--creme);
}
.fork__title {
  font-family: var(--fonte-titulo); font-weight: 600;
  font-size: clamp(1.8rem, 1.1rem + 2.4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.01em;
  text-wrap: balance; max-width: 14ch;
}
.fork__desc { font-size: clamp(.95rem, .9rem + .3vw, 1.08rem); line-height: 1.5; color: rgba(255,255,255,.8); max-width: 32ch; }
.fork__go {
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fonte-rotulo); font-weight: 700; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--creme);
}
.fork__go svg { transition: transform .4s var(--ease-out); }
.fork__half:hover .fork__go svg { transform: translateX(6px); }
.fork__divider {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: rgba(255,220,180,.28); z-index: 3; transform: translateX(-50%);
}
.fork__question {
  position: absolute; top: clamp(82px, 13vh, 130px); left: 0; right: 0;
  text-align: center; z-index: 4; padding: 0 24px;
}
.fork__question .eyebrow { margin-bottom: 10px; }
.fork__question h2 {
  font-family: var(--fonte-titulo); font-weight: 600;
  font-size: clamp(1.6rem, 1rem + 2.2vw, 2.8rem); line-height: 1.05; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}

/* ============================================================
   TILES — escolhas com foto de fundo (persona / objetivo)
   ============================================================ */
.tiles {
  margin-top: clamp(26px, 4.5vh, 46px);
  display: grid;
  gap: clamp(10px, 1.4vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.tiles[data-count="5"] { grid-template-columns: repeat(5, 1fr); }
.tile {
  position: relative;
  min-height: clamp(190px, 30vh, 280px);
  border: 0; padding: 0; cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: var(--branco);
  border-radius: 0;
  isolation: isolate;
  background: var(--verde-deep);
}
.tile__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  transition: transform .9s var(--ease-out);
  z-index: -2;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,32,32,.12) 0%, rgba(15,32,32,.55) 55%, rgba(15,32,32,.92) 100%);
  transition: background .6s var(--ease-out);
}
.tile:hover .tile__bg, .tile:focus-visible .tile__bg { transform: scale(1.13); }
.tile:hover::before { background: linear-gradient(180deg, rgba(39,70,70,.20) 0%, rgba(39,70,70,.62) 55%, rgba(15,32,32,.95) 100%); }
.tile__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(16px, 1.4vw, 22px); }
.tile__icon {
  width: 38px; height: 38px; margin-bottom: 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,220,180,.16);
  color: var(--creme);
  transition: background .4s var(--ease-out), transform .4s var(--ease-out);
}
.tile:hover .tile__icon { background: var(--creme); color: var(--verde); transform: translateY(-2px); }
.tile__label {
  font-family: var(--fonte-titulo); font-weight: 600;
  font-size: clamp(1.12rem, 1rem + .5vw, 1.5rem); line-height: 1.1; letter-spacing: -.01em;
}
.tile__hint { margin-top: 5px; font-size: .86rem; line-height: 1.35; color: rgba(255,255,255,.74); }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  box-shadow: inset 0 0 0 0 var(--creme);
  transition: box-shadow .35s var(--ease-out);
  pointer-events: none;
}
.tile.is-picked::after, .tile:focus-visible::after { box-shadow: inset 0 0 0 2px var(--creme); }

/* ============================================================
   OPTIONS — lista refinada (prazo, orçamento, com quem) — varia o ritmo
   ============================================================ */
.options {
  margin-top: clamp(26px, 4.5vh, 44px);
  display: flex; flex-direction: column;
  gap: 0;
  max-width: 620px;
  border-top: 1px solid rgba(255,220,180,.22);
}
.option {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  padding: clamp(17px, 2.4vh, 23px) 8px clamp(17px, 2.4vh, 23px) 4px;
  background: none; border: 0;
  border-bottom: 1px solid rgba(255,220,180,.22);
  color: var(--branco);
  text-align: left; cursor: pointer;
  font-family: var(--fonte-corpo);
}
.option__dot {
  flex: 0 0 auto;
  width: 16px; height: 16px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255,220,180,.55);
  transition: box-shadow .35s var(--ease-out), background .35s var(--ease-out), transform .4s var(--ease-out);
}
.option__txt {
  font-size: clamp(1.06rem, .98rem + .5vw, 1.32rem);
  font-family: var(--fonte-titulo); font-weight: 500;
  letter-spacing: .005em;
  transition: transform .4s var(--ease-out);
}
.option__meta { margin-left: auto; font-family: var(--fonte-rotulo); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,233,210,.5); transition: color .35s; }
.option__arrow { flex: 0 0 auto; color: var(--creme); opacity: 0; transform: translateX(-6px); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.option:hover, .option:focus-visible { outline: none; }
.option:hover .option__txt, .option:focus-visible .option__txt { transform: translateX(10px); }
.option:hover .option__dot, .option:focus-visible .option__dot { background: var(--creme); box-shadow: inset 0 0 0 1.5px var(--creme); transform: translateX(6px); }
.option:hover .option__arrow, .option:focus-visible .option__arrow { opacity: 1; transform: translateX(0); }
.option:hover .option__meta { color: var(--creme); }
.option.is-picked .option__dot { background: var(--creme); box-shadow: inset 0 0 0 1.5px var(--creme); }

/* ============================================================
   CAPTURE — formulário discreto sobre cena calma
   ============================================================ */
.capture { margin-top: clamp(28px, 5vh, 48px); max-width: 540px; display: flex; flex-direction: column; gap: clamp(20px, 3vh, 30px); }
.field { position: relative; }
.field label {
  display: block;
  font-family: var(--fonte-rotulo); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,233,210,.7); margin-bottom: 9px;
}
.field input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 0; border-bottom: 1.5px solid rgba(255,220,180,.4);
  color: var(--branco);
  font-family: var(--fonte-titulo); font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem);
  padding: 10px 2px;
  transition: border-color .35s var(--ease-out), background .35s;
}
.field input::placeholder { color: rgba(255,255,255,.35); font-style: italic; }
.field input:focus { outline: none; border-color: var(--creme); background: rgba(255,255,255,.07); }
.capture__cta { margin-top: 6px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.capture__trust { font-family: var(--fonte-rotulo); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,233,210,.55); max-width: 24ch; }
.field.invalid input { border-color: #e7a17a; }

/* ============================================================
   RESULT — revelação celebrativa, personalizada
   ============================================================ */
.result .scene__inner { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.result__eyebrow { font-family: var(--fonte-rotulo); font-weight: 700; font-size: clamp(11px,1.4vw,13px); letter-spacing: .26em; text-transform: uppercase; color: var(--creme); margin-bottom: 16px; }
.result__title {
  font-family: var(--fonte-titulo); font-weight: 600;
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.6rem); line-height: 1.0; letter-spacing: -.02em;
  text-wrap: balance; max-width: 16ch;
}
.result__title em { font-style: italic; color: var(--creme); }
.result__lede { margin-top: 18px; font-size: clamp(1.05rem,.95rem+.5vw,1.25rem); line-height: 1.6; color: rgba(255,255,255,.85); max-width: 44ch; }
.result__list { margin-top: clamp(20px,3vh,30px); display: flex; flex-direction: column; gap: 13px; max-width: 46ch; }
.result__item { display: flex; gap: 13px; align-items: flex-start; font-size: 1.03rem; line-height: 1.45; color: rgba(255,255,255,.9); }
.result__item svg { flex: 0 0 auto; margin-top: 3px; color: var(--creme); }
.result__cta { margin-top: clamp(28px,4.5vh,44px); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.result__trust {
  margin-top: clamp(22px,3.4vh,34px);
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--fonte-rotulo); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,233,210,.66);
}
.result__trust span { display: inline-flex; align-items: center; gap: 8px; }
.result__trust span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--creme); }

/* selo de status (solar) */
.statusbadge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fonte-rotulo); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  padding: 9px 16px; margin-bottom: 18px;
  background: rgba(255,220,180,.12);
  color: var(--creme);
}
.statusbadge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--creme); box-shadow: 0 0 10px var(--creme); }
.statusbadge[data-tone="amber"] { color: #f4c98a; background: rgba(244,201,138,.12); }
.statusbadge[data-tone="amber"]::before { background: #f4c98a; box-shadow: 0 0 10px #f4c98a; }
.statusbadge[data-tone="soft"] { color: #e6b89c; background: rgba(230,184,156,.12); }
.statusbadge[data-tone="soft"]::before { background: #e6b89c; box-shadow: none; }

/* ---------- crossfade entre cenas (a nova entra por cima e some a antiga) ---------- */
.scene { opacity: 1; animation: sceneIn .7s var(--ease-soft) both; }
@keyframes sceneIn { from { opacity: 0; } to { opacity: 1; } }
.scene.is-out { animation: sceneOut .55s var(--ease-soft) forwards; pointer-events: none; }
@keyframes sceneOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 880px) {
  .fork { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .fork__divider { top: 50%; left: 0; right: 0; bottom: auto; width: auto; height: 1px; transform: translateY(-50%); }
  .fork__question { top: clamp(74px, 11vh, 110px); }
  .fork__body { padding: clamp(22px,6vw,40px); }
  .tiles[data-count="5"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .scene__inner { padding-top: clamp(78px, 12vh, 100px); }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles[data-count="5"] { grid-template-columns: 1fr 1fr; }
  .tile { min-height: 152px; }
  .scene__q { max-width: 20ch; }
  .intro__meta { gap: 10px 18px; }
}
@media (max-width: 380px) {
  .tiles, .tiles[data-count="5"] { grid-template-columns: 1fr; }
}

/* ============================================================
   MOVIMENTO REDUZIDO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .scene__bg, .fork__bg, .tile__bg { animation: none !important; transform: none !important; }
  .scene, .reveal { animation: none !important; opacity: 1 !important; }
  .scene.is-out { animation: none !important; opacity: 0 !important; }
  .btn, .option, .tile__bg, .fork__bg { transition: none; }
  .trail__fill { transition: transform .3s linear; }
}
