/* ============================================
   ORASTRIA TAROT - Elegant Minimal Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #FAF7F2;
  --cream-dark: #F0EBE3;
  --gold: #B8860B;
  --gold-light: #D4A843;
  --gold-pale: #F5E6C8;
  --charcoal: #2C2C2C;
  --charcoal-light: #4A4A4A;
  --text: #3D3D3D;
  --text-light: #6B6B6B;
  --text-muted: #9A9A9A;
  --purple: #7C5CBF;
  --purple-light: #9B7FD4;
  --border: #E5DDD0;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.app-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100vh;
}

/* --- Header --- */
.header {
  text-align: center;
  padding: 20px 0 10px;
  margin-bottom: 8px;
}

.logo {
  width: 200px;
  height: auto;
  margin-bottom: 4px;
}

.header-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* --- Progress Bar --- */
.progress-container {
  margin-bottom: 32px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.4s ease;
}

.progress-dot.active {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

.progress-dot.completed {
  background: var(--gold-light);
}

.progress-label {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Steps / Cards --- */
.step {
  display: none;
  animation: fadeIn 0.5s ease;
}

.step.active {
  display: block;
}

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

.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.2;
}

.step-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* --- Category Selection (Step 1) --- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.category-card {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-card.selected {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.category-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
}

.category-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Question Input (Step 2) --- */
.question-input {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--cream);
  resize: vertical;
  transition: border-color 0.3s ease;
  line-height: 1.6;
}

.question-input:focus {
  outline: none;
  border-color: var(--gold);
}

.question-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.question-suggestions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.question-suggestions-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.suggestion-chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  margin: 0 6px 6px 0;
  transition: all 0.2s ease;
}

.suggestion-chip:hover {
  background: var(--gold-pale);
  border-color: var(--gold-light);
  color: var(--charcoal);
}

/* --- Email Input (Step 3) --- */
.email-input-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.email-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: var(--gold);
}

.email-input::placeholder {
  color: var(--text-muted);
}

.email-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

.email-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.trust-badge {
  text-align: center;
}

.trust-badge-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.trust-badge-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Shuffling / Loading (Step 4) --- */
.shuffle-container {
  text-align: center;
  padding: 30px 0;
}

.shuffle-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
  perspective: 600px;
}

.shuffle-card {
  width: 60px;
  height: 96px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  position: relative;
  animation: shuffleFloat 2s ease-in-out infinite;
  overflow: hidden;
}

.shuffle-card::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px;
}

.shuffle-card:nth-child(1) { animation-delay: 0s; }
.shuffle-card:nth-child(2) { animation-delay: 0.2s; }
.shuffle-card:nth-child(3) { animation-delay: 0.4s; }
.shuffle-card:nth-child(4) { animation-delay: 0.6s; }
.shuffle-card:nth-child(5) { animation-delay: 0.8s; }

@keyframes shuffleFloat {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  25% { transform: translateY(-12px) rotateY(10deg); }
  50% { transform: translateY(0) rotateY(0deg); }
  75% { transform: translateY(-8px) rotateY(-10deg); }
}

.shuffle-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.shuffle-subtext {
  font-size: 14px;
  color: var(--text-muted);
}

.shuffle-progress {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin: 24px auto 0;
  overflow: hidden;
}

.shuffle-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* --- Card Reveal (Step 5) --- */
.cards-reveal-container {
  margin-bottom: 24px;
}

.cards-spread {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
}

.tarot-card-wrapper {
  text-align: center;
  flex: 1;
  min-width: 0;
  max-width: 90px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.tarot-card-wrapper:hover {
  transform: translateY(-4px);
}

.tarot-card-wrapper.active-card {
  transform: translateY(-6px);
}

.tarot-card-wrapper.active-card .tarot-card-img-wrapper {
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
  border-color: var(--gold);
}

.tarot-card-img-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  background: var(--white);
}

.tarot-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.tarot-card-position {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.tarot-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 2px;
}

/* --- Card Interpretation --- */
.interpretation-section {
  margin-top: 20px;
}

.interpretation-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.interpretation-card.blurred {
  user-select: none;
}

.interpretation-card.blurred .interpretation-text {
  filter: blur(5px);
  -webkit-filter: blur(5px);
}

.interpretation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.interpretation-position {
  background: var(--gold);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}

.interpretation-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
}

.interpretation-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.interpretation-text p {
  margin-bottom: 10px;
}

.interpretation-text p:last-child {
  margin-bottom: 0;
}

/* --- Synthesis --- */
.synthesis-section {
  margin-top: 24px;
  position: relative;
}

.synthesis-card {
  background: linear-gradient(135deg, #F9F5EE, #FFF8EE);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--gold-pale);
  position: relative;
  overflow: hidden;
}

.synthesis-card.blurred .synthesis-text {
  filter: blur(5px);
  -webkit-filter: blur(5px);
}

.synthesis-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 16px;
}

.synthesis-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.synthesis-text p {
  margin-bottom: 12px;
}

/* --- Blur Overlay / Paywall --- */
.blur-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--cream) 70%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
  z-index: 5;
}

.paywall-section {
  text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-lg);
  margin-top: 16px;
}

.paywall-lock {
  font-size: 36px;
  margin-bottom: 12px;
}

.paywall-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.paywall-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.paywall-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}

.paywall-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.paywall-feature-icon {
  color: var(--gold);
  font-size: 16px;
  flex-shrink: 0;
}

.paywall-price {
  margin-bottom: 20px;
}

.paywall-price-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--charcoal);
}

.paywall-price-currency {
  font-size: 20px;
  font-weight: 400;
  vertical-align: super;
}

.paywall-price-period {
  font-size: 14px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.paywall-guarantee {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* --- Buttons --- */
.btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--charcoal-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  font-size: 16px;
  padding: 18px 24px;
  letter-spacing: 0.3px;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--cream);
  border-color: var(--text-muted);
}

.step-actions {
  margin-top: 24px;
}

.step-actions .btn + .btn {
  margin-top: 10px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .app-container {
    padding: 12px 12px 32px;
  }

  .step-card {
    padding: 28px 20px;
  }

  .step-title {
    font-size: 24px;
  }

  .category-grid {
    gap: 10px;
  }

  .category-card {
    padding: 16px 12px;
  }

  .cards-spread {
    gap: 4px;
  }

  .tarot-card-wrapper {
    max-width: 68px;
  }

  .tarot-card-position {
    font-size: 8px;
  }

  .tarot-card-name {
    font-size: 10px;
  }

  .interpretation-card {
    padding: 18px;
  }

  .synthesis-card {
    padding: 22px;
  }
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* --- Decorative Stars --- */
.stars-decoration {
  text-align: center;
  font-size: 11px;
  color: var(--gold-light);
  letter-spacing: 8px;
  margin: 16px 0;
}

/* --- Card flip animation --- */
.card-flip-enter {
  animation: cardFlip 0.6s ease;
}

@keyframes cardFlip {
  0% { transform: rotateY(180deg) scale(0.8); opacity: 0; }
  50% { transform: rotateY(90deg) scale(0.9); opacity: 0.5; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

/* --- Loading dots --- */
.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}
