/* ==========================================================================
   Rifa Beneficente — Esperança Divina em Cristo
   Folha de estilos principal
   ========================================================================== */

:root {
  --navy-950: #08101f;
  --navy-900: #0b1526;
  --navy-800: #0f1e3d;
  --navy-700: #16294f;
  --navy-600: #1f3763;

  --gold-600: #b3861f;
  --gold-500: #d4a017;
  --gold-300: #f0d590;
  --gold-100: #fbf1d8;

  --cream: #faf7f0;
  --cream-200: #f2ecdf;
  --paper: #ffffff;

  --ink: #101a2e;
  --ink-soft: #35425c;
  --muted: #64718c;
  --line: rgba(16, 26, 46, 0.1);
  --line-strong: rgba(16, 26, 46, 0.18);

  --green-bg: #e7f6ec;
  --green-line: #a9dcbe;
  --green-ink: #14663d;

  --amber-bg: #fdf4dc;
  --amber-line: #eed49a;
  --amber-ink: #7d5a06;

  --red-bg: #fdecec;
  --red-line: #f2bcbc;
  --red-ink: #a02626;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(8, 16, 31, 0.06), 0 2px 8px rgba(8, 16, 31, 0.04);
  --shadow: 0 10px 30px -12px rgba(8, 16, 31, 0.22), 0 2px 8px rgba(8, 16, 31, 0.05);
  --shadow-lg: 0 30px 60px -24px rgba(8, 16, 31, 0.35);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }
body.has-selection-bar { padding-bottom: 88px; }

img, svg, canvas { max-width: 100%; }
img { display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--navy-900);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }

::selection { background: var(--gold-300); color: var(--navy-900); }

:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================================
   Botões
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
              color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(11, 21, 38, 0.7);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-800));
  box-shadow: 0 16px 30px -14px rgba(11, 21, 38, 0.8);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--line-strong);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--gold-500);
  color: var(--navy-900);
  background: rgba(212, 160, 23, 0.07);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) { background: rgba(16, 26, 46, 0.06); }

.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Aviso de configuração
   ========================================================================== */

.setup-banner {
  background: #fff4d6;
  color: #6b4c00;
  font-size: 0.85rem;
  padding: 10px clamp(16px, 4vw, 32px);
  text-align: center;
  border-bottom: 1px solid #ecd9a3;
}
.setup-banner code {
  background: rgba(107, 76, 0, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--navy-700), var(--navy-900));
  color: var(--gold-500);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy-900);
}
.brand-text small {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}
.site-nav a:hover { background: rgba(16, 26, 46, 0.06); color: var(--navy-900); }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(212, 160, 23, 0.22), transparent 60%),
    radial-gradient(700px 420px at 10% 110%, rgba(31, 55, 99, 0.55), transparent 65%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #0a1a33 100%);
  color: #fff;
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.28), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.hero .eyebrow { color: var(--gold-300); }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(2.15rem, 5.2vw, 3.65rem);
  color: #fff;
  letter-spacing: -0.025em;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-300);
  background: linear-gradient(100deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lead {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: rgba(255, 255, 255, 0.76);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 36px;
}
.hero .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-300);
  color: #fff;
}
.hero .btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 14px 30px -14px rgba(212, 160, 23, 0.9);
}
.hero .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e2b02a, var(--gold-500));
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin: 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}
.hero-stats span {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

/* Cartão do hero */
.hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 30px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.hero-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-soft {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.pill-gold {
  background: rgba(212, 160, 23, 0.16);
  color: var(--gold-300);
  border: 1px solid rgba(212, 160, 23, 0.34);
}

.hero-prizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 22px;
}
.hero-prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.hero-prize img { width: 100%; max-width: 130px; height: 82px; object-fit: contain; }
.hero-prize span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy-800);
  text-align: center;
}

.hero-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 8px;
}
.hero-progress-head strong { color: var(--gold-300); font-size: 0.95rem; }
.hero-progress-sub {
  margin-top: 8px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Barra de progresso */
.progress {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.progress-sm { height: 7px; }
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.section .progress { background: rgba(16, 26, 46, 0.09); }

/* ==========================================================================
   Seções
   ========================================================================== */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--cream-200); }

.section-head {
  max-width: 660px;
  margin: 0 auto clamp(32px, 5vw, 48px);
  text-align: center;
}
.section-head h2 {
  margin: 14px 0 12px;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
}
.section-head p { color: var(--muted); }

/* ==========================================================================
   Prêmios
   ========================================================================== */

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.prize-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.prize-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.prize-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px 20px 8px;
  background:
    radial-gradient(420px 220px at 50% 0%, var(--gold-100), transparent 70%),
    linear-gradient(180deg, #fdfbf6, #f6f1e6);
}
.prize-media img { width: min(300px, 82%); height: 210px; object-fit: contain; }

.prize-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--navy-900);
  color: var(--gold-300);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

.prize-body { padding: 22px clamp(18px, 2.4vw, 26px) 26px; }
.prize-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.prize-body p { color: var(--muted); font-size: 0.94rem; }

.prize-card.skeleton {
  min-height: 320px;
  background: linear-gradient(100deg, #f1ece1 30%, #f8f5ee 50%, #f1ece1 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
  border-color: transparent;
}
@keyframes shimmer {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}

/* ==========================================================================
   Números
   ========================================================================== */

.section-numbers { background: var(--cream); }

.numbers-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}

.numbers-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.7fr)) minmax(0, 1.6fr);
  gap: 10px;
  margin-bottom: 22px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
}
.status-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--navy-900);
}
.status-card small { font-size: 0.74rem; color: var(--muted); }

.status-dot, .legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.is-available, .legend-dot.is-available { background: #3fae6a; box-shadow: 0 0 0 4px rgba(63, 174, 106, 0.16); }
.status-dot.is-reserved, .legend-dot.is-reserved { background: #e0a91c; box-shadow: 0 0 0 4px rgba(224, 169, 28, 0.16); }
.status-dot.is-sold, .legend-dot.is-sold { background: #d4534e; box-shadow: 0 0 0 4px rgba(212, 83, 78, 0.16); }
.legend-dot.is-selected { background: var(--navy-800); box-shadow: 0 0 0 4px rgba(15, 30, 61, 0.14); }

.status-card-progress { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
.status-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
}
.status-progress-head strong { font-family: var(--font-body); font-size: 0.8rem; color: var(--navy-800); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 12px 0 18px;
  border-top: 1px dashed var(--line);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}

.grid-loading {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.num {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-height: 46px;
  padding: 0;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease,
              color 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.num.is-available {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: var(--green-ink);
}
.num.is-available:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px rgba(20, 102, 61, 0.5);
  border-color: #6cc48d;
}

.num.is-reserved {
  background: var(--amber-bg);
  border-color: var(--amber-line);
  color: var(--amber-ink);
  cursor: not-allowed;
}
.num.is-sold {
  background: var(--red-bg);
  border-color: var(--red-line);
  color: var(--red-ink);
  cursor: not-allowed;
}

.num.is-selected {
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  border-color: var(--gold-500);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 20px -10px rgba(15, 30, 61, 0.8);
}
.num.is-selected::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
}

.numbers-footnote {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ==========================================================================
   Como funciona
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; color: var(--muted); }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--gold-100);
  border: 1px solid #ecdcb2;
  color: #6b4c00;
  font-size: 0.86rem;
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice p { margin: 0; }

/* ==========================================================================
   Ganhadores
   ========================================================================== */

.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.winner-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: #fff;
  border: 1px solid rgba(212, 160, 23, 0.3);
  box-shadow: var(--shadow);
}
.winner-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.3), transparent 65%);
}
.winner-card .winner-prize {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.winner-card .winner-number {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  margin: 14px 0 4px;
}
.winner-card .winner-name { font-size: 1.05rem; font-weight: 600; }
.winner-card .winner-date { margin-top: 14px; font-size: 0.76rem; color: rgba(255, 255, 255, 0.55); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.62);
  padding: clamp(40px, 6vw, 64px) 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}
.footer-brand p { font-size: 0.85rem; max-width: 42ch; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--gold-300); }
.footer-copy {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Barra de seleção fixa
   ========================================================================== */

.selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(11, 21, 38, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(212, 160, 23, 0.28);
  box-shadow: 0 -20px 40px -24px rgba(0, 0, 0, 0.6);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  animation: barUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes barUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.selection-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.selection-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.selection-count { font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); }
.selection-count strong { color: #fff; }
.selection-numbers {
  font-size: 0.82rem;
  color: var(--gold-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}
.selection-total { margin-left: auto; text-align: right; }
.selection-total small { display: block; font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); }
.selection-total strong { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.selection-bar .btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
}
.selection-bar .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e2b02a, var(--gold-500));
}

/* ==========================================================================
   Modais
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 32px);
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 31, 0.62);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 2 * clamp(10px, 3vw, 32px));
  max-height: calc(100dvh - 2 * clamp(10px, 3vw, 32px));
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-card-sm { max-width: 520px; }
@keyframes modalIn {
  from { transform: translateY(16px) scale(0.985); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 30px) 16px;
  border-bottom: 1px solid var(--line);
}
.modal-step {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 4px;
}
.modal-head h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

.modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease;
}
.modal-close:hover { background: rgba(16, 26, 46, 0.06); }

.modal-body {
  padding: clamp(18px, 3vw, 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Checkout */
.checkout-resume {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
}
.resume-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.resume-numbers {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.5;
  word-break: break-word;
}
.resume-total { text-align: right; flex-shrink: 0; }
.resume-total strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--navy-900);
}

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder { color: #9aa5ba; }
.field input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.16);
}
.field input.is-invalid { border-color: var(--red-line); }
.field-error { display: block; margin-top: 5px; font-size: 0.78rem; color: var(--red-ink); }

.checkout-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 18px;
}

.form-error {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  color: var(--red-ink);
  font-size: 0.84rem;
}

/* Pagamento */
.countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--navy-900);
  color: #fff;
}
.countdown .resume-label { color: rgba(255, 255, 255, 0.55); }
.countdown strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--gold-300);
}
.countdown.is-warning strong { color: #ff9d7a; }
.countdown.is-expired { background: #5d1b1b; }

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.pix-card, .upload-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.pix-card h3, .upload-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.pix-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  border: 1px solid #ecdcb2;
  margin-bottom: 14px;
}
.pix-amount small { font-size: 0.76rem; color: #6b4c00; }
.pix-amount strong { font-family: var(--font-display); font-size: 1.35rem; color: #4f3900; }

.pix-qr { text-align: center; margin-bottom: 14px; }
.pix-qr canvas {
  width: 220px;
  height: 220px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.pix-qr-hint { font-size: 0.74rem; color: var(--muted); margin-top: 6px; }

.pix-field { margin-bottom: 12px; }
.pix-field strong { font-size: 0.92rem; color: var(--navy-900); word-break: break-word; }

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-row code {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  max-height: 74px;
  overflow-y: auto;
}

.pix-payload {
  margin-top: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.pix-payload summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--navy-700);
  font-weight: 600;
  margin-bottom: 8px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px;
  margin-bottom: 14px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--gold-500);
  background: var(--gold-100);
}
.dropzone strong { font-size: 0.9rem; }
.dropzone span { font-size: 0.76rem; color: var(--muted); }
.dropzone.has-file { border-style: solid; border-color: var(--green-line); background: var(--green-bg); }
.dropzone.has-file svg { color: var(--green-ink); }

.upload-progress { margin-bottom: 12px; }
.upload-progress small { display: block; margin-top: 5px; font-size: 0.76rem; color: var(--muted); }

.upload-note {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--muted);
}

.payment-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--cream);
}
.payment-status strong { display: block; font-size: 0.9rem; color: var(--navy-900); }
.payment-status small { display: block; margin-top: 4px; font-size: 0.76rem; color: var(--muted); }
.payment-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px var(--gold-100);
}
.payment-status.is-approved { border-color: var(--green-line); background: var(--green-bg); }
.payment-status.is-approved .payment-dot { background: var(--green-ink); box-shadow: 0 0 0 4px #c7ead5; }
.payment-status.is-error { border-color: #e6b4b4; background: #fff2f2; }
.payment-status.is-error .payment-dot { background: #b42318; box-shadow: 0 0 0 4px #f7d6d4; }

#back-to-site { margin-top: 18px; color: var(--ink-soft); }

/* Concluído */
.done-box { text-align: center; padding: 10px 0; }
.done-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green-ink);
  border: 1px solid var(--green-line);
}
.done-box h3 { font-size: 1.4rem; margin-bottom: 10px; }
.done-box p { color: var(--muted); font-size: 0.92rem; max-width: 46ch; margin: 0 auto; }
.done-summary {
  margin: 20px auto;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  text-align: left;
  max-width: 420px;
}
.done-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.done-summary span:first-child { color: var(--muted); }
.done-summary strong { color: var(--navy-900); text-align: right; }

/* Minha reserva */
.reservation-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.reservation-status.pending { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line); }
.reservation-status.paid { background: var(--green-bg); color: var(--green-ink); border: 1px solid var(--green-line); }
.reservation-status.expired,
.reservation-status.cancelled { background: var(--red-bg); color: var(--red-ink); border: 1px solid var(--red-line); }

.reservation-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.reservation-list span {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-800);
}
.reservation-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
}
.reservation-row:last-of-type { border-bottom: none; }
.reservation-row span:first-child { color: var(--muted); }
.reservation-row strong { text-align: right; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.86rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.24s ease;
}
.toast.is-error { background: #7a1f1f; }
.toast.is-success { background: #14532d; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-card-progress { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .pay-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .brand-text small { display: none; }
  .hero { padding-top: 40px; }
  .hero-stats { gap: 12px 24px; }
  .hero-stats strong { font-size: 1.45rem; }
  .prizes-grid { grid-template-columns: 1fr; }
  .prize-media img { height: 180px; }
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
  .num { font-size: 0.84rem; border-radius: 10px; }
  .legend { font-size: 0.74rem; gap: 8px 14px; }
  .selection-inner { flex-wrap: wrap; gap: 10px 14px; }
  .selection-info { flex: 1; }
  .selection-numbers { max-width: 60vw; }
  .selection-bar .btn { width: 100%; order: 3; }
  .selection-total { margin-left: auto; }
  body.has-selection-bar { padding-bottom: 132px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card {
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal-card-sm { max-width: 100%; }
  .checkout-resume { flex-direction: column; align-items: flex-start; gap: 10px; }
  .resume-total { text-align: left; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .numbers-status { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .status-card { padding: 10px; gap: 7px; }
  .status-card strong { font-size: 1.1rem; }
  .status-card small { font-size: 0.66rem; }
  .status-dot { width: 9px; height: 9px; }
  .hero-card-top { justify-content: flex-start; }
  .header-actions .btn-primary { display: none; }
  .numbers-panel { padding: 14px; }
}

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

/* ==========================================================================
   Impressão
   ========================================================================== */

@media print {
  .site-header, .selection-bar, .site-footer, .hero-art, .modal { display: none !important; }
  body { background: #fff; }
}
