@import url('/styles/vela.css');

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100svh;
  background:
    radial-gradient(900px 500px at 50% -120px, rgba(216, 190, 132, 0.2), transparent 65%),
    var(--surface-canvas);
}

.app-column {
  width: min(100vw, var(--app-max));
  max-width: var(--app-max);
  min-width: 0;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-strong);
}

.content {
  padding: 28px 26px 0;
  max-width: 100%;
}

.title {
  font-size: 38px;
  margin-top: 12px;
  line-height: 1.05;
}

.body-copy {
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--font-label);
  font-size: var(--caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
}

.field input {
  width: 100%;
  height: var(--control-h-md);
  padding: 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-strong);
  box-shadow: var(--shadow-xs);
  outline: none;
}

.field input:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 4px rgba(130, 115, 190, 0.14);
}

.privacy {
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--sage-200);
  border-radius: var(--radius-md);
  color: var(--sage-600);
  font-size: 13px;
  line-height: 1.5;
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  padding: 14px 24px 28px;
  border-top: 1px solid var(--border-hairline);
  background: var(--glass-light);
  backdrop-filter: blur(12px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--control-h-lg);
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-600);
  background: var(--gradient-gold);
  color: var(--ink-900);
  font-weight: var(--weight-semibold);
  font-size: var(--body-lg);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.back {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 18px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--cream-300);
}

.dot.active {
  width: 22px;
  background: var(--gold-500);
}

.ritual {
  min-height: 100svh;
  background: var(--gradient-night);
  color: var(--text-on-dark-body);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.ritual:before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/starfield.svg');
  background-size: 420px;
  opacity: 0.5;
}

.ritual > * {
  position: relative;
}

.ritual .app-column {
  overflow-x: hidden;
}

.ritual .content {
  padding-top: 18px;
}

.ritual .title {
  font-size: 34px;
  max-width: 330px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.ritual .body-copy {
  font-size: 15px;
  line-height: 1.45;
  max-width: 330px;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
}

.deck-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 48px);
  margin: 8px auto 14px;
  color: var(--text-on-dark-muted);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.deck-meta span {
  min-width: 0;
  white-space: nowrap;
}

.deck-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-meta span:last-child {
  flex: 0 0 auto;
}

.deck-stage {
  width: 100%;
  margin: 0 auto 12px;
  position: relative;
  overflow: hidden;
  perspective: 900px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.deck-stage:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(540px, 110vw);
  height: 220px;
  border: 1px solid rgba(216, 190, 132, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -45%);
  box-shadow: inset 0 0 42px rgba(216, 190, 132, 0.08);
  pointer-events: none;
}

.deck-ribbon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  min-height: 172px;
  padding: 42px 22px 46px;
  overflow: visible;
  will-change: transform;
  animation: deckOrbit 56s linear infinite;
}

.deck-lane {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.deck-lane + .deck-lane {
  margin-left: -17px;
}

.deck-ribbon.is-paused {
  animation-play-state: paused;
}

.deck-card {
  flex: 0 0 clamp(48px, 12vw, 58px);
  height: clamp(78px, 18.5vw, 94px);
  border: 1px solid rgba(216, 190, 132, 0.32);
  border-radius: 7px;
  background: url('/assets/card-back.svg') center/cover;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transform: translateY(var(--curve-y)) rotate(var(--curve-rot));
  transform-origin: 50% 145%;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  animation: deckFloat 5.8s ease-in-out var(--float-delay) infinite;
}

.deck-card + .deck-card {
  margin-left: -17px;
}

.deck-card:hover {
  animation-play-state: paused;
  z-index: 8;
  transform: translateY(calc(var(--curve-y) - 18px)) rotate(var(--curve-rot)) scale(1.18);
  border-color: var(--gold-300);
  box-shadow: 0 0 0 2px rgba(242, 211, 144, 0.36), 0 20px 42px rgba(0, 0, 0, 0.42), var(--glow-gold);
  filter: saturate(1.12) brightness(1.08);
}

.deck-card.selected {
  animation-play-state: paused;
  z-index: 9;
  transform: translateY(calc(var(--curve-y) - 20px)) rotate(var(--curve-rot)) scale(1.2);
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px rgba(242, 211, 144, 0.44), 0 22px 44px rgba(0, 0, 0, 0.46), var(--glow-gold);
}

@keyframes deckFloat {
  0%,
  100% {
    transform: translateY(var(--curve-y)) rotate(var(--curve-rot));
  }

  50% {
    transform: translateY(calc(var(--curve-y) - 9px)) rotate(var(--float-rot));
  }
}

@keyframes deckOrbit {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck-ribbon,
  .deck-card {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

.revealed-card {
  width: min(210px, 58vw);
  aspect-ratio: 825 / 1429;
  border-radius: 10px;
  background: rgba(14, 10, 28, 0.72);
  border: 1px solid rgba(216, 190, 132, 0.58);
  box-shadow: var(--shadow-xl);
  color: var(--cream-50);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px;
  font-family: var(--font-display);
  font-size: 28px;
  overflow: hidden;
}

.authentic-card {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(21, 15, 38, 0.24);
}

.authentic-card.reversed {
  transform: rotate(180deg);
}

.locked-card,
.report-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--gradient-night);
  border: 1px solid var(--border-on-dark);
  color: var(--text-on-dark-body);
  box-shadow: var(--shadow-lg);
}

.blur {
  filter: blur(4.5px);
  user-select: none;
}

.error {
  color: var(--danger);
  margin-top: 14px;
  font-size: 14px;
}

.center {
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.stat-label {
  font-size: 11px;
  color: var(--text-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.stat-value {
  margin-top: 4px;
  font-weight: 600;
  color: var(--text-strong);
}
