/* Three Cards prelander — design tokens taken from the reference mockup */

:root {
  --tc-bg: #12102B;
  --tc-surface: #1E1A45;
  --tc-surface-hover: #282350;
  --tc-accent: #E8B94A;
  --tc-accent-hover: #F0C55F;
  --tc-text: #FFFFFF;
  --tc-text-secondary: #B8B3DC;
  --tc-text-muted: #6B6890;
  --tc-font: 'Century Gothic', CenturyGothic, AppleGothic, 'URW Gothic',
              'Avenir Next', Avenir, 'Trebuchet MS', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tc-bg);
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--tc-font);
  color: var(--tc-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(120% 60% at 50% -10%, rgba(60, 52, 120, .55) 0%, rgba(18, 16, 43, 0) 70%);
}

button { font: inherit; }
a { color: var(--tc-accent); text-decoration: none; }
a:hover { color: var(--tc-accent-hover); }

/* ---------- background ---------- */

.tc-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.tc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.tc-blob-a {
  top: -22%; left: -12%; width: 90%; height: 62%;
  background: radial-gradient(circle, rgba(96, 84, 178, .5) 0%, rgba(96, 84, 178, 0) 70%);
  animation: tcDriftA 22s ease-in-out infinite;
}
.tc-blob-b {
  top: -14%; right: -18%; width: 80%; height: 56%;
  filter: blur(80px);
  background: radial-gradient(circle, rgba(58, 96, 168, .38) 0%, rgba(58, 96, 168, 0) 70%);
  animation: tcDriftB 28s ease-in-out infinite;
}
.tc-blob-c {
  bottom: -18%; left: 18%; width: 70%; height: 46%;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(232, 185, 74, .1) 0%, rgba(232, 185, 74, 0) 70%);
  animation: tcDriftA 34s ease-in-out infinite;
}

.tc-rings {
  position: absolute;
  top: -14%;
  left: 50%;
  width: min(150%, 860px);
  transform: translateX(-50%);
  opacity: .5;
  animation: tcSpin 220s linear infinite;
}

.tc-constellation {
  position: absolute;
  bottom: 6%;
  left: 0;
  width: 100%;
  height: 44%;
  opacity: .55;
}

.tc-stars {
  position: absolute;
  inset: 0;
}
.tc-stars-a {
  animation: tcTwinkleA 4.5s ease-in-out infinite;
  background-image:
    radial-gradient(1px 1px at 12% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 34% 17%, #fff, transparent),
    radial-gradient(1px 1px at 88% 30%, #fff, transparent),
    radial-gradient(1px 1px at 50% 42%, #cfc9f5, transparent),
    radial-gradient(1px 1px at 70% 60%, #b8b3dc, transparent),
    radial-gradient(1px 1px at 26% 88%, #fff, transparent);
}
.tc-stars-b {
  animation: tcTwinkleB 6.5s ease-in-out infinite;
  background-image:
    radial-gradient(1px 1px at 78% 5%, #cfc9f5, transparent),
    radial-gradient(1px 1px at 62% 22%, #b8b3dc, transparent),
    radial-gradient(1px 1px at 22% 34%, #b8b3dc, transparent),
    radial-gradient(1.5px 1.5px at 8% 55%, #fff, transparent),
    radial-gradient(1px 1px at 40% 72%, #cfc9f5, transparent),
    radial-gradient(1px 1px at 92% 78%, #fff, transparent);
}

/* ---------- layout ---------- */

.tc-app {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tc-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 56px;
  animation: tcFade 320ms ease both;
}

.tc-screen[hidden] { display: none; }

.tc-screen-center {
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 70vh;
  padding-top: 0;
}

.tc-h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.01em;
  max-width: 20ch;
}

.tc-sub {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--tc-text-secondary);
  max-width: 44ch;
}

.tc-disclaimer {
  margin: 48px 0 0;
  font-size: 11px;
  line-height: 16px;
  color: var(--tc-text-muted);
}

.tc-footer {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 24px;
  font-size: 11px;
  color: var(--tc-text-muted);
  display: flex;
  gap: 8px;
}
.tc-footer a { font-size: 11px; }

/* ---------- screen 1: topics ---------- */

.tc-topics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 32px;
}

@media (min-width: 560px) {
  .tc-topics { grid-template-columns: repeat(2, 1fr); }
}

.tc-topic-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 0 16px;
  background: var(--tc-surface);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  color: var(--tc-text);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.tc-topic-btn svg { flex: 0 0 auto; color: var(--tc-text-secondary); }
.tc-topic-btn:hover {
  background: var(--tc-surface-hover);
  box-shadow: 0 8px 26px rgba(96, 84, 178, .35);
  transform: translateY(-1px);
}
.tc-topic-btn:active {
  background: var(--tc-surface-hover);
  border-color: var(--tc-accent);
  transform: scale(.995);
}

/* ---------- screen 2: fan ---------- */

.tc-fan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
}

.tc-fan-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.tc-fan-card {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(165deg, #1F1A46 0%, #14102F 100%);
  border: 1px solid rgba(232, 185, 74, .18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  overflow: hidden;
  transition: transform 300ms cubic-bezier(.4, 0, .2, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.tc-fan-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.tc-fan-card.tc-selected {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 1px var(--tc-accent), 0 10px 28px rgba(232, 185, 74, .3);
  animation: tcSelGlow 2400ms ease-in-out infinite;
}

.tc-fan-card:disabled { cursor: default; }

.tc-counter {
  margin: 32px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
}

/* ---------- screen 3: loading ---------- */

.tc-converge {
  display: flex;
  justify-content: center;
  perspective: 900px;
}

.tc-conv-card {
  width: 78px;
  height: 118px;
  border-radius: 8px;
  border: 1px solid rgba(232, 185, 74, .28);
  background: linear-gradient(165deg, #1F1A46 0%, #14102F 100%);
  transform-style: preserve-3d;
}
.tc-conv-l { animation: tcConvL 1900ms cubic-bezier(.4, 0, .2, 1) both; }
.tc-conv-m { margin-left: 8px; animation: tcConvM 1900ms cubic-bezier(.4, 0, .2, 1) both; animation-delay: 80ms; }
.tc-conv-r { margin-left: 8px; animation: tcConvR 1900ms cubic-bezier(.4, 0, .2, 1) both; animation-delay: 160ms; }

.tc-loading-text {
  margin: 0;
  font-size: 19px;
  line-height: 28px;
  letter-spacing: .01em;
  color: #D8D3F2;
  animation: tcPulse 1600ms ease-in-out infinite;
}

/* ---------- screen 4: result ---------- */

.tc-open-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 560px) {
  .tc-open-cards { grid-template-columns: repeat(2, 1fr); }
}

.tc-card-label {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tc-text-secondary);
}
.tc-card-label-gold { color: var(--tc-accent); }

.tc-card-img {
  position: relative;
  display: block;
  width: 150px;
  max-width: 100%;
  aspect-ratio: 300 / 527;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(165deg, #201B47 0%, #16123A 100%);
}
.tc-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tc-card-name {
  margin: 12px 0 0;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tc-text);
}

.tc-card-text {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--tc-text-secondary);
  max-width: 56ch;
}

.tc-locked-wrap {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.tc-locked {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.tc-locked-card {
  position: relative;
  flex: 0 0 auto;
  width: 150px; /* spec cap: source art is 300x527, never render wider than 150 CSS px */
  max-width: 100%;
}

.tc-halo {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  filter: blur(34px);
  pointer-events: none;
  background: radial-gradient(circle, rgba(120, 104, 208, .5) 0%, rgba(120, 104, 208, 0) 70%);
  animation: tcHalo 5200ms ease-in-out infinite;
}

.tc-locked-card .tc-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 527;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  border-color: rgba(255, 255, 255, .16);
}

/* Name sits below the image, like the past/present cards — the tarot
   artwork already prints its own name at the bottom, so overlaying a
   second label there just collided with it. */

.tc-locked-text-wrap {
  flex: 1 1 280px;
  min-width: 260px;
}

.tc-locked-text {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--tc-text);
  max-width: 56ch;
  filter: blur(6px);
  user-select: none;
  padding-bottom: 8px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}

.tc-locked-fade {
  margin-top: -60px;
  height: 60px;
  background: linear-gradient(180deg, rgba(18, 16, 43, 0) 0%, var(--tc-bg) 90%);
  pointer-events: none;
}

.tc-teaser-box {
  margin-top: 8px;
}
.tc-teaser-box p {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--tc-text);
  max-width: 56ch;
}

.tc-cta {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  padding: 0 20px;
  background: linear-gradient(180deg, var(--tc-accent-hover) 0%, var(--tc-accent) 100%);
  border: none;
  border-radius: 12px;
  color: var(--tc-bg);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(232, 185, 74, .24);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.tc-cta:hover {
  box-shadow: 0 14px 38px rgba(232, 185, 74, .38);
  transform: translateY(-1px);
}
.tc-cta:active { transform: scale(.99); }

.tc-cta-sheen {
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  animation: tcSheen 4600ms ease-in-out infinite;
}

.tc-cta-sub {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  color: var(--tc-text-secondary);
}

.tc-reset-link {
  align-self: flex-start;
  margin-top: 16px;
  min-height: 48px;
  padding: 0;
  background: none;
  border: none;
  color: var(--tc-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 180ms ease;
}
.tc-reset-link:hover { color: var(--tc-text-secondary); }

/* ---------- animations ---------- */

@keyframes tcFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tcPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes tcTwinkleA { 0%, 100% { opacity: .28; } 50% { opacity: .75; } }
@keyframes tcTwinkleB { 0%, 100% { opacity: .7; } 50% { opacity: .22; } }
@keyframes tcDriftA {
  0% { transform: translate3d(-6%, -4%, 0) scale(1); }
  50% { transform: translate3d(6%, 3%, 0) scale(1.12); }
  100% { transform: translate3d(-6%, -4%, 0) scale(1); }
}
@keyframes tcDriftB {
  0% { transform: translate3d(5%, 2%, 0) scale(1.08); }
  50% { transform: translate3d(-5%, -3%, 0) scale(.96); }
  100% { transform: translate3d(5%, 2%, 0) scale(1.08); }
}
@keyframes tcSheen {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(220%); }
}
@keyframes tcSelGlow {
  0%, 100% { box-shadow: 0 0 0 1px #E8B94A, 0 10px 28px rgba(232,185,74,.26); }
  50% { box-shadow: 0 0 0 1px #E8B94A, 0 12px 36px rgba(232,185,74,.5); }
}
@keyframes tcSpin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}
@keyframes tcHalo {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.06); }
}
@keyframes tcConvL {
  0% { transform: translateX(-104px) rotate(-8deg) rotateY(0deg); }
  55% { transform: translateX(0) rotate(0deg) rotateY(0deg); }
  100% { transform: translateX(0) rotate(0deg) rotateY(180deg); }
}
@keyframes tcConvM {
  0% { transform: translateY(18px) rotateY(0deg); }
  55% { transform: translateY(0) rotateY(0deg); }
  100% { transform: translateY(0) rotateY(180deg); }
}
@keyframes tcConvR {
  0% { transform: translateX(104px) rotate(8deg) rotateY(0deg); }
  55% { transform: translateX(0) rotate(0deg) rotateY(0deg); }
  100% { transform: translateX(0) rotate(0deg) rotateY(180deg); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .tc-blob-a, .tc-blob-b, .tc-blob-c,
  .tc-rings, .tc-stars-a, .tc-stars-b,
  .tc-cta-sheen, .tc-halo, .tc-loading-text {
    animation: none !important;
  }
  .tc-screen { animation-duration: 1ms !important; }
  .tc-fan-card.tc-selected { animation: none !important; }
  .tc-conv-l, .tc-conv-m, .tc-conv-r {
    animation-duration: 400ms !important;
  }
  * {
    transition-duration: 1ms !important;
  }
}

/* ---------- small phones ---------- */

@media (max-width: 374px) {
  .tc-app { padding: 16px; }
  .tc-screen { padding-top: 40px; }
}
