/* =====================================================
   FichasNet · Promoção Logo · UI 2026
   Foco: usuário idoso · alto contraste · alvos grandes
   ===================================================== */

:root {
  /* Paleta poker premium · clara e legível */
  --c-bg:        #f4f1e8;
  --c-bg-2:      #ece7d6;
  --c-surface:   #ffffff;
  --c-ink:       #14191c;
  --c-ink-2:     #2a3338;
  --c-muted:     #5b6671;
  --c-line:      #e2dccb;
  --c-line-2:    #cfc7b1;

  --c-primary:   #0a3d2e;
  --c-primary-2: #145e45;
  --c-primary-3: #1c8665;
  --c-on-primary:#ffffff;

  --c-accent:    #c8961a;
  --c-accent-2:  #e6b938;
  --c-accent-3:  #f5e0a3;

  --c-red:       #b3261e;
  --c-red-soft:  #fdeceb;

  --c-success:   #0e7a45;
  --c-success-soft:#e3f5ec;

  /* Tipografia */
  --ff-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --ff-display: Georgia, "Times New Roman", "Iowan Old Style", serif;

  /* Espaçamento */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20,25,28,.06), 0 1px 1px rgba(20,25,28,.04);
  --shadow-md: 0 6px 20px -8px rgba(20,25,28,.18), 0 2px 6px rgba(20,25,28,.06);
  --shadow-lg: 0 24px 48px -20px rgba(20,25,28,.28), 0 4px 12px rgba(20,25,28,.08);

  --t-base: cubic-bezier(.2,.7,.3,1);
}

/* ========== Reset enxuto ========== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  background-image:
    radial-gradient(1200px 600px at 100% -100px, #e8e1ca 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #efe7cf 0%, transparent 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 720px) { body { font-size: 19px; } }

img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--c-primary-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--c-accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden, .skip-link {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  width: 1px !important; height: 1px !important;
  overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
  position: fixed !important;
  top: 12px; left: 12px;
  width: auto !important; height: auto !important;
  clip: auto; clip-path: none;
  padding: 12px 18px;
  background: var(--c-ink); color: var(--c-on-primary);
  border-radius: var(--r-md);
  z-index: 100;
}

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ========== Header ========== */
.site-header {
  position: sticky; top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-primary);
}
.brand-mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--c-primary);
  color: var(--c-accent-2);
  box-shadow: var(--shadow-sm);
}
.brand-text { font-size: 1rem; color: var(--c-ink); letter-spacing: .2px; }
.brand-text strong { font-weight: 800; }

.steps {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--c-muted);
}
.steps .step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: var(--r-pill);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-bg-2); color: var(--c-muted);
  font-size: .75rem; font-weight: 700;
}
.step.is-active { color: var(--c-ink); }
.step.is-active .step-num { background: var(--c-primary); color: var(--c-on-primary); }
.step-sep { color: var(--c-line-2); }
@media (min-width: 720px) { .steps { display: inline-flex; } }

/* ========== Tipografia ========== */
h1 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.75rem, 4.5vw, 2.4rem); line-height: 1.18; margin: 0 0 12px; letter-spacing: -.5px; }
h2 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.35rem, 3.2vw, 1.7rem); line-height: 1.25; margin: 0 0 10px; }
.eyebrow { color: var(--c-primary-2); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; font-size: .82rem; margin: 0 0 6px; }
.lede { color: var(--c-ink-2); font-size: 1.07rem; max-width: 56ch; }
.muted { color: var(--c-muted); }
.small { font-size: .92rem; }
.hl { color: var(--c-primary-2); background: linear-gradient(180deg, transparent 60%, var(--c-accent-3) 60%); padding: 0 4px; border-radius: 3px; }

/* ========== Hero ========== */
.hero { margin: 8px 0 26px; }

.prize-strip {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; gap: 8px;
}
.prize-strip li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.prize-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--c-primary);
  color: var(--c-accent-2);
  font-size: 1.25rem;
  flex: 0 0 auto;
}
@media (min-width: 600px) { .prize-strip { grid-template-columns: repeat(3, 1fr); } }

/* ========== Cards ========== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  padding: 24px 22px;
  box-shadow: var(--shadow-md);
  margin: 18px 0;
}
.card-form {
  position: relative;
  border-top: 4px solid var(--c-primary);
}
.card-title { margin: 0 0 4px; }
.card-sub { color: var(--c-muted); margin: 0 0 18px; }
.card-eyebrow {
  font-size: .8rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--c-primary-2); font-weight: 800;
  margin: 0 0 8px;
}
.card-foot { margin: 16px 0 0; color: var(--c-muted); }

.link-strong { color: var(--c-primary-2); font-weight: 700; }

/* ========== Form ========== */
.field { display: block; margin: 0 0 18px; }
.field-label {
  display: block; font-weight: 700;
  margin: 0 0 6px;
  font-size: .98rem;
}
.field input[type="text"] {
  width: 100%;
  padding: 18px 18px;
  font-size: 1.4rem;
  letter-spacing: 1px;
  border: 2px solid var(--c-line-2);
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color .2s var(--t-base), box-shadow .2s var(--t-base);
}
.field input[type="text"]::placeholder { color: #bdb59a; }
.field input[type="text"]:focus {
  border-color: var(--c-primary-2);
  box-shadow: 0 0 0 4px #cfeadd;
  outline: none;
}
.field-help { display: block; color: var(--c-muted); margin-top: 6px; font-size: .9rem; }

/* ========== Botões ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  min-height: 56px;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform .12s var(--t-base), background .2s var(--t-base), border-color .2s var(--t-base), color .2s var(--t-base);
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1.15rem; min-height: 60px; padding: 18px 26px; }
.btn-block { display: flex; width: 100%; }
.btn-primary {
  background: var(--c-primary);
  color: var(--c-on-primary);
  box-shadow: 0 4px 14px -6px rgba(10,61,46,.55);
}
.btn-primary:hover { background: var(--c-primary-2); }
.btn-primary[disabled] {
  background: var(--c-bg-2); color: #94918a; cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: var(--c-ink-2);
  border-color: var(--c-line-2);
  margin-top: 10px;
}
.btn-ghost:hover { background: var(--c-bg-2); }
.btn-arrow { font-size: 1.3em; line-height: 0; }

/* ========== Alertas ========== */
.alert {
  display: flex; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  margin: 0 0 16px;
  border: 1px solid transparent;
  font-size: 1rem;
  align-items: flex-start;
}
.alert strong { font-weight: 700; }
.alert-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-weight: 900;
  font-size: .95rem;
}
.alert-error {
  background: var(--c-red-soft);
  border-color: #f3c7c4;
  color: #6b1410;
}
.alert-error .alert-icon { background: var(--c-red); color: #fff; }
.alert-success {
  background: var(--c-success-soft);
  border-color: #b9e3cb;
  color: #0a4f2c;
}
.alert-success .alert-icon { background: var(--c-success); color: #fff; }

/* ========== Callouts ========== */
.callout {
  padding: 16px 18px;
  border-radius: var(--r-md);
  margin: 16px 0;
  border: 1px solid transparent;
}
.callout p { margin: 0 0 6px; }
.callout p:last-child { margin: 0; }
.callout-info { background: #eef6f1; border-color: #cce0d4; color: #0c4533; }
.callout-celebrate { background: linear-gradient(180deg, #fff7df, #f7e7a8); border-color: var(--c-accent-2); }
.callout-celebrate .big { font-family: var(--ff-display); font-size: 1.8rem; margin: 0 0 8px; color: #5f4509; }

/* ========== Steps explicativos ========== */
.explainer {
  margin: 26px 0 0;
  padding: 18px 20px;
  border: 1px dashed var(--c-line-2);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.5);
}
.explainer-title { font-family: var(--ff-display); font-size: 1.1rem; margin: 0 0 8px; color: var(--c-primary); }
.explainer-list {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
}
.explainer-list li {
  counter-increment: step;
  padding: 10px 0 10px 46px;
  position: relative;
  border-bottom: 1px solid var(--c-line);
}
.explainer-list li:last-child { border-bottom: 0; }
.explainer-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 8px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-primary); color: var(--c-accent-2);
  border-radius: 50%;
  font-family: var(--ff-display);
  font-weight: 700;
}

/* ========== Welcome row (votar / resultado) ========== */
.welcome-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.welcome { margin: 0; }
.welcome-eyebrow { display: block; font-size: .82rem; color: var(--c-muted); letter-spacing: .4px; }
.link-out { color: var(--c-muted); font-size: .92rem; text-decoration: none; }
.link-out:hover { color: var(--c-ink); text-decoration: underline; }

/* ========== Vote intro / grid ========== */
.vote-intro h1 { margin-bottom: 4px; }
.vote-intro .lede { margin: 0 0 16px; }

.logo-grid {
  border: 0; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .logo-grid { gap: 16px; } }
@media (min-width: 720px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }

.logo-option { display: block; cursor: pointer; }
.logo-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.logo-frame {
  display: block;
  position: relative;
  background: var(--c-surface);
  border: 2px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 14px 14px 12px;
  text-align: center;
  transition: border-color .15s var(--t-base), transform .15s var(--t-base), box-shadow .15s var(--t-base), background .15s var(--t-base);
  box-shadow: var(--shadow-sm);
}
.logo-frame svg,
.logo-frame .logo-img { width: 100%; height: auto; aspect-ratio: 1/1; display: block; border-radius: var(--r-md); object-fit: contain; background: #fff; }
.logo-num {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  font-size: .98rem;
  color: var(--c-ink-2);
}
.logo-option:hover .logo-frame { border-color: var(--c-primary-3); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.logo-option input:focus-visible + .logo-frame { border-color: var(--c-primary); box-shadow: 0 0 0 3px #cfeadd; }
.logo-option input:checked + .logo-frame {
  border-color: var(--c-primary);
  background: linear-gradient(180deg, #ffffff, #f1f9f4);
  box-shadow: 0 0 0 3px #b6dac6, var(--shadow-md);
}
.logo-option input:checked + .logo-frame::after {
  content: "✓";
  position: absolute;
  top: -10px; right: -10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900;
  box-shadow: 0 4px 10px rgba(10,61,46,.35);
}
.logo-option input:checked + .logo-frame .logo-num {
  color: var(--c-primary);
  font-weight: 800;
}

/* CTA fixa de votação */
.vote-cta {
  position: sticky;
  bottom: 0;
  margin-top: 22px;
  padding: 16px 0 8px;
  background: linear-gradient(180deg, transparent, var(--c-bg) 30%);
}
.vote-cta .muted { text-align: center; margin: 8px 0 0; }

/* ========== Confirmação ========== */
.card-confirm { text-align: center; }
.confirm-pick {
  margin: 18px auto 22px;
  max-width: 280px;
}
.confirm-pick svg,
.confirm-pick .logo-img {
  width: 100%; aspect-ratio: 1/1; height: auto;
  border-radius: var(--r-lg);
  border: 2px solid var(--c-primary);
  box-shadow: var(--shadow-md);
  object-fit: contain; background: #fff;
}
.confirm-label {
  margin-top: 10px;
  font-size: 1.1rem;
}
.confirm-actions { margin-top: 8px; }

/* ========== Resultado ========== */
.card-vote .vote-recap {
  display: flex;
  gap: 16px;
  align-items: center;
}
.card-vote .vote-recap svg,
.card-vote .vote-recap .logo-img {
  width: 100px; aspect-ratio: 1/1; height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  flex: 0 0 auto;
  object-fit: contain; background: #fff;
}
@media (max-width: 480px) {
  .card-vote .vote-recap { flex-direction: column; align-items: flex-start; }
  .card-vote .vote-recap svg,
  .card-vote .vote-recap .logo-img { width: 130px; }
}

.card-waiting {
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #fbf6e8);
  border-color: var(--c-accent-3);
}
.waiting-anim {
  display: inline-flex; gap: 8px;
  margin-bottom: 10px;
}
.waiting-anim .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: pulse 1.4s infinite var(--t-base);
}
.waiting-anim .dot:nth-child(2) { animation-delay: .2s; }
.waiting-anim .dot:nth-child(3) { animation-delay: .4s; }
@keyframes pulse {
  0%, 80%, 100% { opacity: .25; transform: scale(.85); }
  40% { opacity: 1; transform: scale(1); }
}
.waiting-list {
  text-align: left;
  list-style: none;
  padding: 0; margin: 16px auto 0;
  max-width: 460px;
}
.waiting-list li {
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--c-line);
  position: relative;
}
.waiting-list li:last-child { border-bottom: 0; }
.waiting-list li::before {
  content: "♠";
  position: absolute; left: 0; top: 10px;
  color: var(--c-accent);
  font-size: 1.1rem;
}

.card-won { border: 2px solid var(--c-accent); background: linear-gradient(180deg, #fff, #fff8e0); }
.card-lost { background: var(--c-surface); }
.result-winner { text-align: center; margin: 4px 0 14px; }
.result-winner svg,
.result-winner .logo-img { width: 160px; aspect-ratio: 1/1; height: auto; margin: 0 auto 10px; display: block; border-radius: var(--r-lg); box-shadow: var(--shadow-md); object-fit: contain; background: #fff; }

.share-box {
  margin: 18px 0 0;
  padding: 14px 18px;
  background: rgba(255,255,255,.6);
  border: 1px dashed var(--c-line-2);
  border-radius: var(--r-md);
  color: var(--c-muted);
  text-align: center;
  font-size: .96rem;
}

/* ========== Empty state (CPF não encontrado) ========== */
.card-empty {
  text-align: center;
  border-top: 4px solid var(--c-accent);
}
.card-empty-icon {
  color: var(--c-accent);
  margin: 0 auto 8px;
}
.help-box {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.55);
  border: 1px solid var(--c-line);
}
.help-box h2 { font-size: 1.1rem; margin: 0 0 8px; }
.help-box ul { margin: 0; padding-left: 20px; }
.help-box li { padding: 4px 0; }

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--c-line);
  padding: 22px 20px 36px;
  text-align: center;
  color: var(--c-muted);
  font-size: .92rem;
  background: rgba(255,255,255,.5);
}
.site-footer p { margin: 4px 0; }

/* ========== Logo fallback ========== */
.logo-fallback {
  width: 100%; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-bg-2), #fff);
  border: 1px dashed var(--c-line-2);
  border-radius: var(--r-md);
  color: var(--c-muted);
  font-weight: 700;
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ========== Tema escuro (opcional, se sistema preferir) ========== */
@media (prefers-color-scheme: dark) {
  /* Mantemos tema claro por padrão (mais legível para idosos),
     mas suavizamos brilho. */
  :root {
    --c-bg: #f0ece0;
  }
}
