/* ===== Brasa & Bruma — base (EXEMPLO / mockup) ===== */
@import url(fonts.css);

:root {
  --creme: #FFF4E3;
  --creme-2: #FBE6C8;
  --terracota: #E4572E;
  --terracota-esc: #B9391A;
  --cta: #C23E1A; /* texto branco >= 4.5:1 */
  --ambar: #F4A52B;
  --cafe: #2B1A12;
  --cafe-2: #4A2E20;
  --matcha: #6B8E4E;
  --rosa: #F2788F;
  --branco: #fff;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --sombra-suave: 0 18px 50px -18px rgba(43, 26, 18, .45), 0 2px 6px rgba(43, 26, 18, .08);
  --alvo: 44px;
  --raio: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
.phone { max-width: 100vw; }
body {
  font-family: var(--sans); color: var(--cafe); background: var(--creme);
  -webkit-font-smoothing: antialiased; line-height: 1.45; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--ambar); outline-offset: 3px; border-radius: 10px;
}
.serif { font-family: var(--serif); font-optical-sizing: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* grão de papel */
.grao::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06; mix-blend-mode: multiply; z-index: 50;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- cenário (desktop) + moldura de telemóvel ---------- */
body.stage {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  background:
    radial-gradient(900px 600px at 12% 8%, rgba(244, 165, 43, .55), transparent 60%),
    radial-gradient(800px 700px at 92% 90%, rgba(228, 87, 46, .45), transparent 60%),
    radial-gradient(600px 500px at 80% 5%, rgba(242, 120, 143, .35), transparent 60%),
    var(--creme);
  background-attachment: fixed;
}
.phone {
  position: relative; width: min(100vw, 430px); height: 100vh; height: 100dvh; background: var(--cafe);
  overflow: hidden; isolation: isolate;
}
@media (min-width: 560px) and (min-height: 760px) {
  body.stage { padding: 20px; }
  .phone {
    height: min(900px, calc(100dvh - 40px)); border-radius: 46px;
    box-shadow: 0 0 0 10px #1b110c, 0 0 0 12px #3a2519, 0 50px 90px -20px rgba(43, 26, 18, .65);
  }
  .phone::before { /* ilha */
    content: ''; position: absolute; top: 9px; left: 50%; width: 92px; height: 26px; margin-left: -46px;
    background: #0d0806; border-radius: 20px; z-index: 200; pointer-events: none;
  }
  .stage-side { display: flex; }
}
.stage-side {
  display: none; position: fixed; left: 32px; bottom: 28px; flex-direction: column; gap: 6px; max-width: 260px;
  font-size: 13px; color: var(--cafe-2); z-index: 5;
}
.stage-side b { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--cafe); }
.stage-side a { text-decoration: underline; text-underline-offset: 3px; }

/* faixa EXEMPLO */
.exemplo-tag {
  position: absolute; z-index: 150; top: 40px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800;
  background: rgba(255, 244, 227, .92); color: var(--terracota-esc); padding: 3px 10px; border-radius: 99px;
  pointer-events: none;
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--alvo);
  padding: 0 22px; border-radius: 99px; font-weight: 700; font-size: 16px; letter-spacing: .005em;
  transition: transform .35s var(--ease-pop), box-shadow .35s var(--ease), background .25s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn-primario { background: var(--cta); color: #fff; box-shadow: 0 12px 28px -10px rgba(228, 87, 46, .85); }
.btn-primario:hover { background: var(--terracota-esc); }

.btn-claro { background: var(--creme); color: var(--cafe); }
.btn-vidro { background: rgba(255, 244, 227, .16); color: #fff; backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.btn-contorno { box-shadow: inset 0 0 0 2px var(--cafe); }
.btn-grande { min-height: 56px; font-size: 17px; width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

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

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--alvo); padding: 0 16px; border-radius: 99px;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: all .3s var(--ease);
}
.pill-vidro { background: rgba(20, 10, 5, .42); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; z-index: 1000;
  background: var(--cafe); color: var(--creme); padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: 14px;
  box-shadow: var(--sombra-suave); transition: all .45s var(--ease); pointer-events: none; max-width: 90vw;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.phone .toast { position: absolute; }

/* revelar */
@keyframes sobe { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes flutua { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(.8deg); } }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); } 100% { box-shadow: 0 0 0 22px rgba(228, 87, 46, 0); } }
@keyframes brilho { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.rev { animation: sobe .8s var(--ease) both; }
.rev.d1 { animation-delay: .08s; } .rev.d2 { animation-delay: .16s; } .rev.d3 { animation-delay: .24s; } .rev.d4 { animation-delay: .32s; } .rev.d5 { animation-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- página "documento" (sobre, 404) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-family: var(--serif); font-size: clamp(38px, 7vw, 64px); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 18px; }
.doc h2 { font-family: var(--serif); font-size: 26px; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 17px; margin-bottom: 10px; color: var(--cafe-2); }
.doc ul { padding-left: 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; table-layout: fixed; }
.doc td, .doc th { overflow-wrap: anywhere; }
.doc td, .doc th { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(43, 26, 18, .15); vertical-align: top; }
.doc .voltar { display: inline-flex; margin-bottom: 28px; font-weight: 700; }

/* botão circular partilhado */
.circ {
  flex: none;
  width: var(--alvo); height: var(--alvo); border-radius: 50%; display: grid; place-items: center;
  background: rgba(20, 10, 5, .45); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); position: relative;
  transition: transform .35s var(--ease-pop), background .25s;
}
.circ:active { transform: scale(.9); }

/* telemóvel real: sem moldura, sem ilha -> topo compacto */
@media (max-width: 559px) {
  .exemplo-tag { top: calc(env(safe-area-inset-top) + 6px); font-size: 9px; padding: 2px 8px; }
  .topo { padding-top: calc(env(safe-area-inset-top) + 28px) !important; gap: 8px !important; }
  .sel-top { padding-top: calc(env(safe-area-inset-top) + 34px) !important; }
  .prod-topo { top: calc(env(safe-area-inset-top) + 32px) !important; }
  .hub-corpo { padding-top: calc(env(safe-area-inset-top) + 36px) !important; }
  .garcom { padding-top: calc(env(safe-area-inset-top) + 36px) !important; }
}
