/* ── TAROT CARDS ── */
/* ── Tarot Card — Core Component ── */
.tarot-card {
  width: 160px;
  aspect-ratio: 2/3;
  perspective: 1200px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tarot-card:not(.flipped):hover {
  transform: translateY(-8px);
}

.tarot-card:not(.flipped):active {
  transform: translateY(-3px) scale(0.97);
}

.tarot-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, var(--opacity-subtle));
  outline-offset: 6px;
}

.tarot-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.tarot-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* slight rounding so it reads as a card, not a block; clips the dither too */
  border-radius: 7px;
  overflow: hidden;
}

/* ── Card Back — dithered texture behind a quiet mark ── */
.tarot-card-back {
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  /* dark wash over the dithered pattern: refined texture, mark stays legible */
  background:
    linear-gradient(rgba(4, 4, 4, 0.62), rgba(4, 4, 4, 0.62)),
    url('../Assets/dithered-image-2026-07-23T05-50-05.webp') center / cover no-repeat,
    #050505;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* single border only: the inner hairline frame read as clutter on cards */

.tarot-card-back::after {
  content: '\2737';
  font-size: var(--font-size-xl);
  line-height: 1;
  color: rgba(255, 255, 255, var(--opacity-dim));
}

.tarot-card:not(.flipped):hover .tarot-card-back {
  border-color: rgba(255, 255, 255, var(--opacity-muted));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(255, 255, 255, var(--opacity-ghost));
}

/* ── Card Front — Actual tarot card face ── */
.tarot-card-front {
  background: #0a0908;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  transform: rotateY(180deg);
  padding: 0;
  overflow: hidden;
}

/* single border only (inner frame removed) */

/* Subtle texture gradient */
.tarot-card-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(255, 255, 255, var(--opacity-faint)) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(255, 255, 255, var(--opacity-ghost)) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 3;
}

.tarot-card-numeral {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  letter-spacing: var(--letter-spacing-display);
  font-weight: var(--font-light);
  z-index: 4;
}

.tarot-card-name {
  position: relative;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-regular);
  color: rgba(255, 255, 255, var(--opacity-primary));
  letter-spacing: var(--letter-spacing-wide);
  text-align: center;
  line-height: 1.3;
  padding: 0 12px;
  z-index: 4;
}

.tarot-card-meaning {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-style: italic;
  line-height: 1.5;
  padding: 0 14px;
  letter-spacing: var(--letter-spacing-body);
  z-index: 4;
}

/* ── THE READING — Spread overview (3 cards clickable) ── */
/* ── SPREAD — Hero card with dimmed sides ── */
.tarot-spread-modal {
  max-width: 100% !important;
  width: 100% !important;
  height: 100%;
  padding: 0;
  border: none !important;
  background: #050505 !important;
}

.tarot-spread-stage {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: var(--spacing-3xl) 0;
}

.tarot-spread-label {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-quiet));
  font-weight: var(--font-regular);
  position: absolute;
  top: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
}

.tarot-spread-cards {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--spacing-2xl);
  margin: auto 0;
}

.tarot-spread-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  /* No transform transition: the no-WebGL tilt fallback tweens transform with GSAP */
}

/* Position eyebrow above each card — PAST · PRESENT · FUTURE */
.tarot-spread-pos-top {
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-subtle));
  margin-bottom: var(--spacing-md);
  transition: color 0.4s ease;
}
.spread-hero .tarot-spread-pos-top {
  color: rgba(255, 255, 255, var(--opacity-secondary));
}

/* A legible triptych — sides recede but stay readable, not buried ghosts */
.tarot-spread-item.spread-side {
  opacity: 0.6;
  z-index: 1;
}
.tarot-spread-item.spread-side:hover {
  opacity: 0.85;
}
.tarot-spread-item.spread-hero {
  opacity: 1;
  z-index: 2;
}

/* Equal card sizes — hero reads through opacity/border/name, not scale,
   so all three tops AND captions sit on the same grid lines */
.tarot-spread-card-img {
  width: 232px;
  aspect-ratio: 2/3;
  overflow: hidden;
  position: relative;
  background: #0a0908;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  transition:
    border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.spread-hero .tarot-spread-card-img {
  border-color: rgba(255, 255, 255, var(--opacity-subtle));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.tarot-spread-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tarot-spread-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.spread-hero .tarot-spread-overlay {
  opacity: 0;
}

/* Caption below every card — bare tracked text, archive voice */
.tarot-spread-card-text {
  text-align: center;
  margin-top: var(--spacing-md);
}

.tarot-spread-card-name {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, var(--opacity-secondary));
  font-weight: var(--font-regular);
  letter-spacing: var(--letter-spacing);
  margin-bottom: 4px;
  transition: color 0.4s ease;
}
.spread-hero .tarot-spread-card-name {
  /* same size as the sides — three names on one baseline; hero reads
     through brightness, not scale */
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.tarot-spread-card-num {
  font-size: var(--font-size-2xs);
  color: rgba(255, 255, 255, var(--opacity-subtle));
  letter-spacing: var(--letter-spacing-label);
  font-variant-numeric: tabular-nums;
}

/* Navigation dots */
.tarot-spread-dots {
  display: flex;
  gap: 8px;
  margin-top: var(--spacing-xl);
}

.tarot-spread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, var(--opacity-border));
  cursor: pointer;
  transition: background 0.3s ease;
}
.tarot-spread-dot.active {
  background: rgba(255, 255, 255, var(--opacity-tertiary));
}
.tarot-spread-dot:hover {
  background: rgba(255, 255, 255, var(--opacity-subtle));
}

.tarot-spread-hint {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  text-align: center;
  margin: var(--spacing-lg) 0 auto;
  font-weight: var(--font-regular);
}

/* Mobile spread */

/* ── THE READING — Asymmetric editorial split ── */
.tarot-reading-fullview {
  max-width: 100% !important;
  width: 100% !important;
  height: 100%;
  padding: 0;
  border: none !important;
  background: #050505 !important;
}

.tarot-reading-fullview .quiz-close {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 20;
}

/* Split container */
.tarot-reading-split {
  display: grid;
  grid-template-columns: 55% 1fr;
  /* Pin the row to the container so the right column scrolls instead of growing */
  grid-template-rows: 100%;
  height: 100%;
  width: 100%;
}

/* Left panel: backdrop image with overlaid card name */
.tarot-reading-left {
  position: relative;
  overflow: hidden;
  background: #000;
  animation: readingSlideLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes readingSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tarot-reading-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  opacity: 0.45;
}

.tarot-reading-left-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 5, 5, 0.95) 0%,
    rgba(5, 5, 5, 0.4) 40%,
    transparent 70%
  );
  z-index: 1;
}

.tarot-reading-left-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-2xl) var(--spacing-xl);
  z-index: 2;
}

.tarot-reading-cardname {
  font-family: var(--font-family);
  font-size: clamp(var(--font-size-2xl), 3.5vw, var(--font-size-3xl));
  font-weight: var(--font-regular);
  color: #fff;
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1.1;
  margin-bottom: var(--spacing-sm);
}

.tarot-reading-pos {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-quiet));
  font-weight: var(--font-regular);
}

/* Right panel: scrollable text column */
.tarot-reading-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  animation: readingSlideRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

@keyframes readingSlideRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tarot-reading-right-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--spacing-2xl) var(--spacing-xl) var(--spacing-lg);
}

/* Meaning tagline — italic, first thing you see */
.tarot-reading-meaning {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-style: italic;
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
}

/* Tarot tags */
.tarot-reading-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--spacing-xl);
}

.tarot-tag {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-regular);
  letter-spacing: var(--letter-spacing-label);
  text-transform: lowercase;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  padding: 4px 10px;
}

/* First paragraph — synopsis-consistent style */
.tarot-reading-first-para {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-regular);
  color: rgba(255, 255, 255, var(--opacity-secondary));
  line-height: 1.7;
  letter-spacing: var(--letter-spacing);
  margin-bottom: var(--spacing-lg);
}

/* Expandable sections — consistent style */
.tarot-reading-expand {
  margin-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-faint));
}

.tarot-reading-expand-btn {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-regular);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  letter-spacing: var(--letter-spacing-nav);
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  padding: var(--spacing-sm) 0;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.tarot-reading-expand-btn::-webkit-details-marker {
  display: none;
}

.tarot-reading-expand-btn::before {
  content: '+';
  margin-right: var(--spacing-sm);
  color: rgba(255, 255, 255, var(--opacity-subtle));
}

details[open] > .tarot-reading-expand-btn::before {
  content: '\2212';
}

.tarot-reading-expand-btn:hover {
  color: rgba(255, 255, 255, var(--opacity-tertiary));
}

.tarot-reading-expand-content {
  padding: 0 0 var(--spacing-md);
}

.tarot-reading-expand-content p {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-regular);
  color: rgba(255, 255, 255, var(--opacity-secondary));
  line-height: 1.7;
  letter-spacing: var(--letter-spacing);
  margin-bottom: var(--spacing-md);
}

.tarot-reading-expand-content p:last-child {
  margin-bottom: 0;
}

/* Film block inside expandable */
.tarot-reading-film-inner {
  padding: 0;
}

/* Nav bar (pinned to bottom of right panel) */
.tarot-reading-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-faint));
  flex-shrink: 0;
}

.tarot-nav-btn {
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  font-weight: var(--font-regular);
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  background: transparent;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  padding: 10px 20px;
  min-height: 44px; /* tap target */
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
  white-space: nowrap;
}

.tarot-nav-btn:hover {
  border-color: rgba(255, 255, 255, var(--opacity-muted));
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.tarot-reading-dots {
  display: flex;
  gap: 8px;
}

.tarot-rdot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, var(--opacity-muted));
  cursor: pointer;
  transition: background var(--transition);
}

.tarot-rdot.active {
  background: rgba(255, 255, 255, var(--opacity-tertiary));
}

.tarot-rdot:hover {
  background: rgba(255, 255, 255, var(--opacity-quiet));
}

/* ── Mobile: reading split stacks vertically ── */

/* Tarot card summary (single card reveal) */
.tarot-card-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--spacing-lg);
}

.tarot-card-summary .tarot-card-numeral {
  position: static;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  letter-spacing: var(--letter-spacing-display);
  font-weight: var(--font-light);
}

.tarot-card-meaning-inline {
  font-family: var(--font-family);
  font-style: italic;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing);
}

/* ── Tarot Picker (3-card draw carousel) ── */

/* ── The Void: 3D card selection ── */
.tarot-void-modal {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tarot-void-head {
  text-align: center;
  padding-top: var(--spacing-2xl);
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.tarot-void-prompt {
  margin-bottom: 0;
  font-size: var(--font-size-md);
}

.tarot-void-stage {
  flex: 1;
  position: relative;
  perspective: 1000px;
  perspective-origin: 50% 42%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  min-height: 0;
  user-select: none;
  -webkit-user-select: none;
}

.tarot-void-stage.dragging {
  cursor: grabbing;
}

.tarot-void-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.tarot-void-world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* Card back — bare near-black, one hairline inset frame, one quiet mark. No imagery. */
.tarot-void-card,
.tarot-void-fly {
  background: #050505;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.tarot-void-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 124px;
  aspect-ratio: 2 / 3;
  cursor: pointer;
  opacity: 0;
  will-change: transform, opacity;
}

.tarot-void-fly {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  will-change: transform;
}

/* single border only (inner frame removed) */

.tarot-void-card::after,
.tarot-void-fly::after {
  content: '\2737';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* fly clone scales its mark to the card's projected size via --fly-star (set inline at pick) */
  font-size: var(--fly-star, var(--font-size-lg));
  line-height: 1;
  color: rgba(255, 255, 255, var(--opacity-dim));
  pointer-events: none;
}

.tarot-void-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 130% 100% at 50% 40%,
    transparent 52%,
    rgba(0, 0, 0, 0.65) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.tarot-void-stars.near {
  animation: voidTwinkle 9s ease-in-out infinite alternate;
}

.tarot-void-stars.far {
  animation: voidTwinkle 14s ease-in-out infinite alternate-reverse;
}

@keyframes voidTwinkle {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.55;
  }
}

.tarot-void-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0 calc(var(--spacing-lg) + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.tarot-void-step {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.tarot-void-step-marker {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, var(--opacity-subtle));
  transition:
    background var(--transition-slow),
    border-color var(--transition-slow);
}

.tarot-void-step.current .tarot-void-step-marker {
  border-color: rgba(255, 255, 255, var(--opacity-primary));
}

.tarot-void-step.done .tarot-void-step-marker {
  background: rgba(255, 255, 255, var(--opacity-primary));
  border-color: rgba(255, 255, 255, var(--opacity-primary));
}

.tarot-void-step-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  transition: color var(--transition-slow);
}

.tarot-void-step.current .tarot-void-step-label {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.tarot-void-step.done .tarot-void-step-label {
  color: rgba(255, 255, 255, var(--opacity-tertiary));
}

.tarot-void-step-line {
  width: 56px;
  height: 1px;
  background: rgba(255, 255, 255, var(--opacity-border));
  position: relative;
  overflow: hidden;
}

.tarot-void-step-line i {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, var(--opacity-tertiary));
  transform: scaleX(0);
  transform-origin: left center;
}

.tarot-void-cue {
  text-align: center;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  letter-spacing: var(--letter-spacing-body);
  padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.tarot-picker-prompt {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-weight: var(--font-regular);
  letter-spacing: var(--letter-spacing);
  margin-bottom: var(--spacing-xl);
}

.tarot-picker-prompt em {
  font-style: normal;
  color: rgba(255, 255, 255, var(--opacity-primary));
}

/* ── Picker cards ── */

/* Card back image */

/* Subtle sheen + inner frame */

/* Chosen indicator */

/* ── Depth scale — cinematic depth of field ── */

/* ── Chosen state ── */

/* Bottom UI */

.tarot-reading-film-title {
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, var(--opacity-primary));
  font-weight: var(--font-regular);
  letter-spacing: var(--letter-spacing);
  cursor: pointer;
  transition: opacity var(--transition);
  margin-bottom: 6px;
}

.tarot-reading-film-title:hover {
  opacity: 0.55;
}

.tarot-reading-film-meta {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  letter-spacing: var(--letter-spacing);
  margin-bottom: 4px;
}

.tarot-reading-film-vibe {
  font-family: var(--font-family);
  font-size: var(--font-size-base); /* vibe tier: one size everywhere — matches body */
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-style: italic;
  letter-spacing: var(--letter-spacing);
}

/* ── Tarot Ring Phase ── */

@keyframes tarot-cue-pulse {
  0%,
  100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ── Mobile picker ── */

/* ── Mobile styles for new modes ── */

/* End of quiz styles */
