:root {
  color-scheme: dark;
  --bg: #0a1411;
  --bg-2: #0e1c17;
  --panel: #132a22;
  --panel-2: #183429;
  --line: #27493d;
  --ink: #eef5ef;
  --muted: #9fb8ac;
  --gold: #f1cf6b;
  --gold-deep: #c99a2e;
  --teal: #62d6b3;
  --danger: #ff9086;
  --amber: #d99a2b;
  --radius: 14px;
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgb(98 214 179 / .14), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgb(241 207 107 / .08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
body.has-cart { padding-bottom: 96px; }
body.modal-open { overflow: hidden; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6.4vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--gold); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 640px); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.gold { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1b1400; padding: .5rem .8rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- faixas de aviso ---------- */
.mock-banner { background: #7a1f16; color: #fff; text-align: center; padding: .45rem 1rem; font-size: .85rem; font-weight: 700; letter-spacing: .02em; }
.resume-bar {
  position: sticky; top: 0; z-index: 60; display: flex; gap: .75rem; justify-content: center; align-items: center; flex-wrap: wrap;
  background: var(--gold); color: #1b1400; padding: .55rem 1rem; font-weight: 600; font-size: .95rem;
}
.resume-bar .btn { background: #1b1400; color: var(--gold); border-color: #1b1400; padding: .3rem .8rem; }

/* ---------- topo ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgb(10 20 17 / .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.resume-bar:not([hidden]) ~ .top { top: 46px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--gold); letter-spacing: .01em; }
.top-nav { display: flex; gap: 1.1rem; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top-nav a:hover { color: var(--ink); }

/* ---------- botões ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .65rem 1.25rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, #f6dc86, var(--gold) 50%, var(--gold-deep)); color: #231a00; border-color: #b78a24; box-shadow: 0 6px 22px rgb(241 207 107 / .18); }
.btn-gold:hover { border-color: #fff2b8; filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 40px; padding: .4rem .9rem; font-size: .92rem; }

/* ---------- abertura ---------- */
.hero { padding: 40px 0 28px; }
.hero-in { display: grid; gap: 28px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--teal); font-weight: 700; margin-bottom: .6rem; }
.sub { font-family: var(--serif); font-size: clamp(1.05rem, 3vw, 1.4rem); color: var(--muted); margin-bottom: 1.1rem; }
.story { font-size: 1.1rem; max-width: 36rem; }
.facts { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.facts li { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: .35rem .9rem; font-size: .92rem; color: var(--muted); }
.facts strong { color: var(--gold); }
.cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-art { width: min(80%, 340px); height: auto; justify-self: center; border-radius: 16px; box-shadow: 0 18px 50px rgb(0 0 0 / .55), 0 0 0 1px rgb(241 207 107 / .25); }

.meter { max-width: 36rem; }
.meter-bar { height: 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 99px; transition: width .6s ease; }
.meter-text { margin: .5rem 0 0; color: var(--muted); font-size: .95rem; }
.meter-text strong { color: var(--ink); }

@media (min-width: 860px) {
  .hero { padding: 64px 0 40px; }
  .hero-in { grid-template-columns: 1.25fr .75fr; }
  .hero-art { width: 100%; }
}

/* ---------- seções ---------- */
.sec { padding: 44px 0; }
.sec-alt { background: linear-gradient(180deg, transparent, rgb(255 255 255 / .025), transparent); }
.sec-head { margin-bottom: 1.2rem; }
.notice { border-radius: var(--radius); padding: .9rem 1.1rem; border: 1px solid; margin-bottom: 1rem; }
.notice-gold { background: rgb(241 207 107 / .1); border-color: rgb(241 207 107 / .45); }

.winner-sec { padding: 8px 0 28px; }
.winner-card { text-align: center; padding: 2rem 1rem; border-radius: 20px; border: 1px solid var(--gold-deep); background: radial-gradient(500px 220px at 50% 0, rgb(241 207 107 / .16), transparent 70%), var(--panel); }
.winner-number { font-family: var(--serif); font-size: clamp(4rem, 22vw, 8rem); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; margin: .3rem 0; }
.winner-name { font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }

/* ---------- grade de números ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; padding: 0; color: var(--muted); font-size: .88rem; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: .4rem; vertical-align: -2px; border: 1px solid var(--line); background: var(--panel); }
.sw-sel { background: var(--gold); border-color: var(--gold); }
.sw-res { background: repeating-linear-gradient(135deg, var(--amber) 0 3px, #5b3f0b 3px 6px); border-color: var(--amber); }
.sw-paid { background: #20382f; border-color: #20382f; }

.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.num {
  appearance: none; position: relative; min-height: 52px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: 700 1rem/1 var(--sans); font-variant-numeric: tabular-nums;
  cursor: pointer; transition: transform .1s, border-color .1s, background .1s;
}
.num:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.num.is-selected { background: var(--gold); border-color: #fff2b8; color: #231a00; box-shadow: 0 0 0 2px rgb(241 207 107 / .35); }
.num.is-selected::after { content: "✓"; position: absolute; top: 3px; right: 6px; font-size: .7rem; }
.num.is-reserved { background: repeating-linear-gradient(135deg, #3a2a08 0 6px, #2a1e06 6px 12px); border-color: var(--amber); color: #e8c777; cursor: not-allowed; }
.num.is-paid { background: #0f1f1a; border-color: #162a23; color: #4b6b5e; cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 2px; }
.num:disabled { cursor: not-allowed; }

/* ---------- passos e regras ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.steps h3 { margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--muted); }
.step-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 1.1rem var(--serif); background: var(--gold); color: #231a00; }
.rules { margin: 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: .35rem; }
.rules strong { color: var(--ink); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- formulários ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.form { display: grid; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: .6rem; padding: 0; }
.field { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.field em { color: var(--muted); font-weight: 400; font-style: normal; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: 48px; padding: .6rem .85rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); font: inherit; font-weight: 400;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6d867a; }
input:focus-visible, textarea:focus-visible { outline: 3px solid rgb(241 207 107 / .55); outline-offset: 1px; border-color: var(--gold); }
.two { display: grid; gap: 14px; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: .6rem; align-items: center; font-size: .95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.form-error { background: rgb(255 144 134 / .1); border: 1px solid rgb(255 144 134 / .4); color: var(--danger); border-radius: 12px; padding: .6rem .85rem; margin: 0; font-size: .95rem; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.chip-btn { appearance: none; min-height: 44px; padding: .4rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 700 1rem var(--sans); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--gold); border-color: #fff2b8; color: #231a00; }

/* ---------- barra fixa da seleção ---------- */
.cartbar { position: fixed; inset: auto 0 0 0; z-index: 40; background: rgb(14 28 23 / .94); backdrop-filter: blur(12px); border-top: 1px solid var(--gold-deep); padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom)); }
.cart-in { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.cart-info { display: grid; line-height: 1.25; }
.cart-info strong { font-size: 1rem; }
.cart-info .gold { font: 700 1.3rem var(--serif); }
.cart-actions { display: flex; gap: .5rem; align-items: center; }

/* ---------- rodapé ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 28px; margin-top: 20px; background: var(--bg-2); }
.foot p { margin-bottom: .5rem; }
.foot-grid { display: grid; gap: 28px; }
.foot-links, .foot-contact { display: grid; gap: .45rem; align-content: start; }
.foot-links strong, .foot-contact strong { color: var(--gold); font-family: var(--serif); font-size: 1.05rem; margin-bottom: .1rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
#footerContact a { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem 1rem; border-radius: 12px; background: #1f8f5f; color: #fff; font-weight: 700; text-decoration: none; }
#footerContact a:hover { filter: brightness(1.1); }
.foot-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.foot-legal p { margin-bottom: .35rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }

/* ---------- janela de pagamento ---------- */
.dlg { width: min(100% - 24px, 480px); max-height: min(94dvh, 820px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--ink); overflow: auto; }
.dlg::backdrop { background: rgb(2 8 6 / .72); backdrop-filter: blur(3px); }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem .6rem; background: var(--panel); }
.dlg-head h2 { margin: 0; font-size: 1.4rem; }
.dlg-body { padding: .2rem 1.2rem 1.3rem; display: grid; gap: 14px; }
.icon-btn { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.icon-btn:hover { border-color: var(--gold); }
@media (max-width: 559px) { .dlg { margin: auto auto 0; width: 100%; max-height: 96dvh; border-radius: 20px 20px 0 0; } }

.pay-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.pay-summary .num-chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.pay-summary .chip { background: rgb(241 207 107 / .15); color: var(--gold); border-radius: 8px; padding: 0 .5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-amount { font: 700 1.5rem var(--serif); color: var(--gold); }
.qr { justify-self: center; background: #fff; padding: 12px; border-radius: 16px; width: 232px; height: 232px; display: grid; place-items: center; }
.qr img { width: 208px; height: 208px; image-rendering: pixelated; }
.code-box { display: grid; gap: .5rem; }
.code-box textarea { font: .78rem/1.35 ui-monospace, Consolas, monospace; min-height: 84px; word-break: break-all; }
.countdown { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown.is-low { color: var(--danger); }
.status-line { display: flex; gap: .6rem; align-items: center; justify-content: center; color: var(--muted); font-size: .95rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.pay-steps { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; }
.result { text-align: center; display: grid; gap: .8rem; justify-items: center; padding: .6rem 0; }
.result .big-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; background: rgb(98 214 179 / .15); color: var(--teal); border: 2px solid var(--teal); }
.result .big-icon.warn { background: rgb(241 207 107 / .12); color: var(--gold); border-color: var(--gold); }
.result .num-chips { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.result .chip { background: var(--gold); color: #231a00; border-radius: 10px; padding: .15rem .7rem; font: 700 1.2rem var(--serif); font-variant-numeric: tabular-nums; }
.link-btn { appearance: none; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: .4rem; justify-self: center; }
.link-btn:hover { color: var(--danger); }
.dev-box { border: 1px dashed var(--danger); border-radius: 12px; padding: .7rem; text-align: center; font-size: .85rem; color: var(--danger); }

/* ---------- aviso rápido ---------- */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 12px); z-index: 90; max-width: min(92vw, 420px); background: var(--ink); color: #0a1411; padding: .65rem 1rem; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #ffb4ab; }

@media (max-width: 559px) {
  .top-nav { gap: .8rem; }
  .top-nav a:nth-child(2) { display: none; }
  .cart-actions .btn-gold { flex: 1; }
  .cart-in { flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
