/* =============================================================
   ROLETA AERO · Mega Bazar
   3 cores fixas: Areia, Grafite, Linho. Regras em DESIGN.md
   ============================================================= */
:root {
  --areia: #EFE8DD;
  --grafite: #1A1714;
  --linho: #FBF8F3;
  --bg: var(--areia); --ink: var(--grafite); --paper: var(--linho);
  --m: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 900px) { :root { --m: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif; font-variation-settings: "wdth" 100;
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, fieldset, legend { margin: 0; padding: 0; border: 0; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.kiosk :focus-visible, .foot :focus-visible { outline-color: var(--paper); }

/* ---------- botões ---------- */
.btn {
  --b: var(--ink); --f: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 56px; padding: 0 28px;
  background: var(--b); color: var(--f); border: 0; border-radius: 0;
  font: inherit; font-weight: 600; font-size: 17px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 200ms ease, background-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { opacity: .86; } }
.btn--light { --b: var(--paper); --f: var(--ink); }
.btn--line { --b: transparent; --f: var(--paper); border: 2px solid var(--paper); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--go { width: 100%; min-height: 62px; font-size: 18px; }
.btn--go .btn__label::after { content: "→"; margin-left: 10px; display: inline-block; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn--go:hover .btn__label::after { transform: translateX(4px); } }
.btn.is-loading .btn__label::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- topo ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--m); }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; }
.nav__brand img { height: 30px; width: auto; }
.nav__sub { font-size: 12.5px; line-height: 1.15; font-weight: 600; padding-left: 12px; box-shadow: inset 2px 0 0 var(--ink); }
.nav__tag { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- abertura ---------- */
.hero {
  padding: 18px var(--m) 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) 38vw; gap: 10px; align-items: center;
}
.hero__copy { display: grid; gap: 14px; min-width: 0; }
.hero__title { font-size: clamp(48px, 13.5vw, 150px); font-weight: 700; font-variation-settings: "wdth" 112; line-height: .9; letter-spacing: -0.04em; }
.hero__lead { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.38; max-width: 28rem; grid-column: 1 / -1; }
.hero__when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 15px; font-weight: 600; }
.dot { width: 6px; height: 6px; background: var(--ink); border-radius: 50%; }
@media (max-width: 899px) {
  .hero__copy { display: contents; }
  .hero { grid-template-columns: minmax(0, 1fr) 36vw; }
  .hero__title { grid-column: 1; grid-row: 1; font-size: clamp(40px, 12vw, 96px); }
  .wheel { grid-column: 2; grid-row: 1; }
  .hero__lead { grid-row: 2; margin-top: 8px; }
  .hero__when { grid-column: 1 / -1; grid-row: 3; }
}

/* roleta: gira devagar sozinha; quando a pessoa escolhe o prêmio, para na fatia */
.wheel { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; justify-self: end; }
.wheel__svg { width: 100%; height: 100%; display: block; will-change: transform; }
.wheel__pin { position: absolute; z-index: 2; left: 50%; top: -6px; width: 0; height: 0; transform: translateX(-50%); border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--ink); }
.wheel__hub { position: absolute; z-index: 2; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%); background: var(--ink); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--bg); }
.wheel__hub img { width: 44%; height: auto; }
.js .wheel { opacity: 0; transform: scale(.86) rotate(-30deg); }
.is-ready .wheel { opacity: 1; transform: none; transition: opacity 900ms ease 150ms, transform 1.4s var(--ease-out) 150ms; }
.wheel__svg text { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-variation-settings: "wdth" 112; }

/* texto: sobe de trás de uma máscara, linha por linha (sem desfoque) */
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; }
.js .line > span { transform: translateY(105%); }
.is-ready .line > span, .line.is-in > span { transform: none; transition: transform 1s var(--ease-out); }
.is-ready .hero__title .line:nth-child(2) > span { transition-delay: 110ms; }
.js .line-up { opacity: 0; transform: translateY(18px); }
.is-ready .hero .line-up, .line-up.is-in { opacity: 1; transform: none; transition: opacity 700ms ease, transform 900ms var(--ease-out); }
.is-ready .hero .line-up { transition-delay: 300ms; }
.is-ready .hero .line-up + .line-up { transition-delay: 420ms; }
.js .rules .line > span { transform: translateY(105%); transition: none; }
.rules .line.is-in > span { transform: none; transition: transform 1s var(--ease-out); }

/* ---------- painel do cadastro ---------- */
.kiosk {
  position: relative; isolation: isolate;
  background: var(--ink); color: var(--paper);
  margin: 0 12px; padding: 24px 18px 26px;
  overflow: hidden;
}
@media (min-width: 560px) { .kiosk { max-width: 560px; margin: 0 auto; padding: 30px 30px 32px; } }
.kiosk::before {
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, rgba(251,248,243,.9) 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-border 6s linear infinite;
}
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --a: 360deg; } }
.js .kiosk { opacity: 0; transform: translateY(26px); }
.is-ready .kiosk { opacity: 1; transform: none; transition: opacity 800ms ease 380ms, transform 1.1s var(--ease-out) 380ms; }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 10px; }
.field__q { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 5.4vw, 24px); font-weight: 700; font-variation-settings: "wdth" 108; letter-spacing: -0.01em; line-height: 1.15; }
.field__n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50%; font-size: 13px; font-weight: 700; font-variation-settings: "wdth" 100; letter-spacing: 0; }
legend.field__q { margin-bottom: 10px; }

.prizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prize-opt { position: relative; display: grid; align-content: center; justify-items: center; gap: 4px; min-height: 96px; padding: 12px 6px; border: 2px solid rgba(251,248,243,.35); background: transparent; color: var(--paper); font: inherit; cursor: pointer; text-align: center; transition: border-color 200ms ease, background-color 220ms ease, color 220ms ease, transform 160ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.prize-opt:active { transform: scale(.96); }
.prize-opt b { font-size: clamp(24px, 7vw, 32px); font-weight: 800; font-variation-settings: "wdth" 112; letter-spacing: -0.03em; line-height: 1; }
.prize-opt small { font-size: 12px; line-height: 1.2; opacity: .8; }
.prize-opt[aria-checked="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .prize-opt:hover { border-color: var(--paper); } }

.big-input {
  width: 100%; background: transparent; color: var(--paper); border: 0; border-bottom: 2px solid rgba(251,248,243,.4); border-radius: 0;
  font: inherit; font-size: clamp(22px, 6vw, 28px); font-weight: 600; padding: 8px 0 10px; -webkit-appearance: none; appearance: none;
  transition: border-color 200ms ease;
}
.big-input::placeholder { color: rgba(251,248,243,.5); }
.big-input:focus { outline: none; border-bottom-color: var(--paper); }
.big-input[aria-invalid="true"] { border-bottom-color: #e8a27c; }
.err { color: #f0b493; font-size: 14px; min-height: 0; }
.err:empty { display: none; }

.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 15px; cursor: pointer; }
.check input { width: 26px; height: 26px; margin: 0; border: 2px solid rgba(251,248,243,.6); border-radius: 0; background: transparent; display: grid; place-items: center; -webkit-appearance: none; appearance: none; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.check input::after { content: ""; width: 12px; height: 7px; border: solid var(--ink); border-width: 0 0 3px 3px; transform: rotate(-45deg) scale(.6); opacity: 0; transition: transform 200ms var(--ease-out), opacity 150ms ease; margin-top: -3px; }
.check input:checked { background: var(--paper); border-color: var(--paper); }
.check input:checked::after { transform: rotate(-45deg) scale(1); opacity: 1; }
.check a { text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo { font-size: 13px; opacity: .7; text-align: center; }

/* ---------- cupom ---------- */
.ticket-wrap { display: grid; gap: 16px; }
.ticket-wrap__hello { font-size: clamp(28px, 7vw, 38px); font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -0.03em; line-height: 1; outline: none; }
.ticket-wrap__tip { font-size: 14px; opacity: .8; }
.printer { height: 10px; background: #000; margin: 0 -6px -16px; position: relative; z-index: 2; }
.ticket { position: relative; z-index: 1; background: var(--paper); color: var(--ink); padding: 20px 20px 18px; overflow: hidden; }
.ticket__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 14px; box-shadow: inset 0 -2px 0 var(--ink); }
.ticket__logo { height: 26px; width: auto; }
.ticket__event { font-size: 13px; text-align: right; line-height: 1.25; }
.ticket__event b { font-size: 15px; font-variation-settings: "wdth" 112; }
.k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.prize { font-size: clamp(44px, 13.5vw, 92px); font-weight: 800; font-variation-settings: "wdth" 112; letter-spacing: -0.045em; line-height: .95; margin-top: 4px; }
.prize--long { font-size: clamp(40px, 11.5vw, 80px); }
.prize__note { font-size: 16px; font-weight: 600; margin-top: 6px; }
.ticket__grid { display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; margin-top: 18px; }
.ticket__num { text-align: right; }
.v { font-size: 19px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.v--sm { font-size: 15px; }
.v--num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket__tear { position: relative; height: 0; margin: 20px -20px 16px; border-top: 3px dotted rgba(26,23,20,.28); }
.ticket__tear::before, .ticket__tear::after { content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); }
.ticket__tear::before { left: -13px; } .ticket__tear::after { right: -13px; }
.ticket__foot { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.code { font-size: 21px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barcode { flex: 1; min-width: 70px; max-width: 200px; height: 46px; fill: var(--ink); }
.stamp { position: absolute; right: 16px; bottom: 22px; background: var(--paper); padding: 8px 12px; border: 3px solid var(--ink); font-weight: 800; font-variation-settings: "wdth" 112; font-size: 14px; text-transform: uppercase; transform: rotate(-12deg); opacity: .92; pointer-events: none; }
.ticket-actions { display: grid; gap: 10px; }
.again { justify-self: center; background: none; border: 0; color: var(--paper); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; padding: 8px; cursor: pointer; opacity: .8; }

.ticket-wrap.is-printing .ticket { animation: print 1.25s var(--ease-drawer) both; }
.ticket-wrap.is-printing .stamp { animation: stamp 420ms var(--ease-out) 1.35s both; }
.ticket-wrap.is-printing .ticket-wrap__hello,
.ticket-wrap.is-printing .ticket-wrap__tip,
.ticket-wrap.is-printing .ticket-actions > *,
.ticket-wrap.is-printing .again { animation: rise 600ms var(--ease-out) both; }
.ticket-wrap.is-printing .ticket-wrap__tip { animation-delay: 1.3s; }
.ticket-wrap.is-printing .ticket-actions > :nth-child(1) { animation-delay: 1.4s; }
.ticket-wrap.is-printing .ticket-actions > :nth-child(2) { animation-delay: 1.48s; }
.ticket-wrap.is-printing .again { animation-delay: 1.56s; }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-40px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.8); } to { opacity: .92; transform: rotate(-12deg) scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.closed { display: grid; gap: 12px; text-align: center; padding: 20px 0; }
.closed__title { font-size: clamp(30px, 8vw, 44px); font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -0.03em; line-height: 1; }

/* ---------- regras ---------- */
.rules { padding: 72px var(--m) 64px; max-width: 900px; margin: 0 auto; }
.rules__title { font-size: clamp(40px, 9vw, 88px); font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -0.035em; line-height: .92; margin-bottom: 28px; }
.rules__row { display: grid; gap: 6px; padding: 18px 0; box-shadow: inset 0 1px 0 rgba(26,23,20,.18); }
.rules__row h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.rules__row p { max-width: 38rem; }
@media (min-width: 760px) { .rules__row { grid-template-columns: 1fr 1.4fr; gap: 24px; } }

/* ---------- rodapé ---------- */
.foot { background: var(--ink); color: var(--paper); padding: 36px var(--m) 28px; display: grid; gap: 30px; }
.foot__insta { font-weight: 600; text-underline-offset: 4px; }
.foot__logo { width: min(100%, 520px); height: auto; opacity: .95; }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); padding: 32px var(--m) 48px; max-width: 1200px; margin: 0 auto; gap: 40px; }
  .hero__title { font-size: clamp(72px, 8.5vw, 136px); }
  .nav { max-width: 1200px; margin: 0 auto; }
}
