:root {
  --tinta: #1F2A44;
  --anil: #2F55A4;
  --amarelo: #E8B04A;
  --coral: #E58B7B;
  --verde: #6CBFAF;
  --cal: #FBFAF6;
  --branco: #FFFFFF;
  --linha: #7A8297;
  --suave: #4A5470;
  --claro: #DDE1EA;
  --erro: #A3271B;

  --fonte: "Archivo", "Inter", "Helvetica Neue", Arial, sans-serif;
  --largura: 1120px;
  --margem: clamp(16px, 4.5vw, 40px);
  --barra: 60px;
  --abas: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--tinta); -webkit-text-size-adjust: 100%; }
a, button, label, input, select, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--cal);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--abas) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.8rem); font-weight: 330; font-stretch: 115%; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 380; font-stretch: 115%; }
h3 { font-size: 1.2rem; font-weight: 540; font-stretch: 108%; line-height: 1.25; }
p { margin: 0; max-width: 62ch; }
a { color: inherit; }
svg { display: block; }

.wrap { width: min(100% - 2 * var(--margem), var(--largura)); margin-inline: auto; }
section { scroll-margin-top: calc(var(--barra) + env(safe-area-inset-top) + 8px); }

.pular {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--amarelo); color: var(--tinta);
  padding: 10px 16px; border-radius: 4px; font-weight: 600; text-decoration: none;
}
.pular:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.oculto { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
.escuro :focus-visible { outline-color: var(--amarelo); }

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 20;
  background: var(--tinta); color: var(--cal);
  padding-top: env(safe-area-inset-top);
}
.barra .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--barra); }
.marca-lockup { --logo: 24px; display: flex; align-items: center; }
.logo { display: inline-flex; flex: none; color: inherit; text-decoration: none; }
.logo svg { height: var(--logo); width: auto; }
.divisor {
  flex: none; width: 1px; height: calc(var(--logo) * 96 / 104); margin: 0 calc(var(--logo) * .6);
  background: color-mix(in srgb, var(--claro) 45%, transparent);
}
.slogan {
  font-family: "Syne", var(--fonte); font-weight: 500; font-size: calc(var(--logo) * .7); line-height: 1.15; color: var(--claro);
}
/* No celular, duas linhas: "interiores com" e "personalidade" */
@media (max-width: 599px) { .slogan { max-width: 8.4em; font-size: calc(var(--logo) * .6); line-height: 1.08; } }
/* Computador pequeno: o menu divide a barra, então o slogan do topo também vai em duas linhas */
@media (min-width: 900px) and (max-width: 1099px) {
  .barra .slogan { max-width: 8.4em; font-size: calc(var(--logo) * .6); line-height: 1.08; }
  .barra .menu { gap: 24px; }
}
.menu { display: none; }
@media (min-width: 900px) {
  .menu { display: flex; align-items: center; gap: 32px; }
  .menu a:not(.botao) { text-decoration: none; font-size: 0.95rem; color: var(--claro); }
  .menu a:not(.botao):hover { color: var(--cal); text-decoration: underline; text-underline-offset: 6px; }
}

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 4px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: filter .15s ease;
}
.botao:hover { filter: brightness(0.94); }
.botao:active { filter: brightness(0.86); }
.botao-amarelo { background: var(--amarelo); color: var(--tinta); }
.botao-tinta { background: var(--tinta); color: var(--cal); }
.menu .botao { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }

/* Início */
.inicio { background: var(--anil); color: var(--cal); overflow: hidden; }
.inicio .wrap { display: grid; gap: 40px; padding-top: 44px; }
.inicio h1 { max-width: 14ch; }
.chamada { margin-top: 18px; max-width: 36ch; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }
.inicio .botao { margin-top: 28px; }

/* Parede de cobogós: faixa de 5 x 3 no celular, metade da tela no computador.
   Ao abrir a página, os blocos são assentados de baixo para cima. */
.parede { --topo: 2; margin: 0 calc(-1 * var(--margem)); aspect-ratio: 5 / 3; overflow: hidden; }
.parede svg { width: 140%; height: auto; }
.parede .bl { transform-box: fill-box; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .parede .bl {
    animation: assentar .6s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(max(0, var(--topo) - var(--l)) * 110ms + var(--c) * 35ms + 150ms);
  }
}
@keyframes assentar { from { opacity: 0; transform: translateY(18%); } }
.l0 { --l: 0; } .l1 { --l: 1; } .l2 { --l: 2; } .l3 { --l: 3; } .l4 { --l: 4; } .l5 { --l: 5; } .l6 { --l: 6; } .l7 { --l: 7; }
.c0 { --c: 0; } .c1 { --c: 1; } .c2 { --c: 2; } .c3 { --c: 3; } .c4 { --c: 4; } .c5 { --c: 5; } .c6 { --c: 6; }

@media (min-width: 900px) {
  .inicio h1 { font-size: clamp(2.6rem, 1.1rem + 3.3vw, 4rem); font-weight: 300; }
  .inicio .wrap {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 64px;
    min-height: calc(100svh - var(--barra)); padding-block: 72px;
  }
  .parede {
    --topo: 7; align-self: stretch; aspect-ratio: auto;
    margin: -72px calc((100vw - min(100vw - 2 * var(--margem), var(--largura))) / -2) -72px 0;
  }
  .parede svg { width: 100%; height: 100%; }
}

.secao { padding: 72px 0; }
@media (min-width: 900px) { .secao { padding: 112px 0; } }

/* Propósito */
.proposito { position: relative; overflow: hidden; background: var(--amarelo); }
.proposito .wrap { position: relative; }
.luz { display: none; }
@media (min-width: 900px) {
  .proposito .frase { font-size: clamp(2rem, 1rem + 2.2vw, 3.1rem); }
  /* Luz e sombra que um cobogó projeta na parede, só no computador */
  .luz {
    display: block; position: absolute; top: 0; right: 0; width: 58%; height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 70%); mask-image: linear-gradient(90deg, transparent 5%, #000 70%);
  }
  .luz .sombra { fill: #DCA43F; }
  .luz .vaos { fill: #F2C873; }
}
.proposito .frase {
  max-width: 26ch;
  font-size: clamp(1.6rem, 1.15rem + 2vw, 2.8rem);
  font-stretch: 112%; font-weight: 360; line-height: 1.2;
  text-wrap: balance;
}

/* Entregas */
.entregaveis { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.entregaveis li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.entregaveis .icone { width: 44px; height: 44px; }
.entregaveis p { margin-top: 4px; color: var(--suave); }
.porta { display: none; }
.online { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--claro); color: var(--suave); max-width: none; }
/* No computador, cada entrega vira uma fachada colorida com porta em arco, como as casas de Olinda */
@media (min-width: 760px) {
  .entregaveis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 48px; }
  .entregaveis li { position: relative; display: block; min-height: clamp(340px, 30vw, 420px); padding: 30px clamp(20px, 2.4vw, 32px) 0; }
  .entregaveis .icone { display: none; }
  .entregaveis h3 { font-size: clamp(1.2rem, .85rem + .75vw, 1.55rem); font-weight: 500; font-stretch: 112%; }
  .entregaveis p { margin-top: 10px; max-width: 24ch; color: inherit; }
  .casa-coral { background: var(--coral); }
  .casa-anil { background: var(--anil); color: var(--cal); }
  .casa-verde { background: var(--verde); }
  .porta { display: block; position: absolute; left: 50%; bottom: 0; width: 40%; height: auto; transform: translateX(-50%); fill: var(--cal); }
  .online { margin-top: 0; border-top: 2px solid var(--tinta); }
}

/* Contato */
.contato { background: var(--verde); }
.contato .wrap { display: grid; gap: 32px; }
@media (min-width: 900px) { .contato .wrap { grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; } }
.contato .texto p { margin-top: 14px; }

[hidden] { display: none !important; }

/* Pedido em etapas */
.formulario { background: var(--branco); padding: 24px 20px 28px; border-radius: 6px; }
@media (min-width: 600px) { .formulario { padding: 36px; } }
.formulario form { display: grid; gap: 24px; }
.formulario input, .formulario select, .formulario textarea { scroll-margin: calc(96px + env(safe-area-inset-top)) 0 112px; }

.progresso { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 0 8px; }
.progresso button {
  position: relative; display: block; width: 32px; height: 32px;
  padding: 0; border: 0; background: none; color: var(--claro); cursor: pointer;
}
.progresso button:disabled { cursor: default; }
.progresso svg { width: 100%; height: 100%; }
.marco-nome { display: none; }
.progresso li:nth-child(1) { --cor: var(--amarelo); }
.progresso li:nth-child(2) { --cor: var(--coral); }
.progresso li:nth-child(3) { --cor: var(--verde); }
.progresso li:nth-child(4) { --cor: var(--anil); }
.progresso li:nth-child(5) { --cor: var(--amarelo); }
.progresso li:nth-child(6) { --cor: var(--coral); }
.progresso [data-estado="feita"], .progresso [data-estado="atual"] { color: var(--cor); }
.progresso [data-estado="atual"]::after {
  content: ""; position: absolute; left: 3px; right: 3px; bottom: -9px;
  height: 3px; border-radius: 2px; background: var(--tinta);
}

/* No computador, as etapas viram uma lista ao lado do pedido */
.progresso-lado { display: none; }
@media (min-width: 1000px) {
  .progresso-topo { display: none; }
  .progresso-lado { display: grid; gap: 2px; margin-top: 40px; padding: 0; }
  .progresso-lado button {
    display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 14px;
    width: 100%; height: auto; min-height: 44px; font: inherit; text-align: left; color: var(--tinta);
  }
  .progresso-lado svg { width: 26px; height: 26px; color: color-mix(in srgb, var(--tinta) 22%, transparent); }
  .progresso-lado .marco-nome { display: block; font-size: 1rem; line-height: 1.3; }
  .progresso-lado [data-estado="feita"], .progresso-lado [data-estado="atual"] { color: var(--tinta); }
  .progresso-lado [data-estado="feita"] svg { color: var(--tinta); }
  .progresso-lado [data-estado="atual"] svg { color: var(--cal); }
  .progresso-lado [data-estado="atual"] .marco-nome { font-weight: 650; }
  .progresso-lado [data-estado="atual"]::after { content: none; }
  .progresso-lado [data-estado="proxima"] { color: color-mix(in srgb, var(--tinta) 62%, transparent); }
  .progresso-lado [data-estado="feita"]:hover .marco-nome { text-decoration: underline; text-underline-offset: 4px; }
  .contato .texto { position: sticky; top: calc(var(--barra) + 32px); }
}

.etapa { display: grid; gap: 22px; }
.etapa-titulo { font-size: 1.45rem; font-weight: 450; font-stretch: 112%; line-height: 1.15; }
.contagem { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--suave); }

.campo { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.campo > label, .campo legend { padding: 0; font-weight: 550; font-size: .98rem; }
.campo legend { margin-bottom: 8px; }
.opcional { font-weight: 400; color: var(--suave); }
.ajuda { font-size: .92rem; color: var(--suave); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; color: var(--tinta); background-color: var(--branco);
  border: 1.5px solid var(--linha); border-radius: 4px;
}
.campo select {
  -webkit-appearance: none; appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%231F2A44' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
.campo textarea { resize: vertical; min-height: 104px; }
.campo input::placeholder, .campo textarea::placeholder { color: #6B7286; }
.campo [aria-invalid="true"] { border-color: var(--erro); }
.erro { color: var(--erro); font-size: .92rem; }

.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes label { position: relative; display: flex; flex: 1 1 auto; }
.opcoes input, .cartao input {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer;
}
.opcoes span {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--linha); border-radius: 4px; background: var(--branco);
  font-weight: 500; transition: background-color .15s ease, color .15s ease;
}
.opcoes label:active span { background: color-mix(in srgb, var(--claro) 55%, var(--branco)); }
.opcoes input:checked + span { background: var(--tinta); border-color: var(--tinta); color: var(--cal); }
.opcoes input:focus-visible + span, .cartao input:focus-visible + .cartao-corpo { outline: 3px solid var(--tinta); outline-offset: 2px; }
.invalido .opcoes span, .invalido .cartao-corpo { border-color: var(--erro); }

.cartoes { display: grid; gap: 10px; }
.cartao { position: relative; display: block; }
.cartao-corpo {
  display: grid; grid-template-columns: 32px 1fr 22px; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--linha); border-radius: 6px; font-weight: 550; line-height: 1.3;
}
.cartao-corpo svg { width: 32px; height: 32px; }
.radio { width: 22px; height: 22px; border: 1.5px solid var(--linha); border-radius: 50%; }
.cartao input:checked + .cartao-corpo { border-color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--tinta); }
.cartao input:checked + .cartao-corpo .radio { border: 7px solid var(--tinta); }

.comodos { display: grid; gap: 16px; }
.comodo { display: grid; gap: 18px; }
.comodo-topo { display: none; }
.varios .comodo { padding: 14px; border: 1px solid var(--claro); border-radius: 6px; }
.varios .comodo-topo { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.comodo-topo h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.remover {
  min-height: 40px; padding: 0 4px; border: 0; background: none;
  font: inherit; font-size: .92rem; color: var(--suave);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.adicionar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; border: 1.5px dashed var(--linha); border-radius: 6px; background: none;
  font: inherit; font-weight: 600; color: var(--tinta); cursor: pointer;
}
.adicionar svg { width: 18px; height: 18px; }
.medidas { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px 8px; }
.medida label { display: block; margin-bottom: 4px; font-size: .85rem; font-weight: 500; color: var(--suave); }
.com-unidade, .com-prefixo { position: relative; }
.com-unidade input { padding: 12px 28px 12px 10px; }
.com-prefixo input { padding-left: 46px; }
.unidade, .prefixo { position: absolute; top: 50%; transform: translateY(-50%); color: var(--suave); pointer-events: none; }
.unidade { right: 10px; }
.prefixo { left: 14px; }
.area { font-size: .92rem; color: var(--suave); }

.horarios { display: grid; gap: 18px; }
.horario { margin: 0; padding: 0; border: 0; min-width: 0; }
.horario legend { margin-bottom: 6px; padding: 0; font-size: .95rem; font-weight: 600; }
.horario-campos { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px; }
.horario label { display: block; margin-bottom: 4px; font-size: .85rem; font-weight: 500; color: var(--suave); }
/* 16 px no mínimo: abaixo disso o iPhone dá zoom no campo */
.horario input { min-width: 0; padding-inline: 10px; font-size: 1rem; }
.horario input::-webkit-date-and-time-value { text-align: left; }
.horario .erro { margin-top: 6px; }
@supports (-webkit-touch-callout: none) { .horario input { -webkit-appearance: none; appearance: none; } }

.campo > .aceite { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-weight: 400; font-size: .95rem; cursor: pointer; }
.aceite input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--tinta); cursor: pointer; }

.navegacao { display: grid; gap: 4px; padding-top: 20px; border-top: 1px solid var(--claro); }
.botao-voltar {
  justify-self: center; min-height: 44px; padding: 0 16px; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--tinta);
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.botao:disabled, .botao-voltar:disabled { opacity: .6; cursor: wait; }
.status { font-weight: 550; color: var(--erro); }

.enviado { display: grid; gap: 12px; justify-items: start; }
.enviado:focus { outline: none; }
.enviado svg { width: 56px; height: 56px; margin-bottom: 4px; }
.enviado h3 { font-size: 1.5rem; font-weight: 450; font-stretch: 112%; }

/* Com o teclado aberto no celular, as abas saem da frente (classe posta pelo app.js) */
.teclado-aberto .abas { display: none; }

/* Rodapé */
.rodape { background: var(--tinta); color: var(--claro); padding: 56px 0 40px; font-size: .92rem; }
.rodape .wrap { display: grid; gap: 8px; }
.rodape .logo { color: var(--cal); }
.rodape .marca-lockup { margin-bottom: 16px; }
.rodape .marca-lockup { --logo: 28px; }
.rodape .cnpj, .rodape .empresa { white-space: nowrap; }
.rodape .legal p { max-width: none; }
.rodape .legal {
  display: grid; gap: 6px; padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--claro) 28%, transparent);
  font-size: .85rem; line-height: 1.55;
}
.rodape sup { font-size: .72em; line-height: 0; vertical-align: super; }

/* Abas (celular) */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--cal) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--claro);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.abas a:active { background: color-mix(in srgb, var(--claro) 60%, transparent); }
.abas a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: var(--abas); color: var(--suave); text-decoration: none; font-size: .75rem; font-weight: 500;
}
.abas svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.abas a[aria-current="true"] { color: var(--tinta); font-weight: 600; }
.abas a[aria-current="true"]::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 24px; height: 3px;
  transform: translateX(-50%); background: var(--anil); border-radius: 0 0 3px 3px;
}
@media (min-width: 900px) { .abas { display: none; } }
