/* =========================================================
   ORÁCULO DA ALMA — identidade visual
   Navy cósmico · ouro gravado · nebulosa violeta · creme
   ========================================================= */

:root {
  --navy-900: #080f24;
  --navy-800: #0c1530;
  --navy-700: #121d40;
  --navy-600: #1a2752;
  --violet:   #4a3a6b;
  --violet-2: #6b4e8e;
  --gold:     #c9a24b;
  --gold-2:   #e0c478;
  --gold-soft: rgba(201, 162, 75, 0.18);
  --cream:    #f1e9d6;
  --cream-dim: #cfc6b2;
  --danger:   #e2796b;
  --ok:       #8fd0a8;

  --radius: 14px;
  --maxw: 560px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Spectral', Georgia, serif;
  color: var(--cream);
  background:
    radial-gradient(900px 600px at 20% -10%, rgba(107, 78, 142, 0.35), transparent 60%),
    radial-gradient(800px 600px at 90% 10%, rgba(74, 58, 107, 0.30), transparent 55%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800) 60%, #060b1c);
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Céu estrelado ambiente */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Tipografia ---------- */
.brand-name {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 600;
}
h1, h2, h3 { font-family: 'Cinzel', serif; font-weight: 600; letter-spacing: 0.06em; color: var(--cream); }
h1 { font-size: 1.7rem; line-height: 1.25; }
h2 { font-size: 1.25rem; margin-bottom: 4px; }
.slogan { font-style: italic; color: var(--gold-2); letter-spacing: 0.04em; }
.muted { color: var(--cream-dim); font-size: 0.95rem; }

/* ---------- Emblema ---------- */
.emblem {
  width: 132px; height: 132px;
  margin: 8px auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  background:
    radial-gradient(circle at 50% 38%, rgba(107,78,142,0.5), rgba(12,21,48,0.9) 70%);
  box-shadow: 0 0 0 6px rgba(201,162,75,0.08), inset 0 0 30px rgba(107,78,142,0.5);
  position: relative;
}
.emblem::after {
  content: ""; position: absolute; inset: 8px;
  border-radius: 50%; border: 1px solid rgba(201,162,75,0.35);
}
.emblem svg { width: 78px; height: 78px; }
@media (prefers-reduced-motion: no-preference) {
  .emblem { animation: glow 6s ease-in-out infinite; }
  @keyframes glow {
    0%,100% { box-shadow: 0 0 0 6px rgba(201,162,75,0.06), inset 0 0 30px rgba(107,78,142,0.45); }
    50%     { box-shadow: 0 0 0 9px rgba(201,162,75,0.12), inset 0 0 42px rgba(107,78,142,0.65); }
  }
}

/* ---------- Cabeçalho ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 12px;
}
.topbar .brand-name { font-size: 0.95rem; }
.topbar .mini-emblem {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--gold); display: grid; place-items: center;
  background: radial-gradient(circle, rgba(107,78,142,0.5), rgba(12,21,48,0.9));
}
.topbar .mini-emblem svg { width: 20px; height: 20px; }

/* ---------- Cartões ---------- */
.card {
  background: linear-gradient(180deg, rgba(26,39,82,0.55), rgba(12,21,48,0.55));
  border: 1px solid rgba(201,162,75,0.22);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.card + .card { margin-top: 16px; }

.hero { text-align: center; }
.hero h1 { margin: 6px 0 10px; }
.hero .slogan { font-size: 1.05rem; }

/* ---------- Grid de consultas ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.tile {
  text-align: left; cursor: pointer;
  border: 1px solid rgba(201,162,75,0.25);
  border-radius: var(--radius);
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(74,58,107,0.30), rgba(12,21,48,0.5));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  outline: none;
}
.tile .ico { font-size: 1.5rem; }
.tile h3 { font-size: 0.98rem; margin: 8px 0 4px; letter-spacing: 0.04em; }
.tile p { font-size: 0.82rem; color: var(--cream-dim); }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

/* ---------- Formulários ---------- */
.field { margin-bottom: 14px; }
label { display: block; font-size: 0.82rem; letter-spacing: 0.05em; color: var(--gold-2); margin-bottom: 6px; text-transform: uppercase; }
input, select {
  width: 100%; padding: 12px 14px;
  background: rgba(8,15,36,0.7);
  border: 1px solid rgba(201,162,75,0.3);
  border-radius: 10px;
  color: var(--cream); font-family: inherit; font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 18px; cursor: pointer;
  font-family: 'Cinzel', serif; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.88rem; border-radius: 10px; border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #2a1f08; font-weight: 600;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent; color: var(--gold-2);
}
.btn.ghost:hover { background: var(--gold-soft); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; margin-top: 8px; }

.linkish { background: none; border: none; color: var(--gold-2); cursor: pointer; font-family: inherit; font-size: 0.92rem; text-decoration: underline; padding: 0; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 22px; }

/* ---------- Mensagens ---------- */
.alert { border-radius: 10px; padding: 11px 14px; font-size: 0.92rem; margin-bottom: 14px; }
.alert.err { background: rgba(226,121,107,0.14); border: 1px solid rgba(226,121,107,0.5); color: #f0b6ac; }
.alert.ok  { background: rgba(143,208,168,0.12); border: 1px solid rgba(143,208,168,0.45); color: #b8e6c9; }

/* ---------- Pagamento ---------- */
.price { font-family: 'Cinzel', serif; font-size: 2rem; color: var(--gold-2); text-align: center; letter-spacing: 0.04em; }
.qr {
  width: 200px; height: 200px; margin: 16px auto; border-radius: 12px;
  display: grid; place-items: center; text-align: center;
  background: rgba(8,15,36,0.7); border: 1px dashed rgba(201,162,75,0.5); color: var(--cream-dim);
  font-size: 0.82rem; padding: 16px;
}

/* ---------- Resultado da leitura ---------- */
.reading { white-space: pre-wrap; font-size: 1.04rem; line-height: 1.75; }
.reading-meta { font-size: 0.82rem; color: var(--cream-dim); letter-spacing: 0.05em; margin-bottom: 12px; }
.disclaimer {
  margin-top: 20px; padding: 14px; border-radius: 10px;
  background: rgba(74,58,107,0.25); border: 1px solid rgba(201,162,75,0.25);
  font-style: italic; font-size: 0.88rem; color: var(--cream-dim);
}

/* ---------- Histórico ---------- */
.hist-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid rgba(201,162,75,0.15);
}
.hist-item:last-child { border-bottom: none; }
.hist-item .tipo { font-family: 'Cinzel', serif; letter-spacing: 0.05em; font-size: 0.92rem; }
.hist-item .data { font-size: 0.8rem; color: var(--cream-dim); }
.badge { font-size: 0.72rem; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; }
.badge.done { background: rgba(143,208,168,0.18); color: #b8e6c9; border: 1px solid rgba(143,208,168,0.4); }
.badge.wait { background: rgba(201,162,75,0.16); color: var(--gold-2); border: 1px solid rgba(201,162,75,0.4); }

/* ---------- Carregando ---------- */
.spinner {
  width: 38px; height: 38px; margin: 18px auto; border-radius: 50%;
  border: 3px solid rgba(201,162,75,0.25); border-top-color: var(--gold-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.hidden { display: none !important; }
.footer-note { text-align: center; color: var(--cream-dim); font-size: 0.78rem; margin-top: auto; padding-top: 28px; }
.contact-link { color: var(--gold-2); text-decoration: none; border-bottom: 1px solid rgba(201,162,75,0.4); }
.contact-link:hover { color: var(--gold); border-bottom-color: var(--gold); }
