/* ANIMA REFINERY — Cathedral in a Nebula */

:root {
  --void-black: #04060f;
  --deep-navy: #0d1b4b;
  --nebula-purple: #5c1fa8;
  --aurora-teal: #00c9b1;
  --aurora-teal-dark: #009f8e;
  --gold-stardust: #c8a96e;
  --gold-dark: #b8904e;
  --star-white: #e8e8ff;
  --dim-white: rgba(232,232,255,.65);
  
  --font-cinzel: 'Cinzel', serif;
  --font-garamond: 'EB Garamond', serif;
  --font-raleway: 'Raleway', sans-serif;
  
  --nav-height: 64px;
  --radius: 12px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-raleway);
  background: var(--void-black);
  color: var(--star-white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-weight: 300;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--void-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-ring {
  width: 60px;
  height: 60px;
  border: 3px solid transparent;
  border-top-color: var(--nebula-purple);
  border-right-color: var(--aurora-teal);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.preloader-text {
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--aurora-teal);
  margin-top: 1.5rem;
  opacity: 0.8;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
  animation: breathe 18s ease-in-out infinite;
}

.nebula-purple {
  width: 600px;
  height: 600px;
  background: rgba(92, 31, 168, 0.25);
  top: -200px;
  left: -200px;
}

.nebula-teal {
  width: 500px;
  height: 500px;
  background: rgba(0, 201, 177, 0.15);
  bottom: -150px;
  right: -150px;
  animation-delay: -9s;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(20px, -10px); }
}

#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(4, 6, 15, 0.7);
  border-bottom: 1px solid rgba(92, 31, 168, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--star-white);
  cursor: pointer;
}

.logo-star {
  font-size: 1.5rem;
  color: var(--aurora-teal);
  animation: slow-spin 20s linear infinite;
  display: inline-block;
}

@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-text {
  font-family: var(--font-cinzel);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.eyebrow {
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--aurora-teal);
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: uppercase;
}

#app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.view {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  animation: fadeIn 0.6s ease;
}

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

.hidden {
  display: none !important;
}

.hero-view {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-cinzel);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-title .line {
  display: block;
}

.hero-subtitle {
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.trial-note {
  font-size: 0.8rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.btn {
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  background: none;
  color: inherit;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-stardust), var(--gold-dark));
  color: var(--void-black);
  font-weight: 600;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 169, 110, 0.3);
}

.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-teal {
  background: linear-gradient(135deg, var(--aurora-teal), var(--aurora-teal-dark));
  color: var(--void-black);
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--aurora-teal);
  color: var(--aurora-teal);
}

.btn-outline:hover {
  background: rgba(0, 201, 177, 0.1);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.65rem;
}

/* Tradition Selection - Fixed Styles */
.tradition-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tradition-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(13, 27, 75, 0.4);
  border: 2px solid rgba(92, 31, 168, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.tradition-item:hover {
  border-color: var(--aurora-teal);
  background: rgba(13, 27, 75, 0.6);
}

.tradition-item.selected {
  border-color: var(--gold-stardust);
  background: rgba(200, 169, 110, 0.15);
}

.tradition-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--aurora-teal);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.tradition-item.selected .tradition-checkbox {
  background: var(--gold-stardust);
  border-color: var(--gold-stardust);
}

.tradition-checkbox::after {
  content: '✓';
  color: var(--void-black);
  font-weight: bold;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tradition-item.selected .tradition-checkbox::after {
  opacity: 1;
}

.tradition-content {
  flex: 1;
}

.tradition-name {
  font-family: var(--font-cinzel);
  font-size: 1rem;
  font-weight: 600;
  color: var(--star-white);
  display: block;
  margin-bottom: 0.25rem;
}

.tradition-wisdom {
  font-size: 0.85rem;
  color: var(--dim-white);
  font-style: italic;
}

.tradition-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Legacy faith grid (keep for compatibility) */
.faith-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.faith-card {
  background: rgba(13, 27, 75, 0.4);
  border: 1px solid rgba(92, 31, 168, 0.2);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--star-white);
  text-align: center;
}

.faith-card:hover {
  border-color: var(--aurora-teal);
  transform: translateY(-4px);
}

.faith-card.selected {
  border-color: var(--gold-stardust);
  background: rgba(200, 169, 110, 0.1);
}

.faith-icon {
  font-size: 1.5rem;
  color: var(--aurora-teal);
}

.faith-name {
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(92, 31, 168, 0.2);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aurora-teal), var(--nebula-purple));
  width: 0%;
  transition: width 0.5s ease;
}

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

.question-text {
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.question-subtitle {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: 2rem;
}

.textarea {
  width: 100%;
  min-height: 180px;
  background: rgba(4, 6, 15, 0.5);
  border: 1px solid rgba(92, 31, 168, 0.3);
  border-radius: 8px;
  padding: 1rem;
  color: var(--star-white);
  font-family: var(--font-raleway);
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1.5rem;
}

.textarea:focus {
  outline: none;
  border-color: var(--aurora-teal);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 3rem;
}

.dashboard-header h1 {
  font-family: var(--font-cinzel);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.trial-banner {
  background: rgba(0, 201, 177, 0.1);
  border: 1px solid var(--aurora-teal);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.trial-banner.subtle {
  opacity: 0.8;
  font-size: 0.9rem;
}

.tier-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.tier-seedling {
  background: rgba(0, 201, 177, 0.2);
  color: var(--aurora-teal);
}

.tier-rooted {
  background: rgba(139, 90, 43, 0.3);
  color: #c4a574;
}

.tier-scholarship {
  background: rgba(92, 31, 168, 0.3);
  color: #b388ff;
}

.tier-flowering {
  background: rgba(200, 169, 110, 0.2);
  color: var(--gold-stardust);
}

.tier-pollinator {
  background: linear-gradient(135deg, rgba(200, 169, 110, 0.3), rgba(0, 201, 177, 0.2));
  color: var(--star-white);
}

.soul-portrait {
  font-family: var(--font-garamond);
  font-style: italic;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
  padding: 1.5rem;
  background: rgba(200, 169, 110, 0.08);
  border-left: 3px solid var(--gold-stardust);
  border-radius: 0 8px 8px 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: linear-gradient(135deg, rgba(13, 27, 75, 0.6), rgba(7, 13, 30, 0.8));
  border: 1px solid rgba(92, 31, 168, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  border-color: rgba(92, 31, 168, 0.6);
  transform: translateY(-4px);
}

.card-gold {
  border-color: rgba(200, 169, 110, 0.3);
}

.card-disabled {
  opacity: 0.6;
  cursor: default;
}

.card-disabled:hover {
  transform: none;
  border-color: rgba(92, 31, 168, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.5rem;
}

.card-label {
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--aurora-teal);
}

.question-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--gold-stardust);
}

.premium-badge {
  margin-left: auto;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  background: var(--gold-stardust);
  color: var(--void-black);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.card-content p {
  opacity: 0.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--aurora-teal);
  font-family: var(--font-raleway);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.devotional-content {
  font-family: var(--font-garamond);
  font-size: 1.25rem;
  line-height: 1.9;
  margin: 2rem 0;
}

.devotional-content p {
  margin-bottom: 1.5rem;
}

/* Voice Player Styles */
.voice-player {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 201, 177, 0.1);
  border: 1px solid rgba(0, 201, 177, 0.3);
  border-radius: 50px;
  margin: 1.5rem 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.voice-player:hover {
  background: rgba(0, 201, 177, 0.2);
  border-color: var(--aurora-teal);
}

.voice-player.playing {
  background: rgba(200, 169, 110, 0.15);
  border-color: var(--gold-stardust);
}

.voice-icon {
  font-size: 1.5rem;
}

.voice-text {
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.voice-settings {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.voice-select {
  background: rgba(4, 6, 15, 0.8);
  border: 1px solid var(--aurora-teal);
  color: var(--star-white);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: var(--font-raleway);
  font-size: 0.8rem;
  cursor: pointer;
}

.action-list {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(92, 31, 168, 0.2);
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(4, 6, 15, 0.3);
  border-radius: 8px;
}

.action-number {
  width: 28px;
  height: 28px;
  background: var(--aurora-teal);
  color: var(--void-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cinzel);
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.examen-item {
  margin-bottom: 2rem;
  text-align: left;
}

.examen-q {
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.blessing {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(200, 169, 110, 0.1);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-garamond);
  font-style: italic;
  font-size: 1.2rem;
  animation: fadeIn 0.6s ease;
}

.feedback-prompt {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(92, 31, 168, 0.2);
}

.feedback-prompt p {
  font-family: var(--font-garamond);
  font-style: italic;
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* Pricing Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pricing-card {
  background: linear-gradient(135deg, rgba(13, 27, 75, 0.6), rgba(7, 13, 30, 0.8));
  border: 1px solid rgba(92, 31, 168, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--aurora-teal);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--gold-stardust);
  background: linear-gradient(135deg, rgba(200, 169, 110, 0.1), rgba(13, 27, 75, 0.6));
}

.pricing-card h3 {
  font-family: var(--font-cinzel);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.price {
  font-family: var(--font-cinzel);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 1.5rem;
}

.price span {
  font-size: 1rem;
  opacity: 0.6;
}

.features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--aurora-teal);
}

.scholarship-section {
  text-align: center;
  padding: 2rem;
  background: rgba(92, 31, 168, 0.1);
  border: 1px dashed rgba(92, 31, 168, 0.4);
  border-radius: var(--radius);
  margin-top: 2rem;
}

.scholarship-section h3 {
  font-family: var(--font-cinzel);
  margin-bottom: 0.5rem;
}

.scholarship-section p {
  opacity: 0.8;
  margin-bottom: 1rem;
}

/* Dialogue Styles */
.dialogue-history {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(4, 6, 15, 0.3);
  border-radius: 8px;
}

.dialogue-intro {
  font-family: var(--font-garamond);
  font-style: italic;
  opacity: 0.7;
  text-align: center;
}

.dialogue-message {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 8px;
  max-width: 85%;
}

.dialogue-message.user {
  background: rgba(0, 201, 177, 0.15);
  margin-left: auto;
  text-align: right;
}

.dialogue-message.guide {
  background: rgba(92, 31, 168, 0.2);
}

.dialogue-input {
  display: flex;
  gap: 1rem;
}

.dialogue-input textarea {
  flex: 1;
  min-height: 60px;
}

.question-remaining {
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  background: linear-gradient(135deg, rgba(13, 27, 75, 0.8), rgba(7, 13, 30, 0.9));
  border: 1px solid rgba(92, 31, 168, 0.3);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

#main-footer {
  padding: 4rem 2rem;
  border-top: 1px solid rgba(92, 31, 168, 0.2);
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-garamond);
  font-style: italic;
  opacity: 0.8;
  margin-top: 1rem;
}

/* Loading States */
.loading-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--aurora-teal);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .faith-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .tradition-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .tradition-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .voice-player {
    flex-wrap: wrap;
  }
  
  .voice-settings {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
