/* App-specific overrides + niceties beyond Tailwind */

[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
}

/* Subtle entrance for sections */
.fade-in {
  animation: fadeIn 0.35s ease-out both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card hover lift */
.lift-on-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.lift-on-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.15);
}

/* Likert pills */
.likert-pill {
  flex: 1;
  padding: 0.625rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.625rem;
  background: white;
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.12s ease;
}
.likert-pill:hover { border-color: #a5b4fc; background: #eef2ff; }
.likert-pill.selected {
  border-color: #4f46e5;
  background: #4f46e5;
  color: white;
  font-weight: 600;
}

/* Card sort drop targets */
.sort-pile {
  min-height: 7rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.875rem;
  padding: 0.875rem;
  background: #f8fafc;
  transition: all 0.15s ease;
}
.sort-pile.drag-over {
  border-color: #4f46e5;
  background: #eef2ff;
}
.value-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: grab;
  user-select: none;
  display: inline-block;
  margin: 0.2rem;
  transition: all 0.12s ease;
}
.value-card:hover { border-color: #6366f1; }
.value-card.dragging { opacity: 0.4; }

/* Reflection input */
.reflection-input {
  width: 100%;
  min-height: 8rem;
  padding: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.12s ease;
}
.reflection-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* RIASEC dimension bar */
.dim-bar {
  height: 0.625rem;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 0.375rem;
  transition: width 0.5s ease;
}

/* Mark colors for AI profile review */
.mark-green { background: #d1fae5; border-left: 3px solid #10b981; }
.mark-yellow { background: #fef3c7; border-left: 3px solid #f59e0b; }
.mark-red { background: #fee2e2; border-left: 3px solid #ef4444; }
.mark-default { background: white; border-left: 3px solid transparent; }

/* AI thinking shimmer */
.ai-thinking {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 0.5rem;
  height: 1rem;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Phase progress dot */
.phase-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.2s ease;
}
.phase-dot.active { background: #4f46e5; transform: scale(1.5); }
.phase-dot.done { background: #10b981; }

/* Drawing canvas */
.draw-canvas {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: crosshair;
  touch-action: none;
}

/* Soft scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =================================================================
 * EXTRAORDINARY POLISH
 * Year-in-Review, dashboard cards, animations, mobile.
 * ================================================================= */

/* Gradient text — used on hero headlines */
.gradient-text {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Paper-card aesthetic with subtle shadow + hover */
.paper-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 8px 24px -12px rgba(15,23,42,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.paper-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 16px 36px -16px rgba(15,23,42,.10);
}

/* Big-stat number style */
.stat-number {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Year-in-Review animations */
.yir-fade-up {
  animation: fadeUp .6s ease-out both;
}
.yir-fade-up:nth-child(2) { animation-delay: .08s; }
.yir-fade-up:nth-child(3) { animation-delay: .16s; }
.yir-fade-up:nth-child(4) { animation-delay: .24s; }
.yir-fade-up:nth-child(5) { animation-delay: .32s; }
.yir-fade-up:nth-child(6) { animation-delay: .40s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RIASEC radar chart */
.radar-grid { stroke: #e2e8f0; fill: none; stroke-width: 1; }
.radar-axis { stroke: #cbd5e1; stroke-width: 1; }
.radar-shape { fill: rgba(99, 102, 241, 0.15); stroke: #4f46e5; stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: #4f46e5; }
.radar-label { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; fill: #475569; }
.radar-score { font-family: 'Inter', sans-serif; font-size: 10px; fill: #94a3b8; }

/* Confetti for session completion */
.confetti {
  position: fixed;
  top: -20px;
  left: 50%;
  width: 8px;
  height: 14px;
  background: var(--c, #4f46e5);
  pointer-events: none;
  animation: confettiFall 2.4s linear forwards;
  border-radius: 2px;
  z-index: 100;
}
@keyframes confettiFall {
  0%   { transform: translate(var(--x, 0), 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(var(--x, 0) + var(--drift, 50px)), 100vh) rotate(720deg); opacity: 0; }
}

/* Intro overlay for demo tour */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: grid;
  place-items: center;
  animation: fadeIn .3s ease-out both;
}
.intro-card {
  max-width: 460px;
  width: 90%;
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  animation: introPop .45s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}
@keyframes introPop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Pull-quote style for prominent reflections */
.pull-quote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 500;
  color: #0f172a;
  position: relative;
  padding-left: 1.5rem;
}
.pull-quote::before {
  content: '"';
  position: absolute;
  left: -0.25rem;
  top: -1rem;
  font-size: 5rem;
  color: #c7d2fe;
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1;
}

/* Dimension bar with animated fill */
.dim-bar-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #4f46e5);
  border-radius: 4px;
  animation: barGrow 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  transform-origin: left;
}
@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Timeline ribbon */
.timeline-ribbon {
  position: relative;
  padding-left: 2rem;
}
.timeline-ribbon::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, #4f46e5, #818cf8);
}
.timeline-node {
  position: absolute;
  left: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  border: 3px solid #4f46e5;
  box-shadow: 0 0 0 3px white;
}
.timeline-node.muted {
  border-color: #cbd5e1;
}

/* Strength chip */
.strength-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Value badge */
.value-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Mobile responsive tweaks */
@media (max-width: 640px) {
  .stat-number { font-size: 2.75rem; }
  .pull-quote { font-size: 1.125rem; }
  .pull-quote::before { font-size: 3.5rem; top: -0.5rem; }
}

/* Subtle grain — adds warmth */
.grain {
  position: relative;
}
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
