/* AURA - Reset y estilos globales */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* App wrapper */
#app {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* View transitions - smooth and elegant */
.view {
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.view.exit {
  opacity: 0;
  transform: translateY(-12px) scale(0.99);
}

/* Block transitions (slide) - smooth easing */
.block-enter {
  opacity: 0;
  transform: translateX(40px);
}

.block-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 450ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

.block-exit {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.block-enter-reverse {
  opacity: 0;
  transform: translateX(-40px);
}

.block-enter-reverse-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 450ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered fade-in for results */
.stagger-in > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-in.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(7) { transition-delay: 480ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(8) { transition-delay: 560ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(9) { transition-delay: 640ms; opacity: 1; transform: translateY(0); }
.stagger-in.visible > *:nth-child(10) { transition-delay: 720ms; opacity: 1; transform: translateY(0); }
/* All children beyond 10 appear together */
.stagger-in.visible > *:nth-child(n+11) { transition-delay: 800ms; opacity: 1; transform: translateY(0); }

/* Question items fade-in when block loads */
@keyframes questionFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.likert-question, .open-question, .point-dist__item {
  animation: questionFadeIn 400ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.likert-question:nth-child(1) { animation-delay: 50ms; }
.likert-question:nth-child(2) { animation-delay: 100ms; }
.likert-question:nth-child(3) { animation-delay: 150ms; }
.likert-question:nth-child(4) { animation-delay: 200ms; }
.likert-question:nth-child(5) { animation-delay: 250ms; }
.likert-question:nth-child(6) { animation-delay: 300ms; }
.likert-question:nth-child(7) { animation-delay: 350ms; }
.likert-question:nth-child(8) { animation-delay: 400ms; }

/* Smooth selection animation for likert options */
.likert-option input:checked + label {
  animation: selectPulse 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectPulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Progress bar smooth animation */
.progress-bar__fill {
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Utility classes */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
