/* ===========================================================
   Celestino — The Voice of Truth
   =========================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #f7f9fa;
  min-height: 100vh;
  background: #062c64 url('/front2/assents/Fog - Back 02.png') center top / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

p { margin: 0; }

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* ----------- Steps (quiz) ----------- */
.step {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: stepIn 0.4s ease-out both;
}

.step.is-active { display: flex; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------- Header / logo ----------- */

.header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.header-logo {
  display: block;
  height: 100px;
  width: auto;
}

@media (min-width: 640px) {
  .header-logo { height: 130px; }
}

/* ----------- Títulos ----------- */

.title {
  text-align: center;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  color: #ff80ab;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .title { font-size: 32px; }
}

.subtitle {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #ff80ab;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .subtitle { font-size: 20px; }
}

/* ----------- Pílula de status ----------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px dashed #e91e63;
  color: #e91e63;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease, border-style 0.3s ease;
  backdrop-filter: blur(4px);
}

.status-pill.is-complete {
  background: #fff;
  border-style: solid;
}

/* ----------- Linha das cartas ----------- */

.cards-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  perspective: 1200px;
  padding: 8px 0;
}

.card {
  width: 78px;
  aspect-ratio: 1 / 1.65;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease;
}

@media (min-width: 480px) {
  .card { width: 88px; }
}

@media (min-width: 640px) {
  .cards-row {
    flex-wrap: nowrap;
    gap: 12px;
  }
  .card {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 96px;
  }
}

.card.is-picked,
.card.is-inactive { cursor: default; }

.card.is-inactive {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
}

.card.is-flipped .card-inner { transform: rotateY(180deg); }

.card:not(.is-flipped):not(.is-inactive):hover .card-inner {
  transform: translateY(-6px);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.card-back,
.card-front {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.card-back {
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back img,
.card-back svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.card-front {
  transform: rotateY(180deg);
  background: #f5edd8;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ----------- Painel de mensagem (após 3 cartas) ----------- */

.message-panel {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #e91e63;
  border-radius: 14px;
  padding: 22px 22px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  animation: panelIn 0.6s ease-out both;
}

.message-panel.is-visible { display: flex; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.warn-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e91e63;
}

.message-panel h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: #e91e63;
  font-weight: 800;
}

.message-panel p {
  font-size: 14px;
  color: #333;
  line-height: 1.55;
}

.message-panel strong { color: #e91e63; }

/* ----------- CTA ----------- */

.cta-wrap {
  width: 100%;
  max-width: 460px;
  display: none;
  justify-content: center;
}

.cta-wrap.is-visible { display: flex; }

.cta-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 22px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(180deg, #ff4081, #e91e63);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(233, 30, 99, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(233, 30, 99, 0.55);
  outline: none;
}

.cta-button:active { transform: translateY(0); }

.cta-button.pulse { animation: ctaPulse 2s ease-in-out infinite; }

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(233, 30, 99, 0.45), 0 0 0 0 rgba(233, 30, 99, 0.5); }
  50%      { box-shadow: 0 8px 22px rgba(233, 30, 99, 0.45), 0 0 0 14px rgba(233, 30, 99, 0); }
}

/* ----------- Vídeo (página 2 e 3) ----------- */

.video-wrap {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a2a;
  border: 1px solid rgba(233, 30, 99, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.video-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(233, 30, 99, 0.25), transparent 60%);
}

.video-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #e91e63;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
}

/* ----------- Bloco "post-video" (revela cartas) ----------- */

.post-video {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-video.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ----------- Sparkles ----------- */

.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  animation: sparkOut var(--dur, 0.9s) ease forwards var(--delay, 0s);
}

@keyframes sparkOut {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(0); }
}

/* ----------- Footer ----------- */

.footer {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}
