/* =====================================================================
   Rifa Solidária da Amélia — Identidade visual
   Paleta: verde sálvia, verde pastel, verde escuro, off-white, bege/areia.
   ===================================================================== */

:root {
  --verde-escuro: #3f5c38;
  --verde-escuro-2: #2f4a2b;
  --verde-medio: #5c7a4f;
  --verde-pastel: #b7cf9c;
  --verde-salvia: #cdddb9;
  --verde-claro: #e4eed6;
  --verde-muito-claro: #eef4e4;
  --off-white: #faf8f1;
  --branco: #ffffff;
  --bege: #e9e1cd;
  --areia: #ddd0b4;
  --dourado: #c3a052;
  --prata: #a7acb0;
  --bronze: #b27f52;

  --texto: #35452f;
  --texto-suave: #6a7560;
  --borda: #dfe4d2;

  --amarelo-reservado: #ead7a1;
  --cinza-bloqueado: #d2d2c9;

  --sombra-sm: 0 2px 8px rgba(63, 92, 56, 0.08);
  --sombra-md: 0 8px 28px rgba(63, 92, 56, 0.12);
  --raio: 18px;
  --raio-sm: 12px;
  --container: 1080px;

  --fonte: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fonte);
  color: var(--texto);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--verde-escuro); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

/* ---- Tipografia ---- */
h1, h2, h3 { line-height: 1.15; color: var(--verde-escuro-2); margin: 0 0 .5em; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--verde-medio);
  background: var(--verde-claro); padding: 6px 14px; border-radius: 999px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800;
  letter-spacing: .01em; text-transform: uppercase;
}
.section-lead { color: var(--texto-suave); max-width: 640px; margin: 0 auto; }
.text-center { text-align: center; }

/* ---- Ícones SVG ---- */
svg { display: inline-block; vertical-align: middle; }
.brand-badge svg { width: 20px; height: 20px; color: var(--verde-escuro); }
.heart-divider svg { width: 20px; height: 20px; }
.floating-heart svg { width: 28px; height: 28px; }
.diag-ico svg { width: 22px; height: 22px; }
.summary-pill svg { width: 22px; height: 22px; color: var(--verde-escuro); flex: none; }
.summary-pill { gap: 10px; }
.trophy svg { width: 46px; height: 46px; }
.prize-card.gold .trophy { color: var(--dourado); }
.prize-card.silver .trophy { color: var(--prata); }
.prize-card.bronze .trophy { color: var(--bronze); }
.prize-card .trophy { line-height: 0; margin-bottom: 4px; }
.pay-card h3 svg { width: 22px; height: 22px; color: var(--verde-escuro); }
.draw-date .pill svg { width: 20px; height: 20px; }
.faq-q .chev { display: inline-flex; transition: transform .3s ease; color: var(--verde-medio); }
.faq-q .chev svg { width: 18px; height: 18px; }
.btn-ico { display: inline-flex; }
.btn-ico svg { width: 20px; height: 20px; }
.step .step-num svg, .meta-stat svg { vertical-align: middle; }

/* ---- Decoração: patinhas / corações ---- */
.paw { display: inline-block; color: var(--verde-pastel); opacity: .6; }
.heart-divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--verde-pastel); margin: 14px 0;
}
.heart-divider::before, .heart-divider::after {
  content: ""; height: 2px; width: 60px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--verde-pastel));
}
.heart-divider::after { background: linear-gradient(270deg, transparent, var(--verde-pastel)); }

/* Traço de pincel atrás de títulos */
.brush {
  position: relative; display: inline-block; padding: 2px 18px; color: var(--branco);
  background: var(--verde-escuro);
  border-radius: 40% 60% 55% 45% / 60% 50% 55% 45%;
}

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  border: none; border-radius: 999px; padding: 14px 26px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--verde-escuro); color: var(--branco); box-shadow: var(--sombra-sm); }
.btn-primary:hover { background: var(--verde-escuro-2); box-shadow: var(--sombra-md); }
.btn-outline {
  background: var(--branco); color: var(--verde-escuro);
  border: 2px solid var(--verde-pastel);
}
.btn-outline:hover { border-color: var(--verde-escuro); }
.btn-whatsapp { background: #2aa65a; color: #fff; }
.btn-whatsapp:hover { background: #228f4d; }
.btn-ghost { background: var(--verde-claro); color: var(--verde-escuro); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Cabeçalho / navegação ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 241, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--verde-escuro-2); text-decoration: none; }
.brand .brand-badge {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--verde-claro);
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { text-decoration: none; color: var(--texto); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--verde-escuro); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ---- Hero ---- */
.hero { padding: 56px 0 40px; background:
  radial-gradient(1200px 400px at 80% -10%, var(--verde-claro), transparent),
  linear-gradient(180deg, var(--verde-muito-claro), var(--off-white)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: center; }
.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: .01em;
  text-transform: uppercase; line-height: 1.02; margin-bottom: 8px;
}
.hero-title .l1 { color: var(--verde-medio); display: block; font-size: .62em; letter-spacing: .12em; }
.hero-title .l2 { color: var(--verde-escuro-2); display: block; }
.hero-sub { font-size: 1.15rem; color: var(--texto-suave); max-width: 30ch; margin: 0 0 22px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-photo { position: relative; }
.hero-photo img {
  border-radius: 26px; box-shadow: var(--sombra-md); width: 100%;
  aspect-ratio: 4/5; object-fit: cover; border: 6px solid var(--branco);
}
.hero-photo .floating-heart {
  position: absolute; bottom: -14px; left: -14px; background: var(--branco);
  border-radius: 50%; width: 60px; height: 60px; display: grid; place-items: center;
  box-shadow: var(--sombra-sm); color: #e07a7a; font-size: 1.6rem;
}

/* ---- Seções genéricas ---- */
section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }

/* ---- História ---- */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.story-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.story-gallery img { border-radius: var(--raio); aspect-ratio: 1; object-fit: cover; box-shadow: var(--sombra-sm); }
.story-gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.story-text p { margin: 0 0 14px; }
.story-text .lead-name { font-weight: 800; color: var(--verde-escuro); }

/* ---- Diagnósticos ---- */
.diag { background: var(--verde-muito-claro); }
.diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.diag-card {
  background: var(--off-white); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 24px; box-shadow: var(--sombra-sm);
}
.diag-card h3 {
  display: flex; align-items: center; gap: 12px; font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px;
}
.diag-ico {
  width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--verde-claro); color: var(--verde-escuro);
}
.diag-card ul { margin: 0; padding-left: 20px; }
.diag-card ul li { margin-bottom: 6px; }
.diag-card p { margin: 0; color: var(--texto); }
.diag-disclaimer { text-align: center; color: var(--texto-suave); font-size: .9rem; margin-top: 24px; }

/* ---- Meta / progresso ---- */
.meta-panel {
  background: var(--verde-escuro); color: #f3f7ec; border-radius: 26px; padding: 34px;
  box-shadow: var(--sombra-md); position: relative; overflow: hidden;
}
.meta-panel h2 { color: #fff; }
.meta-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.meta-amount { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 900; color: #fff; }
.meta-amount small { font-size: .5em; font-weight: 600; opacity: .8; }
.meta-pct { font-size: 1.4rem; font-weight: 800; color: var(--verde-pastel); }
.progress {
  height: 20px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; margin: 18px 0 10px;
}
.progress-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--verde-pastel), #e7f0d4);
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.meta-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.meta-stat { background: rgba(255,255,255,.12); border-radius: var(--raio-sm); padding: 14px; text-align: center; }
.meta-stat b { display: block; font-size: 1.35rem; color: #fff; }
.meta-stat span { font-size: .82rem; opacity: .85; }
.meta-note { font-size: .85rem; opacity: .8; margin-top: 18px; }

/* ---- Prêmios ---- */
.prizes { background: var(--verde-muito-claro); }
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prize-card {
  background: var(--off-white); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 26px 20px; text-align: center; box-shadow: var(--sombra-sm); position: relative;
}
.prize-card .trophy { font-size: 2.4rem; }
.prize-card.gold   { border-top: 4px solid var(--dourado); }
.prize-card.silver { border-top: 4px solid var(--prata); }
.prize-card.bronze { border-top: 4px solid var(--bronze); }
.prize-place { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--verde-medio); margin: 8px 0; }
.prize-value { display: inline-block; background: var(--verde-escuro); color: #fff; font-weight: 800; font-size: 1.3rem; padding: 8px 18px; border-radius: 999px; }
.prize-total { text-align: center; margin-top: 24px; font-weight: 700; color: var(--verde-escuro); }

/* ---- Grade de números ---- */
.raffle-summary { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 28px; }
.summary-pill {
  background: var(--verde-claro); border-radius: var(--raio-sm); padding: 12px 20px; display: flex; gap: 12px; align-items: center;
}
.summary-pill b { color: var(--verde-escuro-2); font-size: 1.15rem; }

.grid-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search-box { position: relative; flex: 1 1 220px; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 42px; border: 1px solid var(--borda); border-radius: 999px;
  font-family: inherit; font-size: 1rem; background: var(--branco); color: var(--texto);
}
.search-box .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--verde-medio); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  border: 1px solid var(--borda); background: var(--branco); color: var(--texto);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: .9rem;
}
.filter-btn.active { background: var(--verde-escuro); color: #fff; border-color: var(--verde-escuro); }

.legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 18px 0 22px; padding: 14px; background: var(--off-white); border: 1px solid var(--borda); border-radius: var(--raio); }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--texto-suave); }
.legend-swatch { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }
.sw-disponivel { background: var(--verde-claro); }
.sw-selecionado { background: var(--verde-escuro); }
.sw-reservado { background: var(--amarelo-reservado); }
.sw-pago { background: var(--verde-escuro-2); }
.sw-bloqueado { background: var(--cinza-bloqueado); }

.numbers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px;
}
.num {
  font-family: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  border: 1px solid var(--borda); border-radius: var(--raio-sm); padding: 12px 4px;
  background: var(--verde-claro); color: var(--verde-escuro-2);
  transition: transform .1s ease, box-shadow .1s ease; text-align: center; min-height: 46px;
}
.num:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--sombra-sm); }
.num.selecionado { background: var(--verde-escuro); color: #fff; border-color: var(--verde-escuro); box-shadow: 0 0 0 3px var(--verde-pastel); }
.num.reservado { background: var(--amarelo-reservado); color: #6b531a; cursor: not-allowed; }
.num.pago { background: var(--verde-escuro-2); color: #dfe9d3; cursor: not-allowed; }
.num.bloqueado { background: var(--cinza-bloqueado); color: #8a8a82; cursor: not-allowed; }
.grid-empty { text-align: center; color: var(--texto-suave); padding: 30px; }

/* Barra fixa de seleção */
.selection-bar {
  position: sticky; bottom: 0; z-index: 30; margin-top: 22px;
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra-md); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.selection-info b { font-size: 1.2rem; color: var(--verde-escuro-2); }
.selection-info .sel-count { color: var(--texto-suave); font-size: .9rem; }

/* ---- Como participar (passos) ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
  background: var(--off-white); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 22px; text-align: center; box-shadow: var(--sombra-sm);
}
.step .step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--verde-escuro); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin: 0 auto 12px;
}
.step h3 { font-size: 1.02rem; }
.step p { margin: 0; font-size: .9rem; color: var(--texto-suave); }

/* ---- Pagamento PIX ---- */
.pay { background: var(--verde-muito-claro); }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pay-card {
  background: var(--off-white); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 28px; box-shadow: var(--sombra-sm);
}
.pay-card h3 { display: flex; align-items: center; gap: 10px; }
.pix-key-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--verde-claro); border-radius: var(--raio-sm); padding: 14px 18px; margin: 14px 0;
}
.pix-key-box .k { font-weight: 800; font-size: 1.1rem; color: var(--verde-escuro-2); word-break: break-all; }
.pix-holder { color: var(--texto-suave); font-size: .92rem; }
.copia-cola {
  width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem;
  border: 1px dashed var(--areia); border-radius: var(--raio-sm); padding: 12px; background: #fff;
  color: var(--texto); word-break: break-all; margin-top: 12px; resize: vertical; min-height: 70px;
}
.qr-wrap { text-align: center; margin-top: 16px; }
.qr-wrap canvas, .qr-wrap img { margin: 0 auto; border-radius: 12px; background: #fff; padding: 10px; border: 1px solid var(--borda); }
.pay-instructions { font-size: .92rem; color: var(--texto-suave); }

/* ---- Transparência ---- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--borda); border-radius: var(--raio-sm); margin-bottom: 12px; background: var(--off-white); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-family: inherit; font-weight: 700; color: var(--verde-escuro-2); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 1rem; }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--texto-suave); }
.faq-item.open .faq-a { padding: 0 20px 18px; max-height: 400px; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.draw-date { text-align: center; margin-top: 26px; }
.draw-date .pill { display: inline-flex; align-items: center; gap: 10px; background: var(--verde-claro); color: var(--verde-escuro-2); padding: 12px 22px; border-radius: 999px; font-weight: 700; }

/* ---- Rodapé ---- */
.site-footer { background: var(--verde-escuro-2); color: #d9e3cd; padding: 48px 0 28px; text-align: center; }
.site-footer .closing { font-size: 1.15rem; font-style: italic; max-width: 540px; margin: 0 auto 20px; color: #eef3e4; }
.site-footer .foot-contact { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 20px; }
.site-footer a { color: var(--verde-pastel); }
.site-footer .copyright { font-size: .82rem; opacity: .7; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28, 40, 24, .55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--off-white); border-radius: 24px; max-width: 520px; width: 100%;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--sombra-md); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { padding: 22px 24px 8px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--texto-suave); line-height: 1; }
.modal-body { padding: 8px 24px 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input {
  width: 100%; padding: 13px 16px; border: 1px solid var(--borda); border-radius: var(--raio-sm);
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--texto);
}
.field input:focus { outline: 2px solid var(--verde-pastel); border-color: var(--verde-pastel); }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.chip { background: var(--verde-escuro); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: .85rem; }
.review-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--borda); }
.review-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; color: var(--verde-escuro-2); padding-top: 12px; }
.toast-area { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--verde-escuro-2); color: #fff; padding: 12px 22px; border-radius: 999px; box-shadow: var(--sombra-md); font-weight: 600; animation: pop .2s ease; }
.toast.erro { background: #b5423a; }
.toast.ok { background: #2f7a44; }

.alert { padding: 12px 16px; border-radius: var(--raio-sm); margin-bottom: 14px; font-size: .92rem; }
.alert.warn { background: #fbf3dc; color: #7a5e1b; border: 1px solid #ecd9a6; }
.alert.info { background: var(--verde-claro); color: var(--verde-escuro-2); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-grid { text-align: center; padding: 40px; color: var(--texto-suave); }

/* ---- Responsivo ---- */
@media (max-width: 860px) {
  .hero-grid, .story-grid, .pay-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 360px; margin: 0 auto; }
  .diag-grid, .prize-grid, .steps { grid-template-columns: 1fr; }
  .meta-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; background: var(--off-white); padding: 18px; border-bottom: 1px solid var(--borda); display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 480px) {
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
  .num { padding: 10px 2px; font-size: .85rem; }
  section { padding: 40px 0; }
  .prize-grid { grid-template-columns: 1fr; }
}
