/* Quem Decifra — Premium Noir, mobile-first */
:root {
  --bg: #050805;
  --bg-card: #101510;
  --bg-elevated: #151a15;
  --gold: #d6b25e;
  --gold-dim: #a88b3f;
  --green: #19c37d;
  --text: #f5f2e8;
  --text-muted: #b7b2a0;
  --border: rgba(214, 178, 94, 0.25);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font-serif: "Cinzel", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site-body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
body.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(25, 195, 125, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(214, 178, 94, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}
.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 5, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
}
.brand-logo { border-radius: 50%; object-fit: cover; }
.brand-a { letter-spacing: 0.05em; }
.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 180px;
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: flex; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); }
.nav-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}
.nav-user { color: var(--green); font-size: 0.85rem; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 1.25rem;
  }
}

.site-main { padding: 0 1rem 3rem; max-width: 1100px; margin: 0 auto; }
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--gold); }

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}
.hero__logo {
  width: min(200px, 70vw);
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 0 24px rgba(214, 178, 94, 0.2));
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}
.hero .lead { color: var(--text-muted); max-width: 36rem; margin: 0 auto 1.5rem; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.chip {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold);
  background: rgba(214, 178, 94, 0.06);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1408;
}
.btn--green {
  background: var(--green);
  color: #041a10;
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Sections */
.section { padding: 2.5rem 0; }
.section__title {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.section--alt { background: var(--bg-card); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: var(--radius); }

/* Cards grid */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card__cover {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  background: var(--bg-elevated);
}
.card__body { padding: 1rem; }
.card__title {
  font-family: var(--font-serif);
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}
.card__meta { font-size: 0.85rem; color: var(--text-muted); }
.card__price { color: var(--green); font-weight: 700; margin-top: 0.5rem; }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(25, 195, 125, 0.12);
  color: var(--green);
  margin-right: 0.25rem;
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
}
.faq summary { cursor: pointer; color: var(--gold); font-weight: 600; }

/* Bundle */
.bundle {
  text-align: center;
  padding: 2rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(214, 178, 94, 0.08), transparent);
}
.bundle__price { font-size: 2rem; color: var(--green); font-weight: 700; }
.bundle__save { color: var(--gold); font-size: 0.9rem; }

/* Forms */
.form { max-width: 400px; margin: 0 auto; }
.form-group { margin-bottom: 1rem; }
.form label { display: block; margin-bottom: 0.35rem; color: var(--text-muted); font-size: 0.9rem; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
}
.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.alert--error { background: rgba(220, 60, 60, 0.15); border: 1px solid #c44; color: #faa; }
.alert--success { background: rgba(25, 195, 125, 0.15); border: 1px solid var(--green); color: var(--green); }

/* Investigate */
.investigate-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.room-code {
  font-family: monospace;
  font-size: 1.25rem;
  color: var(--green);
  letter-spacing: 0.15em;
}
.participants-list { list-style: none; padding: 0; }
.participants-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.participants-list .done { color: var(--green); }

.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.3s;
}

.doc-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin: 1rem 0;
}
.doc-thumb {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.doc-thumb:hover { border-color: var(--gold); }

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  overflow: hidden;
}
.doc-card__header {
  padding: 0.75rem 1rem;
  background: rgba(214, 178, 94, 0.08);
  border-bottom: 1px solid var(--border);
}
.doc-card__header h3 { margin: 0; font-size: 1rem; color: var(--gold); }
.doc-card__body { padding: 1rem; }
.doc-email { border-left: 3px solid var(--gold); padding-left: 1rem; }
.doc-email__meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.doc-audio { width: 100%; margin-bottom: 0.5rem; }
.doc-pdf__frame { width: 100%; min-height: 280px; border: none; margin-top: 0.5rem; border-radius: 8px; }
.doc-img { max-width: 100%; border-radius: 8px; }
.doc-chat .chat-bubble {
  background: var(--bg-elevated);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  max-width: 90%;
}
.doc-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.doc-table th, .doc-table td { border: 1px solid var(--border); padding: 0.4rem; }

.puzzle-box {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.puzzle-visual {
  text-align: center;
  padding: 2rem 1rem;
  margin: 1rem 0;
  background: var(--bg);
  border-radius: 12px;
  border: 1px dashed var(--border);
}
.puzzle-visual--large .puzzle-visual__text {
  font-size: clamp(2rem, 10vw, 4rem);
  font-family: var(--font-serif);
  color: var(--gold);
  letter-spacing: 0.1em;
}
.puzzle-visual--mirror .puzzle-visual__text { transform: scaleX(-1); display: inline-block; }

.answer-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.15rem;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  margin: 0.75rem 0;
}
.feedback {
  padding: 0.75rem;
  border-radius: 10px;
  margin-top: 0.5rem;
  animation: fadeIn 0.3s;
}
.feedback--ok { background: rgba(25, 195, 125, 0.15); color: var(--green); }
.feedback--err { background: rgba(200, 80, 80, 0.12); color: #f0a0a0; }
.feedback--hint { background: rgba(214, 178, 94, 0.12); color: var(--gold); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fragments {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.fragment {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  border: 2px solid var(--gold);
  border-radius: 8px;
  color: var(--gold);
}
.fragment--empty { opacity: 0.3; border-style: dashed; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  padding: 1rem;
  overflow-y: auto;
}
.modal.is-open { display: flex; align-items: flex-start; justify-content: center; }
.modal__inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  margin: 2rem auto;
  padding: 1rem;
  position: relative;
}
.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

.suspect-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.suspect-card__img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; float: left; margin-right: 1rem; }

.locked-block {
  opacity: 0.6;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

/* Checkout Mercado Pago Brick */
.checkout-card .payment-brick-wrap {
  margin-top: 1rem;
  min-height: 320px;
}
#paymentBrick_container {
  min-height: 300px;
}
.checkout-pending {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

/* Page title */
.page-title {
  font-family: var(--font-serif);
  color: var(--gold);
  margin: 1.5rem 0 0.5rem;
}
