/* Existing visual design, extracted for the shared reading tools. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --void: #07070F;
  --deep: #0D0B1A;
  --card-bg: #110F20;
  --purple: #8B5CF6;
  --purple-soft: #A78BFA;
  --purple-dim: rgba(139,92,246,0.15);
  --cyan: #06B6D4;
  --cyan-dim: rgba(6,182,212,0.12);
  --gold: #C9A96E;
  --gold-light: #E8D5B0;
  --gold-dim: rgba(201,169,110,0.2);
  --text-bright: #F0EEFF;
  --text-mid: #C4B5FD;
  --text-soft: #7C6FA0;
  --glass-bg: rgba(139,92,246,0.07);
  --glass-border: rgba(139,92,246,0.22);
  --glass-gold: rgba(201,169,110,0.22);
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.6);
  --glow-p: 0 0 30px rgba(139,92,246,0.4);
  --glow-c: 0 0 30px rgba(6,182,212,0.4);
  --glow-g: 0 0 24px rgba(201,169,110,0.35);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--void);
  color: var(--text-bright);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 64px;
  background: rgba(7,7,15,0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139,92,246,0.1);
  transition: background .3s;
}
nav.scrolled { background: rgba(7,7,15,0.92); border-bottom-color: rgba(139,92,246,0.2); }
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.nav-logo-icon {
  width: 34px; height: 34px;
  background: rgba(139,92,246,0.15);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.nav-logo-name {
  font-family: 'Cinzel', serif; font-size: 15px; font-weight: 600;
  color: var(--text-bright); letter-spacing: 0.1em;
}
.nav-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-soft); text-decoration: none;
  transition: color .2s;
  border: 1px solid rgba(139,92,246,0.2);
  padding: 7px 14px; border-radius: 99px;
}
.nav-back:hover { color: var(--purple-soft); border-color: var(--glass-border); }
.nav-back .arrow { transition: transform .2s; }
.nav-back:hover .arrow { transform: translateX(-3px); }

/* ─── HERO — OG IMAGE BG ─── */
.hero-stage {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 24px 48px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: url('/og-image.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: transform 8s ease-in-out;
  animation: slowzoom 12s ease-in-out infinite alternate;
}
@keyframes slowzoom {
  0% { transform: scale(1.04); }
  100% { transform: scale(1.10); }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(7,7,15,0.6) 0%,
      rgba(13,11,26,0.72) 40%,
      rgba(7,7,15,0.85) 80%,
      rgba(7,7,15,1) 100%
    );
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  width: 100%; max-width: 900px;
}

/* Date badge */
.date-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(7,7,15,0.6);
  border: 1px solid var(--glass-gold);
  backdrop-filter: blur(12px);
  border-radius: 99px; padding: 7px 18px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 32px;
}
.date-badge::before { content: '✦'; font-size: 10px; }

/* ─── CARD FLIP ─── */
.flip-wrapper {
  perspective: 1000px;
  width: min(220px, 55vw);
  margin-bottom: 24px;
}
.flip-inner {
  width: 100%;
  padding-top: 175%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
}
.flip-wrapper.flipped .flip-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
}
.flip-back { /* This is the CARD IMAGE side (180deg) */
  transform: rotateY(180deg);
  box-shadow: var(--shadow-lg), var(--glow-p);
  border: 1px solid rgba(139,92,246,0.3);
}
.flip-back img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.92) contrast(1.08) saturate(0.82);
}
.flip-back .reversed-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; letter-spacing: 0.15em; color: rgba(239,68,68,0.7);
  font-family: 'Cinzel', serif; text-transform: uppercase;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.flip-back.is-reversed .reversed-overlay { opacity: 1; }
.flip-back.is-reversed img { transform: rotate(180deg); }

.flip-front { /* Card BACK — use real image */
  background-image: url('/images/tarot/card-back.webp');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(139,92,246,0.25);
  box-shadow: var(--shadow-lg), var(--glow-p);
  cursor: pointer;
}
.flip-front::after {
  content: 'Tap to reveal';
  position: absolute; bottom: 16px;
  left: 0; right: 0; text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.65);
  animation: pulse-opacity 2s ease-in-out infinite;
}
.front-star { display: none; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}
.front-text { display: none; }
.front-ornament { display: none; }/*
  width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.tap-hint { display: none; }/*
  font-size: 11px; color: rgba(201,169,110,0.5);
  letter-spacing: 0.08em; text-align: center;
  animation: pulse-opacity 2s ease-in-out infinite;
}
@keyframes pulse-opacity {
  0%,100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Card name reveal */
.card-reveal {
  text-align: center; margin-bottom: 8px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s .4s, transform .6s .4s;
}
.flip-wrapper.flipped ~ .card-reveal,
.card-reveal.show {
  opacity: 1; transform: translateY(0);
}
.card-roman {
  font-family: 'Cinzel', serif; font-size: 14px; font-weight: 400;
  color: var(--gold); letter-spacing: 0.15em; display: block; margin-bottom: 4px;
}
.card-name-big {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 5vw, 40px); font-weight: 600;
  color: var(--text-bright); letter-spacing: 0.02em;
}
.card-reversed-label {
  display: none; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #EF4444; margin-top: 4px;
  font-family: 'Cinzel', serif;
}
.card-reversed-label.show { display: block; }

.scroll-hint {
  margin-top: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; transition: opacity .6s 1s;
  color: var(--text-soft); font-size: 12px; letter-spacing: 0.08em;
}
.flip-wrapper.flipped ~ .card-reveal ~ .scroll-hint { opacity: 1; }
.scroll-arrow {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--purple), transparent);
  animation: scrollpulse 1.5s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%,100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

/* ─── MEANING SECTION ─── */
.meaning-section {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding: 48px 20px 80px;
}

/* Meta row */
.meta-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 28px;
}
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 99px; padding: 6px 14px;
  font-size: 12px; color: var(--text-mid); font-weight: 500;
}
.meta-chip.gold { border-color: var(--glass-gold); color: var(--gold); background: var(--gold-dim); }
.meta-chip.cyan { border-color: rgba(6,182,212,0.25); color: var(--cyan); background: var(--cyan-dim); }
.meta-chip.yes { color: #10B981; border-color: rgba(16,185,129,0.25); background: rgba(16,185,129,0.08); }
.meta-chip.no { color: #EF4444; border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.08); }
.meta-chip.maybe { color: var(--gold); border-color: var(--glass-gold); background: var(--gold-dim); }

/* Keywords */
.keywords-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 32px;
}
.kw-chip {
  background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.2);
  border-radius: 99px; padding: 5px 14px;
  font-size: 12px; color: var(--purple-soft);
}

/* Tabs */
.tabs {
  display: flex; gap: 4px;
  background: rgba(139,92,246,0.06); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 4px; margin-bottom: 20px;
}
.tab-btn {
  flex: 1; padding: 10px 8px;
  background: transparent; border: none; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text-soft); cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  color: white; box-shadow: var(--glow-p);
}
.tab-btn:hover:not(.active) { color: var(--text-mid); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.meaning-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 24px;
  position: relative; overflow: hidden; margin-bottom: 14px;
}
.meaning-card::before {
  content: '';
  position: absolute; top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}
.meaning-card.reversed::before {
  background: linear-gradient(90deg, transparent, #EF4444, transparent);
}
.meaning-card.twin::before {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.meaning-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-soft); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.meaning-label::before { content: '✦'; color: var(--purple-soft); font-size: 8px; }
.meaning-card.reversed .meaning-label::before { color: #EF4444; }
.meaning-card.twin .meaning-label::before { color: var(--gold); }
.meaning-text {
  font-size: 15px; color: var(--text-mid); line-height: 1.75;
  font-family: 'Playfair Display', serif; font-style: italic;
}
.meaning-card.reversed .meaning-label { color: rgba(239,68,68,0.7); }
.meaning-card.reversed .meaning-text { color: rgba(239,68,68,0.75); }

/* Timing card */
.timing-card {
  background: linear-gradient(135deg, var(--gold-dim), rgba(201,169,110,0.05));
  border: 1px solid var(--glass-gold); border-radius: 16px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.timing-icon { font-size: 24px; flex-shrink: 0; }
.timing-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); margin-bottom: 3px; }
.timing-val { font-family: 'Cinzel', serif; font-size: 14px; color: var(--gold); }

/* Bottom nav */
.bottom-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.btn-share {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border: none; border-radius: 14px; padding: 14px 28px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  color: white; cursor: pointer; box-shadow: var(--glow-p);
  transition: transform .15s, box-shadow .15s; text-decoration: none;
}
.btn-share:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(139,92,246,0.5); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--glass-border);
  border-radius: 14px; padding: 13px 22px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--text-soft); cursor: pointer; text-decoration: none;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--purple-soft); color: var(--purple-soft); }
.btn-gold-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--glass-gold);
  border-radius: 14px; padding: 13px 22px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--gold); cursor: pointer; text-decoration: none;
  transition: all .2s;
}
.btn-gold-outline:hover { background: var(--gold); color: var(--void); }

/* ─── MAGIC MIRROR STRIP ─── */
.mirror-strip {
  display: none;
  max-width: 760px; margin: 0 auto 0;
  padding: 0 20px;
}
.mirror-strip.show { display: block; }
.mirror-strip-inner {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(6,182,212,0.06));
  border: 1px solid var(--glass-border); border-radius: 18px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: relative; overflow: hidden; margin-bottom: 0;
}
.mirror-strip-inner::before {
  content: '';
  position: absolute; top: -1px; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--cyan), transparent);
}
.mirror-strip-text { flex: 1; min-width: 180px; }
.mirror-strip-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); margin-bottom: 4px; }
.mirror-strip-msg { font-size: 13px; color: var(--text-mid); line-height: 1.5; }
.mirror-strip-msg strong { color: var(--gold); }

/* ─── MOBILE ─── */
@media (max-width: 600px) {
  .flip-wrapper { width: min(180px, 50vw); }
  .tabs { flex-wrap: wrap; }
  .tab-btn { flex: none; padding: 9px 12px; font-size: 12px; }
  .bottom-nav { flex-direction: column; width: 100%; }
  .btn-share, .btn-outline, .btn-gold-outline { width: 100%; justify-content: center; }
}
