/* ============================================================
   Cores: os valores reais vêm do config.js (script.js aplica
   --cor-primaria e --cor-destaque). Os de baixo são o padrão.
   ============================================================ */
:root {
  --cor-primaria: #1a1512;
  --cor-destaque: #d4a04c;

  --texto: #f3ead8;
  --texto-suave: #c4b49b;
  --superficie: #241d18;
  --superficie: color-mix(in srgb, var(--cor-primaria) 90%, #fff);
  --borda: #3a2f27;
  --borda: color-mix(in srgb, var(--cor-primaria) 78%, var(--cor-destaque));
  --sobre-destaque: #1a1512;
  --aberto: #7ed69a;
  --fechado: #e08b7b;

  --raio: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--cor-primaria);
  background-image:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--cor-destaque) 14%, transparent), transparent 70%);
  color: var(--texto);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(2.5rem, env(safe-area-inset-top)) 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ---------- Acessibilidade ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: .6rem 1rem; border-radius: 8px;
  background: var(--cor-destaque); color: var(--sobre-destaque); font-weight: 600;
}
.skip:focus { top: 1rem; }
:focus-visible {
  outline: 3px solid var(--cor-destaque);
  outline-offset: 3px;
}

/* ---------- Topo ---------- */
.hero { text-align: center; }
.logo {
  display: block;
  width: 104px; height: 104px;
  margin: 0 auto 1rem;
  border-radius: 50%;
}
h1 {
  margin: 0;
  font: 600 clamp(1.9rem, 8vw, 2.4rem)/1.1 var(--serif);
  letter-spacing: .01em;
}
.slogan {
  margin: .5rem 0 0;
  color: var(--texto-suave);
  font-size: .98rem;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 0;
  padding: .35rem .85rem;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: var(--superficie);
  font-size: .9rem;
}
.status-dot {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--fechado);
}
.status.is-open .status-dot {
  background: var(--aberto);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--aberto) 22%, transparent);
}
.status strong { font-weight: 600; }

/* ---------- Botões ---------- */
.links { display: flex; flex-direction: column; gap: .75rem; }
.links-row { display: flex; gap: .75rem; }
.links-row:not(:has(.btn:not([hidden]))) { display: none; }
.links-row .btn { flex: 1; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  min-height: 56px;
  padding: .75rem 1.25rem;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--superficie);
  color: var(--texto);
  font: 600 1.05rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--cor-destaque); }
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--cor-destaque);
  border-color: var(--cor-destaque);
  color: var(--sobre-destaque);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; }
.btn-small { min-height: 48px; font-size: .95rem; }

.icon {
  flex: none;
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Cartões ---------- */
.card {
  padding: 1.25rem;
  border: 1px solid var(--borda);
  border-radius: calc(var(--raio) + 4px);
  background: var(--superficie);
}
.card h2 {
  margin: 0 0 .75rem;
  font: 600 1.3rem/1.2 var(--serif);
  color: var(--cor-destaque);
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
}
.card-head h2 { margin-bottom: .5rem; }
.tag {
  font-size: .8rem;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Pix */
.pix-tipo { margin: 0; color: var(--texto-suave); font-size: .9rem; }
.pix-chave {
  margin: .15rem 0 1rem;
  font: 600 1.15rem/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
  user-select: all;
}

/* Horário */
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td {
  padding: .55rem .5rem;
  border-top: 1px solid var(--borda);
  text-align: left;
  font-weight: 400;
}
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }
.hours td { text-align: right; }
.hours .fechado td { color: var(--texto-suave); }
.hours tr.hoje th, .hours tr.hoje td {
  color: var(--cor-destaque);
  font-weight: 700;
}
.hours tr.hoje th::after {
  content: "hoje";
  margin-left: .5rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--cor-destaque);
  color: var(--sobre-destaque);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  vertical-align: .1em;
}

/* Endereço + mapa */
address { font-style: normal; margin-bottom: 1rem; }
.map {
  margin-top: 1rem;
  border-radius: var(--raio);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--cor-primaria);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Rodapé ---------- */
.footer {
  padding: 1.5rem 1rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--texto-suave);
  font-size: .9rem;
}
.footer p { margin: .25rem 0; }
.age {
  display: inline-block;
  padding: .45rem .9rem;
  border: 1px solid var(--borda);
  border-radius: 8px;
  color: var(--texto);
}

/* ---------- Aviso "Chave copiada!" ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translate(-50%, 1rem);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: var(--texto);
  color: var(--cor-primaria);
  font-weight: 600;
  box-shadow: 0 8px 24px rgb(0 0 0 / .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }
.noscript { text-align: center; padding: 1rem; }

/* ---------- Animação de entrada (só se o usuário não pediu menos movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: subir .55s cubic-bezier(.2, .7, .2, 1) both; }
  .reveal:nth-child(2) { animation-delay: .06s; }
  .reveal:nth-child(3) { animation-delay: .12s; }
  .reveal:nth-child(4) { animation-delay: .18s; }
  .reveal:nth-child(5) { animation-delay: .24s; }
  .reveal:nth-child(6) { animation-delay: .30s; }
  /* O topo (maior elemento visível) não começa invisível, para não atrasar o LCP. */
  .hero.reveal { animation-name: subir-leve; }
  @keyframes subir {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes subir-leve {
    from { transform: translateY(8px); }
    to   { transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .toast { transition: none; }
}
