/* Página inicial do Freguezia. Só o que o kit (public/assets) não tem: fontes da marca e o conteúdo das janelas. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/landing/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/landing/fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --p-bg: #fafaf7; --p-surface: #f0efe8; --p-ink: #17171a; --p-muted: #50505a;
  --p-accent: #0e5e55; --p-accent-ink: #fafaf7; --p-action: #0e5e55; --p-action-ink: #fafaf7;
  --p-inv-bg: #17171a; --p-inv-surface: #242427; --p-inv-ink: #fafaf7; --p-inv-muted: #a8a8a8;
  --p-inv-accent: #f5a524; --p-inv-accent-ink: #17171a; --p-inv-action: #0e5e55; --p-inv-action-ink: #fafaf7;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
  --display-weight: 600; --display-tracking: -0.03em; --display-tracking-xl: -0.035em;
}

.f-mark { width: 28px; height: 28px; flex: none; }
.hero--centred .ly-mark { width: .82em; height: .82em; background: none; border-radius: 0; vertical-align: -.08em; }
.hero--centred .ly-mark::before, .hero--centred .ly-mark::after { content: none; }
.hero--centred .ly-mark img { display: block; width: 100%; height: 100%; }

/* Janela do herói: o cardápio à esquerda, o pedido no WhatsApp à direita. */
.hero--centred .hero__window { background: #e7e3d4; }
.d-win { background: #fff; color: #17171a; border-radius: 12px; overflow: hidden; font: 400 14px/1.4 var(--font-text); box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 30px 70px -30px rgb(0 0 0 / .45); }
.d-win__bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid #ecebe4; color: #5c5c66; font-size: 13px; }
.d-win__bar b { color: #17171a; font-weight: 600; }
.d-win__body { display: grid; grid-template-columns: 300px 1fr; min-height: 420px; }
.inbox { border-right: 1px solid #ecebe4; padding: 8px; display: grid; align-content: start; gap: 2px; }
.f-item { display: grid; grid-template-columns: 44px 1fr; gap: 0 10px; align-items: center; padding: 6px 8px; border-radius: 10px; text-align: left; }
.f-item.is-on { background: #f0efe8; }
.f-item img { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 8px; }
.f-item b { font-weight: 600; }
.f-item span { color: #5c5c66; font-size: 13px; }
.d-chat { display: grid; gap: 8px; align-content: start; padding: 14px 18px; color: #17171a; font-size: 14px; text-align: left; }
.d-msg { justify-self: start; max-width: 92%; padding: 10px 12px; border-radius: 10px 10px 10px 2px; background: #d9fdd3; line-height: 1.4; }
.d-msg b { font-weight: 600; }
.d-msg ul { margin: 2px 0 6px; padding: 0; list-style: none; }
.f-note { justify-self: center; padding: 4px 10px; border-radius: 8px; background: #fff7d6; color: #17171a; font-size: 13px; text-align: center; }

/* Exemplos: dois celulares com o cardápio de verdade. */
.f-phones { align-items: stretch; }
.f-phone { display: grid; grid-template-rows: 1fr auto; gap: var(--s-4); }
.f-phone .panel { --p-h: 500px; display: flex; justify-content: center; align-items: flex-start; padding: var(--s-5) var(--s-5) 0; overflow: hidden; }
.f-phone img { width: min(100%, 270px); height: auto; border-radius: 18px 18px 0 0; box-shadow: 0 0 0 6px #17171a; margin-top: 6px; }
.f-panel-shot { width: 100%; height: auto; display: block; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line); }
.f-list { display: grid; gap: var(--s-4); margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.f-list h3 { font-family: var(--font-text); font-weight: 600; font-size: var(--t-body); line-height: 1.4; letter-spacing: 0; }

/* Passo a passo: cada passo mostra uma tela. */
.f-step-shot { display: flex; justify-content: center; align-items: flex-start; height: 100%; min-height: 420px; padding: var(--s-6) var(--s-5) 0; background: #e7e3d4; overflow: hidden; }
.f-step-shot > img { width: auto; max-width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.f-step-shot--phone > img { width: min(100%, 300px); }
.f-step-shot .d-chat { width: min(100%, 420px); align-self: flex-start; border-radius: 14px 14px 0 0; min-height: 100%; }

.price small { font: 400 var(--t-body)/1.4 var(--font-text); color: var(--muted); letter-spacing: 0; }

@media (max-width: 1023px) {
  .f-step-shot { min-height: 0; height: auto; max-height: 340px; }
}
@media (max-width: 639px) {
  .d-win__body { grid-template-columns: 1fr; min-height: 0; }
  .inbox { display: none; }
  .d-chat { padding: 12px; font-size: 13px; }
  .f-phone .panel { --p-h: 340px; }
  .f-phone img { width: min(100%, 220px); }
}

/* Títulos de terceiro nível: um só tamanho e uma só fonte na página. */
main h3, main .card > h3, main .card--plan h3, [data-moment="pinned-chapters"] .mo-pc__step h3, .faq__item h3 { font: 600 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.f-head { align-content: start; }
.f-head .f-panel-shot { margin-top: var(--s-5); }
.card--plan { padding-block: var(--s-7); }
/* Sem animação (celular, tablet, movimento reduzido), o passo a passo vira linhas com telas menores. */
[data-moment="pinned-chapters"]:not(.is-live) .f-step-shot { min-height: 0; height: 28svh; padding-top: var(--s-4); }
.f-step-shot .d-chat { align-self: center; min-height: 0; border-radius: 0; }
.f-head { margin-bottom: 0; }
/* Sem animação, a seção mantém a mesma altura de duas telas. */
@media (min-width: 1024px) {
  html body main > [data-moment="pinned-chapters"][data-moment][data-moment]:not(.is-live) { height: 200svh; min-height: 0; }
  [data-moment="pinned-chapters"]:not(.is-live) .f-step-shot { height: 400px; }
}
@media (max-width: 639px) {
  html body main > [data-moment="pinned-chapters"][data-moment][data-moment]:not(.is-live) { min-height: 200lvh; }
}
.grid > .section-head.f-head { margin-bottom: 0; height: 100%; }


/* Surgir ao rolar (src/lib/use-reveal.ts e public/landing/reveal.js): sobe, cresce de leve e aparece, uma vez só. */
[data-reveal] {
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    translate 900ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    scale 900ms cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
}
.reveal-pending {
  opacity: 0;
  translate: 0 48px;
  scale: 0.96;
}
/* Títulos de seção vêm da esquerda. */
h2.reveal-pending,
.section-head.reveal-pending {
  translate: -32px 0;
  scale: 1;
}

/* Troca de página com um esmaecer curto (navegadores que suportam; os outros trocam normalmente). */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* Planos: o cartão em foco (mouse ou teclado) ganha a borda verde e sobe de leve; o Completo leva o selo. */
.card--plan { transition: border-color 200ms ease, box-shadow 200ms ease, translate 200ms ease; }
.card--plan:hover, .card--plan:focus-within { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action), 0 18px 40px -24px rgb(0 0 0 / .35); translate: 0 -4px; }
.f-badge { background: #f5a524; color: #17171a; font: 600 13px/1 var(--font-text); letter-spacing: 0; }
.card--plan h3 { display: flex; align-items: center; gap: var(--s-2); min-height: 28px; }
.card--plan h3 .f-badge { margin-left: 0; height: 22px; }

/* Herói: a janela do produto sobe depois do título. */
@keyframes f-rise { from { opacity: 0; transform: translateY(80px) scale(0.96); } }
.hero--centred .hero__window > .ly-piece { animation: f-rise 1100ms cubic-bezier(0.16, 1, 0.3, 1) 350ms both; }
/* Nos celulares dos exemplos, a tela sobe dentro da moldura quando o cartão aparece. */
.f-phone .panel img { transition: translate 1100ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--reveal-delay, 0ms) + 150ms); }
.f-phone.reveal-pending .panel img { translate: 0 120px; }
/* A tela do painel aparece crescendo. */
#painel .f-panel-shot.reveal-pending { scale: 0.9; translate: 0 60px; }
@media (prefers-reduced-motion: reduce) {
  .hero--centred .hero__window > .ly-piece { animation: none; }
}


/* Telas baixas de notebook (ex.: 1366×768, que no navegador sobram uns 650px): a seção cresce com o conteúdo
   em vez de ficar presa a uma tela, e o nome no rodapé encolhe. Sem isso, o conteúdo de uma seção cobre a outra. */
@media (min-width: 1024px) and (max-height: 860px) {
  html body main > section:not(.hero):not([data-moment]), html body footer.closing { height: auto; min-height: 100svh; }
  html body main > section:not(.hero):not([data-moment]) > .wrap, html body footer.closing > .wrap { height: auto; }
  html body main > [data-moment="pinned-chapters"][data-moment][data-moment]:not(.is-live) { height: auto; min-height: 100svh; }
  footer.closing .close__word { font-size: clamp(64px, 10vw, 150px); margin-top: var(--s-7); }
  footer.closing .closing__links { margin-top: var(--s-7); }
  .f-phone .panel { --p-h: 400px; }
  .f-phone img { width: min(100%, 220px); }
}
