/* ==========================================================================
   Teu Prato — tela pública
   Conforme o Manual da Marca, Ed. 01/2026.

   Regras que este arquivo obedece:
   - Creme domina (~70%). Oliva escuro estrutura o texto. Terracota, mostarda e
     oliva médio entram como acentos apetitosos. Areia é só detalhe.
   - Work Sans para informação; Caveat só para chamadas curtas e preços.
   - Rótulos sempre em caixa alta, letter-spacing ~0.28em.
   - Grafismo solto, nunca em grade rígida.
   ========================================================================== */

/* Fontes variáveis, servidas pelo próprio app — sem depender do Google. */
@font-face {
  font-family: 'Work Sans';
  src: url('/marca/work-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Caveat';
  src: url('/marca/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta principal do manual */
  --creme: #f0e4d3;
  --oliva-escuro: #2e3420;
  --terracota: #c1522b;
  --mostarda: #d9a125;
  --oliva: #7c8b4e;
  --areia: #c9a379;

  /* Tons de apoio */
  --off-white: #faf5ec;
  --kraft: #e4d3bc;
  --mostarda-clara: #e8bc55;
  --terracota-escura: #9a3f20;
  --oliva-profundo: #232817;

  /* Derivados de uso.
     Os dois tons abaixo são versões escurecidas do oliva do manual, criadas
     porque as originais não alcançam 4.5:1 sobre o creme — o manual define a
     paleta, mas texto ilegível não serve a marca nenhuma. Usadas SÓ em texto;
     bordas e preenchimentos seguem com --oliva puro. */
  --texto: var(--oliva-escuro);
  --texto-suave: #626550;
  --oliva-texto: #5f6b3c;
  --borda: var(--kraft);
  --sombra: 0 1px 2px rgba(35, 40, 23, 0.05), 0 6px 18px -10px rgba(35, 40, 23, 0.22);
  --sombra-alta: 0 -3px 20px -6px rgba(35, 40, 23, 0.16);
  --raio: 18px;
  --raio-pequeno: 12px;

  --fonte: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fonte-mao: 'Caveat', 'Segoe Script', cursive;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--creme);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 168px;
}

/* Grafismo: ingredientes espalhados, composição assimétrica. Fica atrás de
   tudo, em opacidade baixa — presença, não ruído. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='560' viewBox='0 0 420 560'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M52 44c14-19 39-23 52-8 12 14 5 37-12 46-19 10-40 3-46-9-5-11 0-22 6-29z' fill='%237C8B4E' opacity='.13'/%3E%3Cpath d='M64 92c-3-18 4-36 14-47' stroke='%237C8B4E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Ccircle cx='330' cy='70' r='5' fill='%23C9A379' opacity='.3'/%3E%3Ccircle cx='352' cy='92' r='4' fill='%23C9A379' opacity='.24'/%3E%3Ccircle cx='308' cy='96' r='3.5' fill='%23C9A379' opacity='.28'/%3E%3Ccircle cx='344' cy='48' r='3' fill='%23C9A379' opacity='.22'/%3E%3Cpath d='M276 232c22-14 52-8 58 10 6 17-14 33-38 33-22 0-38-11-38-23 0-8 8-15 18-20z' fill='%23C1522B' opacity='.1'/%3E%3Cpath d='M96 300c26-10 50 2 50 18s-22 28-46 24c-20-3-30-15-27-25 2-8 12-14 23-17z' fill='%23D9A125' opacity='.13'/%3E%3Ccircle cx='150' cy='424' r='7' fill='%232E3420' opacity='.09'/%3E%3Ccircle cx='170' cy='438' r='6' fill='%232E3420' opacity='.07'/%3E%3Ccircle cx='146' cy='446' r='5' fill='%232E3420' opacity='.08'/%3E%3Cpath d='M330 470c16-22 44-26 58-9 13 16 5 42-14 52-21 11-45 4-52-10-6-13 1-25 8-33z' fill='%237C8B4E' opacity='.1'/%3E%3Ccircle cx='40' cy='196' r='4' fill='%23C9A379' opacity='.26'/%3E%3Ccircle cx='58' cy='214' r='3' fill='%23C9A379' opacity='.2'/%3E%3Cpath d='M368 320c14-8 30-4 34 6 4 11-8 21-24 21-14 0-24-7-24-14 0-5 6-10 14-13z' fill='%23D9A125' opacity='.1'/%3E%3Ccircle cx='226' cy='540' r='4.5' fill='%23C9A379' opacity='.22'/%3E%3Ccircle cx='248' cy='526' r='3.5' fill='%23C9A379' opacity='.18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 560px;
}

.envoltorio {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ------------------------------------------------------------------- topo */
.topo {
  text-align: center;
  padding: 34px 12px 20px;
}

.assinatura {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo-icone {
  width: 104px;
  height: auto;
  display: block;
}

.logo-nome {
  width: 156px;
  height: auto;
  display: block;
}

/* O h1 continua no HTML para leitor de tela e SEO — o desenho é a imagem. */
.marca-texto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.assinatura-frase {
  font-family: var(--fonte-mao);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--oliva-texto);
  margin-top: -2px;
}

.topo .data {
  margin-top: 14px;
  color: var(--texto-suave);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid transparent;
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.status.aberto {
  background: rgba(124, 139, 78, 0.15);
  border-color: rgba(124, 139, 78, 0.4);
  color: #4e5c2a;
}

.status.fechado {
  background: rgba(193, 82, 43, 0.11);
  border-color: rgba(193, 82, 43, 0.32);
  color: var(--terracota-escura);
}

.aviso {
  margin-top: 16px;
  padding: 13px 17px;
  border-radius: var(--raio-pequeno);
  background: rgba(217, 161, 37, 0.14);
  border: 1.5px solid rgba(217, 161, 37, 0.36);
  color: #7c5a10;
  font-size: 0.9rem;
}

/* ----------------------------------------------------------------- blocos */
.bloco {
  position: relative;
  background: var(--off-white);
  border: 1.5px solid var(--borda);
  border-radius: var(--raio);
  padding: 20px 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--sombra);
}

.bloco-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.numero {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--terracota);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.bloco h2 {
  flex: 1;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.regra {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #6a5a42;
  background: var(--kraft);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.opcoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opcao {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 19px;
  background: #fff;
  border: 1.5px solid var(--borda);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.opcao:hover:not(.esgotada) {
  border-color: var(--oliva);
  box-shadow: 0 2px 8px -4px rgba(124, 139, 78, 0.5);
}

.opcao input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.marca {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--areia);
  border-radius: 50%;
  transition: border-color 0.15s, background 0.15s;
}

.opcao.multipla .marca {
  border-radius: 5px;
}

.opcao.escolhida {
  border-color: var(--oliva);
  background: rgba(124, 139, 78, 0.13);
  font-weight: 600;
}

.opcao.escolhida .marca {
  border-color: var(--oliva);
  background: var(--oliva);
  box-shadow: inset 0 0 0 2.5px var(--off-white);
}

.opcao .preco {
  font-family: var(--fonte-mao);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--terracota);
}

.opcao.esgotada {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
  background: var(--kraft);
  border-color: transparent;
}

.tarja-esgotado {
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #fff;
  background: var(--terracota);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ------------------------------------------------------------- formulário */
.campo {
  margin-bottom: 14px;
}

.campo label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--texto-suave);
  margin-bottom: 7px;
}

.campo label span {
  text-transform: none;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--borda);
  border-radius: var(--raio-pequeno);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--texto);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.campo input::placeholder,
.campo textarea::placeholder {
  color: #a89b83;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--oliva);
  box-shadow: 0 0 0 3px rgba(124, 139, 78, 0.18);
}

.campo textarea {
  min-height: 88px;
  resize: vertical;
}

.linha {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 11px;
}

.escondido {
  display: none !important;
}

/* ----------------------------------------------------------------- rodapé */
.rodape-fixo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 245, 236, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1.5px solid var(--borda);
  box-shadow: var(--sombra-alta);
  padding: 13px 14px calc(13px + env(safe-area-inset-bottom));
  z-index: 50;
}

.rodape-interno {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.contador {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1.5px solid var(--borda);
  border-radius: 999px;
  padding: 4px;
}

.contador button {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--oliva-escuro);
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.contador button:hover {
  background: rgba(124, 139, 78, 0.16);
}

.contador span {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

.total {
  flex: 1;
  text-align: right;
  line-height: 1.15;
}

.total .rotulo {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--texto-suave);
  margin-bottom: 2px;
}

.total .valor {
  font-family: var(--fonte-mao);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--oliva-escuro);
}

/* Terracota é o acento quente — é ele que chama a ação. */
.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 11px;
  padding: 16px 22px;
  background: var(--terracota);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 12px -4px rgba(193, 82, 43, 0.6);
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
}

.botao:hover:not(:disabled) {
  background: var(--terracota-escura);
}

.botao:active:not(:disabled) {
  transform: translateY(1px);
}

.botao:disabled {
  background: #b7ad99;
  box-shadow: none;
  cursor: not-allowed;
}

.legenda {
  text-align: center;
  font-size: 0.79rem;
  color: var(--texto-suave);
  margin-top: 9px;
}

.erro {
  background: rgba(193, 82, 43, 0.12);
  border: 1.5px solid rgba(193, 82, 43, 0.38);
  color: var(--terracota-escura);
  border-radius: var(--raio-pequeno);
  padding: 12px 15px;
  font-size: 0.89rem;
  font-weight: 500;
  margin-top: 12px;
}

/* -------------------------------------------------------------- conclusão */
.tela-fim {
  text-align: center;
  padding: 56px 20px;
}

.tela-fim .selo {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  height: 96px;
  padding: 0 14px;
  border-radius: 50%;
  background: var(--oliva-escuro);
  color: var(--creme);
  font-family: var(--fonte-mao);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.tela-fim h2 {
  margin: 20px 0 8px;
  font-size: 1.45rem;
  font-weight: 600;
}

.tela-fim p {
  color: var(--texto-suave);
  margin-bottom: 26px;
}

.tela-fim .botao {
  max-width: 340px;
  margin-inline: auto;
}

.link-simples {
  display: inline-block;
  margin-top: 20px;
  color: var(--texto-suave);
  font-size: 0.85rem;
  text-decoration-color: var(--areia);
  text-underline-offset: 3px;
}

.carregando {
  text-align: center;
  padding: 72px 20px;
  color: var(--texto-suave);
  font-family: var(--fonte-mao);
  font-size: 1.5rem;
}

/* ------------------------------------------------------------------ mobile */
@media (max-width: 420px) {
  .opcao {
    width: 100%;
  }

  .linha {
    grid-template-columns: 1fr;
  }

  .logo-icone {
    width: 88px;
  }

  .logo-nome {
    width: 134px;
  }

  .total .valor {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
