/*
 * Mariella Tarot — Quiz-LP
 * Mobile-first. Der gesamte Traffic kommt aus Meta/Native, also wird das
 * Desktop-Layout nur als Zentrierung nachgereicht, nicht eigens entworfen.
 */

:root {
  --bg: #150e26;
  --bg-soft: #1e1435;
  --panel: #241a3f;
  --border: #3a2b5e;
  --gold: #e8c37a;
  --gold-soft: #f3ddb0;
  --text: #f2ecff;
  --muted: #b3a4cf;
  --accent: #7b4fd1;
  --ok: #4ec98a;
  --err: #ff8b8b;
  --radius: 14px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  /* Sternenfeld: zwei radiale Gradients statt Bild-Asset — spart einen
     Request auf einer Seite, die auf Mobilfunk geladen wird. */
  background-image:
    radial-gradient(1px 1px at 20% 15%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 75% 8%, rgba(255,255,255,.25), transparent),
    radial-gradient(1.5px 1.5px at 45% 30%, rgba(232,195,122,.30), transparent),
    radial-gradient(1px 1px at 88% 42%, rgba(255,255,255,.22), transparent),
    radial-gradient(1px 1px at 12% 60%, rgba(255,255,255,.18), transparent);
  background-attachment: fixed;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 56px;
}

/* ---------- Kopf ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 18px;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .3px;
  color: var(--gold-soft);
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Fortschritt ---------- */

.progress {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 99px;
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Slides ---------- */

.slide { display: none; animation: rise .45s ease both; }
.slide.is-active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

h1 {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--gold-soft);
}

h2 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--text);
}

p { font-size: 16px; line-height: 1.6; margin: 0 0 14px; color: var(--text); }
p.muted { color: var(--muted); font-size: 14px; }
em.gold { color: var(--gold); font-style: normal; font-weight: 600; }

.note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 20px;
}

.note strong { color: var(--gold-soft); }
.note p:last-child { margin-bottom: 0; }

/* ---------- Karten ---------- */

.deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 8px;
}

.card {
  /* Seitenverhaeltnis der Kartenbilder. Ohne festes Ratio springt das
     Layout beim Nachladen der webp-Datei. */
  aspect-ratio: 100 / 171;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel) center/cover no-repeat;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card:active { transform: scale(.97); }

.card.is-picked {
  box-shadow: 0 0 0 2px var(--gold), 0 8px 26px rgba(232,195,122,.28);
  transform: translateY(-4px);
}

@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.45); }
}

.card-hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}

/* Aufgedeckte Einzelkarte */
.reveal { text-align: center; }

.reveal-card {
  width: 168px;
  margin: 6px auto 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gold);
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  animation: flip .6s ease both;
}

.reveal-card img { width: 100%; display: block; }

@keyframes flip {
  from { transform: rotateY(90deg) scale(.9); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.reveal-name {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--gold);
  margin: 0 0 6px;
}

.reveal-meaning { color: var(--muted); font-size: 15px; margin-bottom: 20px; }

/* ---------- Auswahl / Buttons ---------- */

.options { display: grid; gap: 10px; margin-bottom: 18px; }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 15px 16px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.opt:active { transform: scale(.985); }
.opt.is-picked, .opt:focus-visible { border-color: var(--gold); background: #2c2050; outline: none; }
.opt-emoji { font-size: 21px; line-height: 1; flex: none; }

.btn {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #8d5ce4, #6a3fc0);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 17px 18px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(123,79,209,.35);
  transition: transform .12s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-gold { background: linear-gradient(180deg, #f0cd8b, #d8ab5c); color: #2a1c06; box-shadow: 0 8px 22px rgba(232,195,122,.32); }

/* ---------- Felder ---------- */

.field { margin-bottom: 16px; }

label.lbl { display: block; font-size: 14px; color: var(--muted); margin-bottom: 7px; }

input[type=text], input[type=email], select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 15px 14px;
  /* 16px verhindert den Auto-Zoom von iOS Safari beim Fokus. */
  font-size: 16px;
  font-family: inherit;
  appearance: none;
}

input:focus, select:focus { outline: none; border-color: var(--gold); }
input::placeholder { color: #7f6fa3; }

.row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }

.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 4px 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.consent input { width: 21px; height: 21px; flex: none; margin-top: 1px; accent-color: var(--gold); }
.consent a { color: var(--gold-soft); }

.err { color: var(--err); font-size: 14px; margin: -6px 0 12px; display: none; }
.err.is-on { display: block; }

.trust { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ---------- Spinner ---------- */

.spinner {
  width: 34px; height: 34px;
  margin: 22px auto;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fuss ---------- */

.foot {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.foot a { color: var(--muted); margin: 0 7px; }

@media (min-width: 620px) {
  .wrap { padding-top: 34px; }
  h1 { font-size: 31px; }
}

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