/* ==========================================================================
   Adaiele Almeida · Landing page
   Paleta e tipografia do Código de Arena (B20). Mobile primeiro.
   ========================================================================== */

/* ---------- Fontes ---------- */
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/playfair-display-latin.woff2") format("woff2-variations"), url("../fonts/playfair-display-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("../fonts/playfair-display-latin-italic.woff2") format("woff2-variations"), url("../fonts/playfair-display-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2-variations"), url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  /* Paleta da artista */
  --verde: #2C4733;     /* verde mata */
  --terra: #8B5A35;     /* terra / barranco */
  --dourado: #C29A4B;   /* dourado pôr do sol */
  --agua: #5B8896;      /* água do Pantanal */
  --papel: #F7F2E8;     /* papel / fundo */

  /* Derivadas */
  --noite: #1D2C22;     /* verde mata escurecido, fundos profundos */
  --tinta: #1F2A21;     /* texto principal */
  --tinta-2: #4E5A4F;   /* texto secundário */
  --agua-texto: #3F6B78;
  --parede: #EEE6D6;    /* parede da galeria */
  --linha: #DDD2BE;
  --borda-campo: #CFC3AC;
  --campo: #FFFDF8;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5.5vw, 64px);
  --max: 1240px;
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));
  --secao: clamp(80px, 12vw, 160px);
  --foco: var(--verde);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
html.trava { overflow: hidden; }
/* Celular: a página só anda na vertical, sem "elástico" para os lados */
@media (hover: none) and (pointer: coarse) {
  html, body { overscroll-behavior-x: none; }
}
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h2 {
  font-size: clamp(2.05rem, 7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin-bottom: 20px;
}
p { margin: 0 0 1em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.lead { font-size: clamp(1.125rem, 2.1vw, 1.3rem); line-height: 1.6; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }
.hero, .manifesto, .encomendas, .final, .rodape, .topo:not(.is-solido) { --foco: var(--dourado); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--papel); color: var(--tinta); padding: 10px 16px; }
.pular:focus { left: 12px; }

/* ---------- Botões e links ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 3px;
  font: 600 1rem/1.1 var(--sans); letter-spacing: 0.01em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.botao svg { flex: none; }
.botao--ouro { background: var(--dourado); color: var(--noite); }
.botao--ouro:hover { background: #D1AB5D; }
.botao--verde, .botao--whats { background: var(--verde); color: var(--papel); }
.botao--verde:hover, .botao--whats:hover { background: #23392A; }
.botao--contorno { border-color: rgba(247, 242, 232, .5); color: var(--papel); }
.botao--contorno:hover { border-color: var(--papel); }
.botao--pequeno { min-height: 40px; padding: 0 18px; font-size: .9375rem; }

.link-claro, .link-escuro {
  background: none; border: 0; padding: 12px 2px; cursor: pointer;
  font: 500 1rem var(--sans);
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link-claro { color: var(--papel); text-decoration-color: rgba(247, 242, 232, .55); }
.link-escuro { color: var(--tinta); text-decoration-color: var(--borda-campo); }
.link-sublinhado {
  color: var(--verde); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--dourado);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.link-sublinhado:hover { text-decoration-color: var(--verde); }

.redondo {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid rgba(31, 42, 33, .28); border-radius: 50%;
  background: transparent; color: var(--tinta); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.redondo:hover { background: var(--verde); border-color: var(--verde); color: var(--papel); }
.redondo:disabled { opacity: .35; pointer-events: none; }

/* ---------- Cabeçalho ---------- */
.topo {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--papel);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.topo.is-solido {
  background: rgba(247, 242, 232, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--tinta);
  box-shadow: 0 1px 0 var(--linha);
}
.topo__barra {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px;
  padding: env(safe-area-inset-top) var(--pad-x) 0;
}
.marca {
  margin-right: auto;
  font-family: var(--serif); font-weight: 500;
  font-size: .8125rem; letter-spacing: .32em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.topo__nav { display: none; }
.topo__cta { display: none; }
.topo__menu {
  width: 44px; height: 44px; margin-right: -10px;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
}
.topo.is-aberto { background: var(--papel); color: var(--tinta); }
.topo.is-aberto .topo__nav {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  padding: 4px var(--pad-x) 28px;
  background: var(--papel);
  box-shadow: 0 24px 30px -24px rgba(29, 44, 34, .4);
}
.topo.is-aberto .topo__nav a {
  padding: 14px 0; border-bottom: 1px solid var(--linha);
  font-family: var(--serif); font-size: 1.375rem; text-decoration: none;
}

@media (min-width: 900px) {
  .topo__menu { display: none; }
  .topo__nav, .topo.is-aberto .topo__nav {
    display: flex; flex-direction: row; gap: 30px;
    position: static; padding: 0; background: none; box-shadow: none;
  }
  .topo__nav a, .topo.is-aberto .topo__nav a {
    padding: 6px 0; border: 0;
    font: 500 .9375rem var(--sans); text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .3s;
  }
  .topo__nav a:hover { background-size: 100% 1px; }
  .topo__cta { display: inline-flex; }
  .topo:not(.is-solido) .topo__cta { background: var(--dourado); color: var(--noite); }
}

/* ---------- 01 · Abertura ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--noite); color: var(--papel);
  overflow: hidden;
}
.hero__foto { position: absolute; inset: 0; z-index: -1; }
.hero__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero__foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(29, 44, 34, .94) 0%, rgba(29, 44, 34, .8) 24%,
    rgba(29, 44, 34, .25) 46%, rgba(29, 44, 34, 0) 58%);
}
.hero__texto { padding: calc(88px + env(safe-area-inset-top)) var(--pad-x) 40px; max-width: 40rem; }
.hero__titulo {
  font-size: clamp(2.6rem, 11.5vw, 6.5rem);
  line-height: 1; letter-spacing: -0.012em; font-weight: 500;
}
.hero__titulo span, .hero__titulo em { display: block; }
.hero__titulo em { font-style: italic; font-weight: 400; color: var(--dourado); }
.hero__sub { max-width: 21em; margin: 18px 0 24px; color: rgba(247, 242, 232, .9); }
.hero__acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.hero__acoes .link-claro { display: none; }

@media (max-width: 899px) and (max-height: 700px) {
  .hero__texto { padding-top: calc(72px + env(safe-area-inset-top)); }
  .hero__titulo { font-size: min(11vw, 7vh); }
  .hero__sub { margin: 10px 0 16px; font-size: 1rem; line-height: 1.5; }
  .hero__acoes .botao { min-height: 48px; }
}
@media (min-width: 480px) { .hero__acoes .link-claro { display: inline-block; } }

/* Desktop: texto na metade esquerda do container (alinhado ao logo),
   foto na metade direita sangrando até a borda da tela. */
@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: var(--pad-x) minmax(0, 1fr) minmax(0, 1fr) var(--pad-x);
    min-height: max(100svh, 640px);
  }
  .hero__foto { position: relative; inset: auto; grid-column: 3 / 5; grid-row: 1; z-index: 0; }
  .hero__foto img { position: absolute; inset: 0; object-position: 50% 88%; }
  .hero__foto::after {
    background:
      linear-gradient(180deg, rgba(29, 44, 34, .55) 0%, rgba(29, 44, 34, 0) 16%),
      linear-gradient(90deg, var(--noite) 0%, rgba(29, 44, 34, .6) 10%, rgba(29, 44, 34, 0) 32%);
  }
  .hero__texto {
    grid-column: 2; grid-row: 1; align-self: center; z-index: 1;
    max-width: none;
    padding: 112px 56px 72px 0;
  }
  .hero__titulo { font-size: clamp(3.25rem, min(5.6vw, 10.5vh), 6rem); }
  .hero__titulo span, .hero__titulo em { white-space: nowrap; }
  .hero__sub { max-width: 24em; font-size: clamp(1.125rem, 1.4vw, 1.3rem); margin: 28px 0 36px; text-wrap: balance; }
  .hero__acoes { flex-wrap: nowrap; gap: 28px; }
}

/* ---------- 02 · Manifesto: a frase no centro de uma exposição suspensa ----------
   As obras flutuam em molduras 3D (espessura real, cantos chanfrados, vidro e sombra
   na parede). Celular: quadros acima e abaixo da frase. PC: quadros nas laterais. */
.manifesto {
  position: relative; isolation: isolate; overflow: hidden; /* hidden, não clip: no Safari, clip deixa a página andar para o lado */
  display: flex; flex-direction: column; align-items: center;
  padding: calc(min(60vw, 400px) + 24px) var(--pad-x) calc(min(62vw, 410px) + 24px);
  background:
    radial-gradient(ellipse 60% 42% at 50% 50%, rgba(247, 233, 196, .09), rgba(247, 233, 196, 0) 72%),
    radial-gradient(ellipse 125% 95% at 50% 50%, #31503A 0%, var(--verde) 48%, #1E3225 100%);
  color: var(--papel); text-align: center;
}
.manifesto__icone, .manifesto__frase, .manifesto__autoria { position: relative; z-index: 1; }
.manifesto__icone { color: var(--dourado); margin-bottom: 36px; filter: drop-shadow(0 4px 14px rgba(10, 20, 13, .5)); }
.manifesto__frase { width: 100%; margin: 0; }
.manifesto__frase p {
  max-width: 21ch; /* ch medido na própria fonte da frase */
  margin: 0 auto;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.85rem, 6.4vw, 3.9rem); line-height: 1.24;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(12, 24, 16, .6);
}
.manifesto__autoria { margin: 36px 0 0; font-size: .9375rem; color: rgba(247, 242, 232, .72); }
.js .manifesto__frase .palavra { opacity: .14; transition: opacity 1.1s ease calc(var(--i) * 90ms); }
.js .manifesto__frase.is-visivel .palavra { opacity: 1; }

/* Palco 3D */
.manifesto__palco {
  position: absolute; inset: 0 max(0px, (100% - 1800px) / 2); z-index: 0; pointer-events: none;
  perspective: 1100px; perspective-origin: 50% 46%;
}
.manifesto__cena {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--cena-x, 0deg)) rotateY(var(--cena-y, 0deg));
  transition: transform 1.6s cubic-bezier(.2, .7, .2, 1);
}

/* Quadro: posição + profundidade (parallax de rolagem em --p, vindo do JS) */
.quadro {
  position: relative; width: var(--w); margin: 0;
  --m: calc(var(--w) * .085);     /* largura da moldura */
  --prof: calc(var(--w) * .095);  /* espessura da moldura */
  transform-style: preserve-3d;
}
.manifesto .quadro {
  position: absolute; left: var(--x, 0); top: var(--t, auto); bottom: var(--b, auto);
  transform: translate3d(0, calc(var(--p, 0) * var(--py, 0px)), var(--z, 0px));
}
.quadro__entrada { transform-style: preserve-3d; transition: transform 2.2s cubic-bezier(.16, .84, .24, 1) var(--chega, 0s); }
.quadro__corpo {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(var(--rz, 0deg));
  animation: flutuar var(--dur, 12s) ease-in-out var(--atraso, 0s) infinite;
  will-change: transform;
}
@keyframes flutuar {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(var(--rz, 0deg)); }
  25% { transform: translate3d(calc(var(--amp, 12px) * .3), calc(var(--amp, 12px) * -.55), 10px) rotateX(calc(var(--rx, 0deg) + 3deg)) rotateY(calc(var(--ry, 0deg) - 4deg)) rotateZ(calc(var(--rz, 0deg) + 1deg)); }
  50% { transform: translate3d(0, calc(var(--amp, 12px) * -1), 20px) rotateX(calc(var(--rx, 0deg) + 1deg)) rotateY(calc(var(--ry, 0deg) - 7deg)) rotateZ(calc(var(--rz, 0deg) - .6deg)); }
  75% { transform: translate3d(calc(var(--amp, 12px) * -.3), calc(var(--amp, 12px) * -.4), 8px) rotateX(calc(var(--rx, 0deg) - 2deg)) rotateY(calc(var(--ry, 0deg) - 3deg)) rotateZ(calc(var(--rz, 0deg) - 1.2deg)); }
}

/* Frente: 4 peças com cantos chanfrados, cada lado com sua luz (luz vem de cima) */
.quadro__frente { position: relative; padding: var(--m); }
.quadro__peca { position: absolute; }
.quadro__peca--t {
  top: 0; left: 0; right: 0; height: var(--m);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--m)) 100%, var(--m) 100%);
  background: linear-gradient(rgba(255, 246, 220, .2), rgba(255, 246, 220, .2)), var(--grao-h, none), linear-gradient(180deg, var(--perfil));
}
.quadro__peca--b {
  bottom: 0; left: 0; right: 0; height: var(--m);
  clip-path: polygon(var(--m) 0, calc(100% - var(--m)) 0, 100% 100%, 0 100%);
  background: linear-gradient(rgba(0, 0, 0, .34), rgba(0, 0, 0, .34)), var(--grao-h, none), linear-gradient(0deg, var(--perfil));
}
.quadro__peca--l {
  top: 0; bottom: 0; left: 0; width: var(--m);
  clip-path: polygon(0 0, 100% var(--m), 100% calc(100% - var(--m)), 0 100%);
  background: linear-gradient(rgba(255, 246, 220, .07), rgba(255, 246, 220, .07)), var(--grao-v, none), linear-gradient(90deg, var(--perfil));
}
.quadro__peca--r {
  top: 0; bottom: 0; right: 0; width: var(--m);
  clip-path: polygon(0 var(--m), 100% 0, 100% 100%, 0 calc(100% - var(--m)));
  background: linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)), var(--grao-v, none), linear-gradient(270deg, var(--perfil));
}

/* Tela: a obra, a sombra da moldura sobre ela e um reflexo de vidro que passa devagar */
.quadro__tela {
  position: relative; overflow: hidden;
  padding: var(--passe-esp, 0px); background: var(--passe, #2b2a20); /* tom de tela escura enquanto a imagem carrega */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
}
.quadro__tela picture { display: block; }
.quadro__tela img { display: block; width: 100%; height: auto; }
.quadro__veu {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--veu-cor, #EEE6D6); opacity: var(--veu, 0); transition: opacity .35s ease;
}
.quadro__tela::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 calc(var(--m) * .8) rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.quadro__brilho {
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 65%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .1) 42%, rgba(255, 255, 255, .03) 58%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-70%);
  animation: reflexo var(--dur, 12s) ease-in-out var(--atraso, 0s) infinite;
}
@keyframes reflexo { 0%, 100% { transform: translateX(-70%); } 50% { transform: translateX(120%); } }

/* Espessura: 4 faces viradas para trás, formando uma caixa de verdade */
.quadro__lado { position: absolute; }
.quadro__lado--t { top: 0; left: 0; right: 0; height: var(--prof); transform-origin: 50% 0; transform: rotateX(-90deg); background: linear-gradient(90deg, var(--lado-a), var(--lado-b)); filter: brightness(1.2); }
.quadro__lado--b { bottom: 0; left: 0; right: 0; height: var(--prof); transform-origin: 50% 100%; transform: rotateX(90deg); background: linear-gradient(90deg, var(--lado-b), var(--lado-a)); filter: brightness(.65); }
.quadro__lado--l { top: 0; bottom: 0; left: 0; width: var(--prof); transform-origin: 0 50%; transform: rotateY(90deg); background: linear-gradient(180deg, var(--lado-a), var(--lado-b)); }
.quadro__lado--r { top: 0; bottom: 0; right: 0; width: var(--prof); transform-origin: 100% 50%; transform: rotateY(-90deg); background: linear-gradient(180deg, var(--lado-a), var(--lado-b)); filter: brightness(.8); }

/* Sombra na parede: se afasta e clareia quando o quadro sobe */
.quadro__sombra {
  position: absolute; left: 7%; right: -5%; top: 9%; bottom: -9%;
  border-radius: 6px; background: var(--sombra-cor, rgba(5, 14, 8, .62));
  filter: blur(calc(var(--w) * .085));
  transform: translate3d(0, 0, -70px);
  animation: sombra var(--dur, 12s) ease-in-out var(--atraso, 0s) infinite;
}
@keyframes sombra {
  0%, 100% { transform: translate3d(0, 0, -70px) scale(1); opacity: .9; }
  50% { transform: translate3d(3%, 6%, -70px) scale(.94); opacity: .55; }
}

/* Molduras */
.quadro--ouro {
  --perfil: #3d290b 0%, #8c6526 7%, #e6c779 15%, #fff0c2 21%, #c99d4c 31%, #6f4f1d 43%, #b88d41 53%, #f2d993 65%, #9a7334 77%, #5a3f15 89%, #2a1c07 100%;
  --lado-a: #8a6627; --lado-b: #3f2c0d;
}
.quadro--nogueira {
  --perfil: #1c100a 0%, #3e2716 12%, #6b4429 30%, #86593b 42%, #5a3720 60%, #3a2414 79%, #d0ad62 86%, #8a6a2e 93%, #24160c 100%;
  --grao-h: repeating-linear-gradient(180deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px, rgba(255, 255, 255, .04) 3px 4px, transparent 4px 7px);
  --grao-v: repeating-linear-gradient(90deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px, rgba(255, 255, 255, .04) 3px 4px, transparent 4px 7px);
  --lado-a: #3b2515; --lado-b: #1f130a;
}
.quadro--claro {
  --perfil: #7a5c3a 0%, #c7a879 18%, #e5d2aa 36%, #cfb486 55%, #a7855a 78%, #6c5132 100%;
  --grao-h: repeating-linear-gradient(180deg, rgba(90, 60, 30, .1) 0 1px, transparent 1px 4px);
  --grao-v: repeating-linear-gradient(90deg, rgba(90, 60, 30, .1) 0 1px, transparent 1px 4px);
  --lado-a: #9b7b52; --lado-b: #6a5033;
  --passe: #F2EBDC; --passe-esp: calc(var(--w) * .075);
}
.quadro--claro .quadro__tela img { box-shadow: 0 0 0 2px #fbf8f1, 0 0 0 3px rgba(0, 0, 0, .16); }
.quadro--longe .quadro__frente { filter: blur(.6px) brightness(.88); } /* profundidade de campo */

/* Vaga-lumes do entardecer */
.vagalume {
  position: absolute; left: var(--x); top: var(--y);
  width: 4px; height: 4px; border-radius: 50%;
  background: #F6E3A1;
  box-shadow: 0 0 6px 2px rgba(246, 227, 161, .6), 0 0 20px 7px rgba(194, 154, 75, .22);
  opacity: .2;
  transform: translate3d(0, 0, var(--z, 0px));
  animation: vagar var(--dur, 18s) ease-in-out var(--atraso, 0s) infinite, piscar calc(var(--dur, 18s) / 3) ease-in-out var(--atraso, 0s) infinite;
}
@keyframes vagar {
  0%, 100% { transform: translate3d(0, 0, var(--z, 0px)); }
  33% { transform: translate3d(22px, -30px, var(--z, 0px)); }
  66% { transform: translate3d(-14px, -14px, var(--z, 0px)); }
}
@keyframes piscar { 0%, 100% { opacity: .12; } 45% { opacity: .85; } 62% { opacity: .3; } }

/* Celular e tablet: dois quadros acima da frase, dois abaixo */
.q1 { --x: -5vw; --t: 14vw; --w: min(35vw, 230px); --z: 40px; --rx: 6deg; --ry: 22deg; --rz: -7deg; --dur: 11s; --atraso: -2s; --amp: 16px; --py: 40px; --chega: 0s; }
.q4 { --x: calc(100% - var(--w) * .9); --t: 25vw; --w: min(32vw, 210px); --z: -10px; --rx: 4deg; --ry: -24deg; --rz: 6deg; --dur: 13s; --atraso: -6s; --amp: 15px; --py: 20px; --chega: .15s; }
.q2 { --x: 3vw; --b: 9vw; --w: min(31vw, 205px); --z: 0px; --rx: -4deg; --ry: 20deg; --rz: 5deg; --dur: 12s; --atraso: -9s; --amp: 14px; --py: 25px; --chega: .3s; }
.q5 { --x: calc(100% - var(--w) * .88); --b: 3vw; --w: min(37vw, 240px); --z: 50px; --rx: -6deg; --ry: -20deg; --rz: -5deg; --dur: 10s; --atraso: -4s; --amp: 16px; --py: 45px; --chega: .45s; }
.q3 { --x: 37%; --t: 1vw; --w: min(21vw, 150px); --z: -220px; --rx: 3deg; --ry: -10deg; --rz: 4deg; --dur: 16s; --atraso: -5s; --amp: 10px; --py: -20px; --chega: .6s; }
.q6 { --x: calc(60% - var(--w)); --b: 0vw; --w: min(21vw, 150px); --z: -240px; --rx: -3deg; --ry: 12deg; --rz: -4deg; --dur: 15s; --atraso: -10s; --amp: 10px; --py: -20px; --chega: .75s; }

/* PC: três quadros de cada lado, em profundidades diferentes */
@media (min-width: 900px) {
  .manifesto { padding: clamp(150px, 15vw, 220px) var(--pad-x); }
  .manifesto__frase p { font-size: clamp(2.5rem, 4.3vw, 3.9rem); }
  .q1 { --x: 4.5%; --t: 8%; --b: auto; --w: clamp(130px, 13.5vw, 270px); --z: 70px; --rx: 5deg; --ry: 26deg; --rz: -5deg; --py: 70px; }
  .q3 { --x: -7%; --t: 40%; --b: auto; --w: clamp(88px, 8.5vw, 150px); --z: -240px; --rx: 2deg; --ry: 18deg; --rz: 3deg; --dur: 15s; --atraso: -5s; --amp: 11px; --py: -30px; --chega: .6s; }
  .q2 { --x: 8%; --t: 59%; --b: auto; --w: clamp(110px, 10.5vw, 210px); --z: -40px; --rx: -3deg; --ry: 20deg; --rz: 4deg; --py: 20px; }
  .q4 { --x: calc(100% - 4.5% - var(--w)); --t: 7%; --b: auto; --w: clamp(110px, 11.5vw, 230px); --z: -30px; --rx: 4deg; --ry: -24deg; --rz: 4deg; --py: 25px; }
  .q6 { --x: calc(109% - var(--w)); --t: 37%; --b: auto; --w: clamp(88px, 8.5vw, 150px); --z: -250px; --rx: 3deg; --ry: -20deg; --rz: -3deg; --dur: 14s; --atraso: -10s; --amp: 11px; --py: -30px; --chega: .75s; }
  .q5 { --x: calc(100% - 10% - var(--w)); --t: 56%; --b: auto; --w: clamp(130px, 13vw, 260px); --z: 60px; --rx: -4deg; --ry: -22deg; --rz: -4deg; --py: 60px; }
}

@media (min-width: 1200px) {
  .q3 { --x: 21%; --t: 4%; --w: clamp(88px, 7.6vw, 150px); --ry: 16deg; --rz: 4deg; --rx: 3deg; }
  .q6 { --x: calc(79% - var(--w)); --t: auto; --b: 3%; --w: clamp(88px, 7.6vw, 150px); --rx: -3deg; --ry: -16deg; --rz: -4deg; }
}

/* Chegada: os quadros vêm do fundo quando a seção aparece; animações param fora da tela */
@media (prefers-reduced-motion: no-preference) {
  .js .manifesto:not(.is-chegou) .quadro__entrada { transform: translate3d(0, 80px, -760px) rotateX(14deg); }
}
.js .manifesto:not(.is-animando) :is(.quadro__corpo, .quadro__sombra, .quadro__brilho, .vagalume) { animation-play-state: paused; }

/* ---------- Divisão: foto sangrando + texto (artista, série, peça única) ---------- */
.divisao { display: flex; flex-direction: column; background: var(--papel); }
.divisao__foto { position: relative; aspect-ratio: 4 / 5; }
.divisao__foto picture { display: block; height: 100%; }
.divisao__foto img { width: 100%; height: 100%; object-fit: cover; }
.divisao__texto { padding: 56px var(--pad-x) var(--secao); }

@media (min-width: 900px) {
  .divisao { display: grid; grid-template-columns: 1fr 1fr; }
  .divisao__foto {
    grid-column: 1; grid-row: 1; align-self: start;
    position: sticky; top: 0;
    height: 100vh; height: 100svh; aspect-ratio: auto;
  }
  .divisao__texto {
    grid-column: 2; grid-row: 1;
    width: 100%; max-width: 680px;
    padding: var(--secao) clamp(40px, 6vw, 96px);
  }
  .divisao--inversa .divisao__foto { grid-column: 2; }
  .divisao--inversa .divisao__texto { grid-column: 1; justify-self: end; }
}

/* 03 · Três tempos */
.tempos { list-style: none; margin: 44px 0 0; padding: 0; border-left: 1px solid var(--dourado); }
.tempos li { position: relative; padding: 0 0 36px 28px; }
.tempos li:last-child { padding-bottom: 0; }
.tempos li::before {
  content: ""; position: absolute; left: -6px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid var(--dourado); background: var(--papel);
}
.tempos__quando { font-family: var(--serif); font-style: italic; color: var(--terra); }
.tempos h3 { font-size: 1.4rem; line-height: 1.25; margin: 2px 0 8px; }
.tempos p { margin: 0; color: var(--tinta-2); }

/* 04 · Série */
.serie .divisao__foto img { object-position: 50% 60%; }
.selo {
  position: absolute; z-index: 2;
  width: clamp(124px, 32vw, 172px); height: auto;
  right: var(--gutter); bottom: -52px;
  filter: drop-shadow(0 12px 18px rgba(29, 44, 34, .22));
}
.selo__fundo { fill: var(--papel); }
.selo__aro { fill: none; stroke: var(--dourado); stroke-width: 1; }
.selo__texto { fill: var(--verde); font: 600 10.5px var(--sans); letter-spacing: .08em; }
.selo__icone { color: var(--terra); }
.serie .divisao__texto { padding-top: 76px; }
.elementos { list-style: none; margin: 36px 0 0; padding: 0; }
.elementos li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 18px;
  padding: 22px 0; border-top: 1px solid var(--linha);
}
.elementos svg, .garantias svg { color: var(--terra); }
.elementos h3 { font-size: 1.25rem; margin: 0 0 4px; }
.elementos p { margin: 0; color: var(--tinta-2); }
.serie__expo {
  margin: 8px 0 0; padding-top: 22px; border-top: 1px solid var(--linha);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--terra);
}
@media (min-width: 900px) {
  .selo { right: auto; left: -86px; bottom: 9%; }
  .serie .divisao__texto { padding-top: var(--secao); padding-right: clamp(80px, 8vw, 128px); }
}

/* ---------- 05 · Galeria: carrossel 3D de obras emolduradas ----------
   A obra atual fica de frente, no centro, levemente inclinada e flutuando; as vizinhas
   giram para ela, como paredes de uma exposição. O main.js monta as molduras, liga a
   classe .is-3d e posiciona cada obra. Sem JS, vira uma fileira simples com rolagem. */
.galeria {
  --obra-w: clamp(250px, min(24vw, (100svh - 340px) * .66), 390px);
  --sombra-cor: rgba(78, 54, 28, .4);
  --veu-cor: var(--parede);
  position: relative; overflow: hidden; /* hidden, não clip: no Safari, clip deixa a página andar para o lado */
  padding: clamp(48px, 5vw, 88px) 0 var(--secao);
  background:
    radial-gradient(ellipse 46% 40% at 50% 46%, rgba(255, 251, 241, .95), rgba(255, 251, 241, 0) 72%),
    var(--parede);
}
.galeria__topo { padding: 0 var(--pad-x); margin: 0 auto 8px; text-align: center; }
.galeria__topo h2 { margin-bottom: 12px; }
.galeria__topo p { max-width: 48em; margin: 0 auto; color: var(--tinta-2); text-wrap: balance; }

/* Palco */
.galeria__palco { position: relative; outline: none; }
.galeria__palco:focus-visible .obra.is-atual .quadro__frente { outline: 2px solid var(--verde); outline-offset: 6px; }
.galeria__trilho { list-style: none; margin: 0; padding: 0; }

/* Sem JS: fileira simples com rolagem e legenda em cada obra */
.galeria:not(.is-3d) .galeria__trilho {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 32px var(--pad-x) 8px; scrollbar-width: none;
}
.galeria:not(.is-3d) .obra { flex: 0 0 min(70vw, 340px); scroll-snap-align: center; }
.galeria:not(.is-3d) .obra figure { margin: 0; }
.galeria:not(.is-3d) .obra img { display: block; width: 100%; height: auto; box-shadow: 0 22px 34px -18px rgba(40, 30, 20, .5); }
.galeria:not(.is-3d) :is(.galeria__legenda, .galeria__seta, .galeria__contador) { display: none; }
.etiqueta { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--dourado); }
.etiqueta h3 { font-style: italic; font-size: 1.3rem; line-height: 1.3; }
.etiqueta p { margin: 4px 0 0; font-size: .9375rem; color: var(--tinta-2); }

/* Com JS: palco 3D */
.is-3d .galeria__palco {
  height: calc(var(--obra-w) * 1.38 + 40px);
  margin-top: 8px;
  perspective: 1400px; perspective-origin: 50% 44%;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.is-3d .galeria__palco.is-arrastando { cursor: grabbing; }
/* Luz de galeria na parede, atrás da obra do centro */
.is-3d .galeria__palco::before {
  content: ""; position: absolute; left: 50%; top: -4%; bottom: -10%;
  width: calc(var(--obra-w) * 2.6); transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 48% at 50% 42%, rgba(255, 250, 238, .9), rgba(255, 250, 238, 0) 72%);
  pointer-events: none;
}
.is-3d .galeria__trilho { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; } /* o clique passa para as obras do fundo */
.is-3d .obra {
  position: absolute; left: calc(50% - var(--obra-w) / 2); top: 0; bottom: 0;
  width: var(--obra-w);
  display: flex; align-items: center;
  transform-style: preserve-3d; will-change: transform, opacity;
  pointer-events: auto;
}
.is-3d .obra:not(.is-atual) { cursor: pointer; }
.is-3d .obra > figure { width: 100%; margin: 0; transform-style: preserve-3d; }
.is-3d .obra img { pointer-events: none; -webkit-user-drag: none; }
.is-3d .obra .quadro { --w: var(--obra-w); }
.is-3d .obra:not(.is-atual):hover .quadro__veu { opacity: 0; }
/* As etiquetas de cada obra continuam no HTML para leitores de tela; a legenda visível fica abaixo */
.is-3d .etiqueta {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Flutuação suave: sempre um pouco inclinada, mostrando a espessura da moldura */
.galeria .quadro__corpo { animation-name: flutuar-suave; }
@keyframes flutuar-suave {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(var(--rz, 0deg)); }
  50% { transform: translate3d(0, calc(var(--amp, 10px) * -1), 14px) rotateX(calc(var(--rx, 0deg) + 1.5deg)) rotateY(calc(var(--ry, 0deg) + 5deg)) rotateZ(calc(var(--rz, 0deg) * -.6)); }
}
.galeria .obra { --amp: 10px; }
.galeria .obra:nth-child(4n+1) { --rx: 4deg; --ry: -9deg; --rz: -1deg; --dur: 9s; --atraso: -1s; }
.galeria .obra:nth-child(4n+2) { --rx: -3deg; --ry: 7deg; --rz: .8deg; --dur: 10.5s; --atraso: -6s; }
.galeria .obra:nth-child(4n+3) { --rx: 3deg; --ry: -6deg; --rz: 1.2deg; --dur: 9.8s; --atraso: -3s; }
.galeria .obra:nth-child(4n+4) { --rx: -4deg; --ry: 9deg; --rz: -.8deg; --dur: 11s; --atraso: -8s; }
.js .galeria:not(.is-animando) :is(.quadro__corpo, .quadro__sombra, .quadro__brilho) { animation-play-state: paused; }

/* Legenda da obra do centro, como etiqueta de museu */
.galeria__legenda {
  min-height: 5.4rem; padding: 0 var(--pad-x); margin-top: 6px; text-align: center;
  transition: opacity .3s ease, transform .3s ease;
}
.galeria__legenda::before { content: ""; display: block; width: 36px; height: 1px; margin: 0 auto 14px; background: var(--dourado); }
.galeria__legenda.is-trocando { opacity: 0; transform: translateY(6px); }
.galeria__legenda-titulo {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.25; text-wrap: balance;
}
.galeria__legenda-tecnica { margin: 4px 0 0; font-size: .9375rem; color: var(--tinta-2); }
.galeria__legenda .status { margin-top: 8px; }
.galeria__legenda .status[hidden] { display: none; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status--acervo { color: var(--terra); }
.status--acervo::before { background: var(--terra); }

/* Setas nas laterais do palco (só PC) e contador abaixo da legenda */
.galeria__vitrine { position: relative; }
.galeria__seta {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(247, 242, 232, .78); border-color: rgba(31, 42, 33, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px -14px rgba(40, 30, 20, .45);
}
.galeria__seta--anterior { left: max(12px, calc(50% - var(--obra-w) * 1.3 - 72px)); }
.galeria__seta--proxima { right: max(12px, calc(50% - var(--obra-w) * 1.3 - 72px)); }
.galeria__seta[hidden], .galeria__contador[hidden] { display: none; }
.galeria__contador { margin: 12px 0 0; text-align: center; font-size: .9375rem; color: var(--tinta-2); font-variant-numeric: tabular-nums; }
.galeria__rodape { padding: 36px var(--pad-x) 0; text-align: center; }

@media (max-width: 899px) {
  .galeria {
    --obra-w: clamp(190px, min(60vw, (100svh - 420px) * .7), 300px);
    padding-top: 20px;
  }
  .is-3d .galeria__palco { height: calc(var(--obra-w) * 1.4 + 20px); margin-top: 4px; perspective: 1000px; }
  .galeria__topo h2 { margin-bottom: 8px; font-size: clamp(1.7rem, 7.4vw, 2.05rem); }
  .galeria__topo p { font-size: .9375rem; line-height: 1.55; }
  .galeria__seta { display: none; }
  .galeria__contador { margin-top: 6px; }
  .galeria__legenda { min-height: 4.6rem; margin-top: 2px; }
  .galeria__legenda::before { margin-bottom: 10px; }
  .galeria__rodape { padding-top: 14px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .galeria { --obra-w: clamp(240px, min(42vw, (100svh - 420px) * .7), 340px); }
}

/* ---------- 06 · Encomendas ---------- */
.encomendas { padding: 0 var(--pad-x) var(--secao); background: var(--noite); color: var(--papel); }
.encomendas__topo { display: flex; flex-direction: column; }
.encomendas__foto { order: -1; margin: 0 calc(-1 * var(--pad-x)) 52px; aspect-ratio: 4 / 5; }
.encomendas__foto picture { display: block; height: 100%; }
.encomendas__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 55%; }
.encomendas h2 { font-size: clamp(2.2rem, 7.6vw, 4.2rem); line-height: 1.08; }
.encomendas h2 em { font-weight: 400; }
.encomendas .lead { color: rgba(247, 242, 232, .86); max-width: 30em; margin-bottom: 28px; }
.encomendas__nota { margin: 14px 0 0; font-size: .875rem; color: rgba(247, 242, 232, .66); }
.passos { list-style: none; counter-reset: passo; margin: 64px 0 0; padding: 0; }
.passos li { counter-increment: passo; position: relative; padding: 0 0 32px 58px; }
.passos li::before {
  content: counter(passo);
  position: absolute; left: 0; top: -3px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--dourado); color: var(--dourado);
  font: 500 1.05rem/1 var(--serif);
}
.passos li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 42px; bottom: 6px;
  width: 1px; background: rgba(194, 154, 75, .38);
}
.passos h3 { font-size: 1.3rem; line-height: 1.3; margin: 2px 0 6px; }
.passos p { margin: 0; color: rgba(247, 242, 232, .76); }

@media (min-width: 900px) {
  .encomendas { padding-top: var(--secao); }
  .encomendas__topo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(48px, 7vw, 112px); }
  .encomendas__foto { order: 0; margin: 0; aspect-ratio: 4 / 4.6; }
}
@media (min-width: 1040px) {
  .passos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-top: 96px; }
  .passos li { padding: 58px 0 0; }
  .passos li::before { top: 0; }
  .passos li:not(:last-child)::after { left: 50px; right: -18px; top: 19px; bottom: auto; width: auto; height: 1px; }
}

/* ---------- 07 · Peça única ---------- */
.unica .divisao__foto img { object-position: 60% 50%; }
.garantias { list-style: none; margin: 36px 0 0; padding: 0; }
.garantias li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-top: 1px solid var(--linha); }
.garantias h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 6px; }
.garantias p { margin: 0; color: var(--tinta-2); }

/* ---------- 08 · Arte e educação ---------- */
.educacao { padding: var(--secao) var(--pad-x); background: var(--parede); }
.divisor { display: flex; align-items: center; gap: 18px; max-width: 640px; margin: 0 auto 40px; color: var(--dourado); }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: rgba(194, 154, 75, .55); }
.educacao__corpo { max-width: 640px; margin: 0 auto; }
.educacao__corpo p { color: var(--tinta-2); }

/* ---------- 09 · Histórias ---------- */
.historias { padding: var(--secao) var(--pad-x); }
.historias h2 { max-width: 16ch; margin-bottom: 40px; }
.historias__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
.historias__lista li { padding-top: 20px; border-top: 1px solid var(--dourado); }
.historias__onde { margin: 0 0 10px; font-size: .875rem; font-weight: 600; color: var(--terra); }
.historias__texto { margin: 0; font-family: var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.45rem); line-height: 1.45; }
@media (min-width: 800px) { .historias__lista { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; } }

/* ---------- 10 · Perguntas ---------- */
.perguntas { padding: 0 var(--pad-x) var(--secao); display: grid; gap: 28px; }
.perguntas__abertura p { color: var(--tinta-2); }
.perguntas details { border-bottom: 1px solid var(--linha); }
.perguntas details:first-child { border-top: 1px solid var(--linha); }
.perguntas summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.35;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--terra); border-bottom: 1.5px solid var(--terra);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s;
}
.perguntas details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.perguntas details p { margin: 0 0 24px; max-width: 60ch; color: var(--tinta-2); }
@media (min-width: 900px) {
  .perguntas { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .perguntas__abertura { position: sticky; top: 110px; align-self: start; }
}

/* ---------- 11 · Chamada final ---------- */
.final {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(96px, 14vw, 180px) var(--pad-x);
  background: var(--noite); color: var(--papel); text-align: center;
}
.final__icone { color: var(--dourado); margin-bottom: 28px; }
.final h2 { max-width: 13ch; font-size: clamp(2.4rem, 8.4vw, 4.9rem); line-height: 1.05; }
.final h2 em { font-weight: 400; }
.final p { margin: 4px 0 36px; color: rgba(247, 242, 232, .8); }
.final__acoes { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; }
@media (min-width: 600px) { .final__acoes { flex-direction: row; justify-content: center; max-width: none; } }

/* ---------- Rodapé ---------- */
.rodape {
  padding: 48px var(--pad-x) calc(104px + env(safe-area-inset-bottom));
  background: var(--noite); color: rgba(247, 242, 232, .72);
  border-top: 1px solid rgba(247, 242, 232, .12);
  font-size: .9375rem; text-align: center;
}
.marca--rodape { margin: 0 0 6px; color: var(--papel); }
.rodape__links { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.rodape__links a {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 2px;
  color: var(--papel); text-decoration: none;
}
.rodape__links svg { flex: none; color: var(--dourado); }
.rodape__links a span { text-decoration: underline; text-decoration-color: rgba(247, 242, 232, .35); text-underline-offset: 5px; }
.rodape__links a:hover span { text-decoration-color: var(--papel); }
.rodape__credito { margin: 0; font-size: .8125rem; color: rgba(247, 242, 232, .5); }

/* ---------- Botão flutuante ---------- */
.flutuante {
  position: fixed; z-index: 40;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--verde); color: var(--papel);
  font: 600 1rem var(--sans);
  box-shadow: 0 14px 30px -12px rgba(29, 44, 34, .65);
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .45s ease, opacity .45s ease;
}
.flutuante.is-visivel { transform: none; opacity: 1; pointer-events: auto; }
.flutuante:focus-visible { outline-color: var(--dourado); }

/* ==========================================================================
   Questionário de encomenda + prévia WhatsApp
   ========================================================================== */
.pedido {
  position: fixed; inset: var(--app-top, 0px) 0 auto 0;
  width: 100%; max-width: 100%;
  height: 100vh; height: var(--app-h, 100dvh); max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--papel); color: var(--tinta);
  overflow: hidden;
}
.pedido::backdrop { background: rgba(18, 28, 21, .64); }
.pedido__caixa { display: flex; flex-direction: column; height: 100%; }

/* Formulário (embaixo no celular, como o teclado do WhatsApp) */
.pedido__form {
  order: 1; position: relative; z-index: 2;
  flex: 0 1 auto; max-height: 66%;
  display: flex; flex-direction: column;
  margin-top: -18px;
  background: var(--papel);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -14px 30px -18px rgba(29, 44, 34, .45);
  padding-bottom: env(safe-area-inset-bottom);
}
.pedido__form > * { width: 100%; max-width: 680px; margin-inline: auto; }
.pedido__topo { display: flex; align-items: center; gap: 16px; padding: 14px 14px 4px 20px; }
.pedido__progresso { flex: 1; }
.pedido__etapa { margin: 0 0 8px; font-size: .8125rem; font-weight: 500; color: var(--tinta-2); }
.barra { height: 3px; border-radius: 2px; background: var(--linha); overflow: hidden; }
.barra span { display: block; height: 100%; width: var(--p, 14%); background: var(--dourado); transition: width .45s ease; }
.redondo--claro { width: 40px; height: 40px; border-color: var(--linha); }

.pedido__passos { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px 14px; }
.passo { min-width: 0; margin: 0; padding: 0; border: 0; }
.passo legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; }
.passo legend + * { clear: both; }
.passo h2 { font-size: clamp(1.35rem, 5.6vw, 1.95rem); line-height: 1.2; margin: 0; text-wrap: balance; }
.passo h2:focus { outline: none; }
.passo__ajuda { clear: both; margin: 0 0 14px; font-size: .9375rem; color: var(--tinta-2); }
.passo__ajuda--pequena { margin-top: 14px; font-size: .8125rem; }

.campo { display: block; margin-top: 16px; }
.campo > span { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; }
.campo small { font-weight: 400; color: var(--tinta-2); }
.campo input, .campo textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--borda-campo); border-radius: 6px;
  background: var(--campo); color: var(--tinta);
  font: 400 1rem/1.4 var(--sans); /* 16px evita zoom no iPhone */
}
.campo textarea { min-height: 84px; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: #8A8F84; }
.campo input:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--verde); outline-offset: 0; border-color: var(--verde); }
.campo[hidden] { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--coluna { flex-direction: column; align-items: stretch; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 42px; padding: 8px 16px;
  border: 1px solid var(--borda-campo); border-radius: 999px;
  background: var(--campo); font-size: .9375rem; line-height: 1.3;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chips--coluna .chip span { width: 100%; min-height: 48px; border-radius: 8px; }
.chip input:checked + span { background: var(--verde); border-color: var(--verde); color: var(--papel); }
.chip input:focus-visible + span { outline: 2px solid var(--verde); outline-offset: 2px; }
.chip:hover span { border-color: var(--verde); }

.tamanhos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tamanho {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 12px 14px 14px;
  border: 1px solid var(--borda-campo); border-radius: 10px;
  background: var(--campo); cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.tamanho input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tamanho__desenho {
  width: calc(var(--w) * 54px); height: calc(var(--h) * 54px);
  margin: calc((1 - var(--h)) * 54px) 0 10px;
  border: 1.5px solid var(--terra); border-radius: 1px;
  background: linear-gradient(180deg, rgba(194, 154, 75, .25), rgba(91, 136, 150, .25));
}
.tamanho__nome { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; line-height: 1.2; }
.tamanho__medida { font-size: .8125rem; line-height: 1.35; color: var(--tinta-2); }
.tamanho--texto { grid-column: 1 / -1; }
.tamanho:hover { border-color: var(--verde); }
.tamanho.is-marcado { border-color: var(--verde); background: #E8EEE4; box-shadow: inset 0 0 0 1px var(--verde); }
.tamanho:has(input:focus-visible) { outline: 2px solid var(--verde); outline-offset: 2px; }

.pedido__erro { margin: 0 auto; padding: 0 20px 8px; font-size: .875rem; font-weight: 500; color: #9A3B23; }
.pedido__erro[hidden] { display: none; }
.pedido__nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px 16px; border-top: 1px solid var(--linha);
}
.pedido__nav .is-oculto { visibility: hidden; }
.pedido__nav .botao { flex: 0 1 auto; }
.pedido__nav [hidden] { display: none; }

/* Prévia WhatsApp */
.pedido__chat { order: 0; flex: 1 1 auto; min-height: 150px; display: flex; }
.wa {
  display: flex; flex-direction: column; width: 100%; min-height: 0;
  background: #EFE7DC url("../img/fundo-aguape.svg") 0 0 / 180px 180px;
}
.wa__topo {
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px 4px;
  background: var(--verde); color: var(--papel);
}
.wa__voltar { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; cursor: pointer; }
.wa__avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--dourado); }
.wa__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.wa__avatar::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #25D366; border: 2px solid var(--verde);
}
.wa__quem { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.wa__quem b { font-size: 1rem; font-weight: 600; }
.wa__quem small { font-size: .75rem; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa__conversa {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px 30px;
}
.wa__aviso, .wa__enviado {
  align-self: center; max-width: 92%;
  margin: 0 0 6px; padding: 6px 12px; border-radius: 8px;
  font-size: .75rem; line-height: 1.45; text-align: center; color: #54656F;
  background: #FFF3C4; box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.wa__aviso b { font-weight: 600; }
.wa__enviado { margin: 8px 0 0; background: #DDF3E2; color: #25443A; }
.wa__enviado[hidden] { display: none; }
.wa__enviado a { color: inherit; font-weight: 600; }
.msg {
  position: relative; max-width: 86%;
  padding: 7px 9px 8px 10px; border-radius: 8px;
  font: 400 .9375rem/1.42 var(--sans); color: #111B21;
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.msg p { margin: 0 0 4px; }
.msg--recebida { align-self: flex-start; background: #fff; border-top-left-radius: 0; }
.msg--recebida::before {
  content: ""; position: absolute; top: 0; left: -8px;
  border-right: 8px solid #fff; border-bottom: 10px solid transparent;
}
.msg--enviada { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 0; }
.msg--enviada::before {
  content: ""; position: absolute; top: 0; right: -8px;
  border-left: 8px solid #D9FDD3; border-bottom: 10px solid transparent;
}
.msg__texto { overflow-wrap: anywhere; }
.msg__texto .linha { display: block; border-radius: 3px; }
.msg__texto .linha--espaco { height: .72em; }
.msg__texto strong { font-weight: 600; }
.msg__texto .linha.is-nova { animation: destaque 1.8s ease-out; }
@keyframes destaque { from { background: rgba(194, 154, 75, .42); } to { background: rgba(194, 154, 75, 0); } }
.cursor {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em;
  background: #2C7A55; animation: piscar 1.05s steps(1) infinite;
}
@keyframes piscar { 50% { opacity: 0; } }
.msg__hora {
  float: right; display: inline-flex; align-items: center; gap: 3px;
  margin: 6px 0 -4px 14px; font-size: .6875rem; line-height: 1; color: #667781;
}
.msg__hora svg { color: #8696A0; }
.msg--enviada.is-enviada .msg__hora svg { color: #53BDEB; }
.wa__digitar { display: none; }

@media (min-width: 900px) {
  .pedido {
    inset: 0; margin: auto;
    width: min(1100px, calc(100% - 48px));
    height: min(760px, calc(100dvh - 48px));
    border-radius: 18px;
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .6);
  }
  .pedido__caixa { flex-direction: row; }
  .pedido__form { order: 0; flex: 1 1 56%; max-height: none; margin: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .pedido__form > * { max-width: none; }
  .pedido__topo { padding: 28px 28px 6px 44px; }
  .pedido__passos { padding: 22px 44px 16px; }
  .passo h2 { font-size: 2rem; }
  .pedido__erro { padding: 0 44px 8px; }
  .pedido__nav { padding: 18px 44px 26px; }
  .pedido__chat { order: 1; flex: 0 0 44%; padding: 28px; background: #E4D9C6; }
  .wa { border: 9px solid var(--noite); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(29, 44, 34, .7); }
  .wa__topo { padding: 10px 14px 10px 6px; }
  .wa__voltar { visibility: hidden; width: 8px; }
  .wa__digitar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #F0F2F5; }
  .wa__digitar > span:first-child { flex: 1; padding: 9px 14px; border-radius: 20px; background: #fff; color: #8696A0; font-size: .875rem; }
  .wa__enviar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--verde); color: #fff; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .manifesto__frase .palavra { opacity: 1; }
}
