/* ============================================================
   VIPASSANA — Quiet Luxury Enhancements
   ============================================================ */

/* ─── SCROLL DEPTH INDICATOR ─────────────────────────────── */
#scroll-indicator {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, var(--gold-dim), var(--gold), #E8D08A);
  z-index: 2000;
  transition: width 0.1s linear;
}


/* ─── CINEMATIC TRANSITION OVERLAY ──────────────────────── */
#scene-curtain {
  position: fixed;
  inset: 0;
  background: #f4efe7;
  z-index: 1800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}
#scene-curtain.closing { opacity: 1; transition: opacity 0.35s ease; }
#scene-curtain.opening { opacity: 0; transition: opacity 0.6s ease; }

/* ─── ONBOARDING OVERLAY ─────────────────────────────────── */
#onboarding {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: linear-gradient(180deg, #fffaf3 0%, #f2ece2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px 24px;
  transition: opacity 0.9s ease;
}
#onboarding.hiding { opacity: 0; pointer-events: none; }
#onboarding.hidden { display: none; }

.ob-step { display: none; flex-direction: column; align-items: center; }
.ob-step.active { display: flex; animation: fadeInUp 0.9s ease both; }

.ob-wheel {
  width: 56px; height: 56px;
  margin-bottom: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(198,165,92,0.4));
}

.ob-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(154,112,32,0.6);
  margin-bottom: 24px;
}

.ob-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 52px);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 28px;
  max-width: 560px;
}

.ob-body {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.8;
  margin-bottom: 56px;
}

.ob-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
}
.ob-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(154,112,32,0.2);
  transition: background 0.3s;
}
.ob-dot.active { background: var(--gold); }

.ob-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin-bottom: 56px;
}
.ob-checklist li {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-muted);
}
.ob-checklist li span.mark {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(154,112,32,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  font-size: 12px;
}

.ob-commit-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--text-primary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.ob-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  border-radius: 9999px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.ob-btn:hover {
  background: var(--gold);
  color: var(--text-primary);
  box-shadow: 0 0 28px rgba(154,112,32,0.35);
}

.ob-skip {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(42,36,32,0.35);
  cursor: pointer;
  transition: color 0.25s;
  font-family: 'Inter', sans-serif;
}
.ob-skip:hover { color: rgba(42,36,32,0.55); }


/* ─── CINEMATIC SECTION REVEAL (GUIDED SCROLL) ───────────── */
.cinema-section {
  position: relative;
}
.cinema-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.0);
  pointer-events: none;
  z-index: 10;
  transition: background 0.8s ease;
}
.cinema-section.entering::before { background: rgba(255,252,247,0.18); }

/* ─── ENHANCED PARTICLE CANVAS ───────────────────────────── */
/* Handled in JS; canvas is already present */

/* ─── CHAT UI ─────────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 252, 247, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}

.chat-header {
  padding: 20px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.45);
}
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(154,112,32,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(154,112,32,0.25);
  flex-shrink: 0;
}
.chat-avatar img { width: 22px; height: 22px; opacity: 0.8; }
.chat-header-info { flex: 1; }
.chat-header-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.chat-header-status {
  font-size: 11px;
  color: rgba(154,112,32,0.5);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6BCB77;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(154,112,32,0.2); border-radius: 2px; }

.chat-msg {
  display: flex;
  gap: 10px;
  animation: fadeInUp 0.45s ease both;
}
.chat-msg.user { flex-direction: row-reverse; }

.chat-msg-bubble {
  max-width: 75%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.65;
  position: relative;
}
.chat-msg.dhamma .chat-msg-bubble {
  background: rgba(255,255,255,0.58);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
}
.chat-msg.user .chat-msg-bubble {
  background: rgba(154,112,32,0.15);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
  font-family: 'Inter', sans-serif;
}

.chat-msg-time {
  font-size: 10px;
  color: rgba(42,36,32,0.35);
  margin-top: 5px;
  letter-spacing: 0.04em;
  align-self: flex-end;
  padding: 0 4px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 4px;
  opacity: 0;
  transition: opacity 0.3s;
}
.typing-indicator.visible { opacity: 1; }
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(255,255,255,0.52);
  padding: 10px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}
.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(154,112,32,0.4);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(255,255,255,0.35);
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  resize: none;
  outline: none;
  min-height: 46px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.3s;
}
.chat-input::placeholder { color: rgba(42,36,32,0.35); }
.chat-input:focus { border-color: rgba(154,112,32,0.3); }

.chat-send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(154,112,32,0.15);
  border: 1px solid rgba(154,112,32,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: var(--gold);
}
.chat-send:hover { background: rgba(154,112,32,0.25); box-shadow: 0 0 12px rgba(154,112,32,0.2); }
.chat-send svg { width: 16px; height: 16px; }
.chat-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* Prompt pills (quick questions) */
.chat-prompts {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-prompts::-webkit-scrollbar { display: none; }
.chat-prompt-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(154,112,32,0.2);
  font-size: 12px;
  color: rgba(154,112,32,0.65);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
  background: transparent;
}
.chat-prompt-pill:hover {
  background: rgba(154,112,32,0.1);
  color: var(--gold);
  border-color: rgba(154,112,32,0.4);
}

/* ─── LIGHT RAYS EFFECT (HERO) ───────────────────────────── */
.light-rays {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.light-ray {
  position: absolute;
  bottom: -10%;
  width: 1px;
  background: linear-gradient(to top, rgba(154,112,32,0.0), rgba(154,112,32,0.06) 50%, transparent);
  transform-origin: bottom center;
  animation: rayFlicker var(--ray-dur, 8s) ease-in-out infinite alternate;
}
@keyframes rayFlicker {
  0%   { opacity: 0.3; transform: rotate(var(--ray-rot, 0deg)) scaleX(1); }
  50%  { opacity: 0.6; transform: rotate(var(--ray-rot, 0deg)) scaleX(1.8); }
  100% { opacity: 0.2; transform: rotate(var(--ray-rot, 0deg)) scaleX(0.8); }
}

/* ─── SECTION LABEL (storytelling) ──────────────────────── */
.scene-label {
  position: fixed;
  left: 32px;
  bottom: 32px;
  z-index: 998;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(154,112,32,0.3);
  font-family: 'Inter', sans-serif;
  transition: opacity 0.4s, color 0.4s;
  pointer-events: none;
}
@media (max-width: 768px) { .scene-label { display: none; } }

