/* ═══════════════════════════════════════════════════════════
   LUMINA · SKINCARE PROFILER
   Design System & Stylesheet
   
   Wix Migration Note: CSS variables map to Wix Studio Design Tokens
   Font: Cormorant Garamond (display) + Montserrat (body)
   Aesthetic: Luxury editorial skincare · Warm champagne neutrals
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Colors */
  --cream-50:  #E0C0A0; /* Fondos */
  --cream-100: #F5F1EB; /* Detalles / Secciones secundarias */
  --cream-200: #E5D9C9;
  --cream-300: #D4BFA4;
  --sand-400:  #9E9A98; /* Tipografías menores / Deshabilitados */
  --sand-500:  #9E9A98; /* Tipografías menores */
  --rose-400:  #BEA285;
  --rose-500:  #9E9A98; /* Tipografías menores (Acentos suaves) */
  --rose-600:  #5C3D2A;
  --brown-900: #050505; /* Títulos / Texto principal */
  --brown-800: #1A1208;
  --brown-700: #3E2617;
  --sage-400:  #8BA89A;
  --sage-500:  #6E9185;
  --gold-400:  #9E9A98;
  --gold-500:  #050505;
  --dark-bg:   #050505; /* Fondos oscuros */
  --dark-card: #1A1208;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Montserrat', sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(5,5,5,0.06), 0 1px 2px rgba(5,5,5,0.04);
  --shadow-md:  0 4px 20px rgba(5,5,5,0.08), 0 2px 8px rgba(5,5,5,0.05);
  --shadow-lg:  0 10px 40px rgba(5,5,5,0.12), 0 4px 16px rgba(5,5,5,0.06);
  --shadow-xl:  0 20px 60px rgba(5,5,5,0.16), 0 8px 24px rgba(5,5,5,0.08);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::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;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 300; /* Montserrat Light por defecto */
  color: var(--brown-900);
  /* Gradiente multicapa sofisticado que imita el estudio fotográfico de referencia */
  background: radial-gradient(circle at 50% 43%, #FFFDFB 0%, #FDF9F3 35%, #EADDC9 75%, #DFCDBC 100%);
  min-height: 100dvh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
ul { list-style: none; }

/* ─── NOISE OVERLAY ──────────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.018; /* Grano ultra fino y sutil */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ─── STEPS ──────────────────────────────────────────────── */
.step {
  display: none;
  min-height: 100dvh;
  position: relative;
}

.step.active {
  display: flex;
  flex-direction: column;
}

/* ─── BRAND ELEMENTS ─────────────────────────────────────── */
.brand-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg) var(--space-xl);
  z-index: 10;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--brown-900);
}

.brand-logo--small {
  position: static;
  padding: 0;
}

.brand-mark {
  font-size: 1rem;
  color: var(--gold-500);
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--brown-900);
  color: var(--cream-100); /* Detalles sobre fondo oscuro */
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500; /* Regular */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
  transition: background var(--duration-fast) var(--ease-smooth),
              transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn-primary:hover:not(:disabled) {
  background: #1f1f1f;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover:not(:disabled)::before { opacity: 1; }
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
  background: var(--cream-200);
  color: var(--sand-400);
  cursor: not-allowed;
}

.btn-primary.btn-large {
  font-size: 0.9rem;
  padding: 1.05rem 2.5rem;
}

.btn-primary.btn-full {
  width: 100%;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.btn-primary:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--brown-900);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--sand-400);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.btn-ghost:hover {
  background: var(--cream-100);
  border-color: var(--brown-900);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--brown-900);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--brown-900);
  background: transparent;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.btn-outline:hover {
  background: var(--brown-900);
  color: var(--cream-100);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

/* ─── WELCOME SCREEN ─────────────────────────────────────── */
#step-welcome {
  background: transparent; /* Permite ver el degradado sofisticado del body */
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.welcome-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px); /* Aumentado a 140px para transiciones ultra suaves y sin bordes duros */
  mix-blend-mode: multiply; /* Fusión realista de colores tipo piel/cosmética */
  opacity: 0.75;
}

.orb-1 {
  width: 750px;
  height: 750px;
  /* Tonos champagne cálidos */
  background: radial-gradient(circle, rgba(229,217,201,0.4) 0%, rgba(212,191,164,0.15) 50%, transparent 75%);
  top: -250px;
  right: -150px;
  animation: orb-float 20s ease-in-out infinite;
}

.orb-2 {
  width: 650px;
  height: 650px;
  /* Tonos rose/tierra suaves tomados de tu paleta */
  background: radial-gradient(circle, rgba(196,154,134,0.25) 0%, rgba(176,124,104,0.08) 55%, transparent 75%);
  bottom: -180px;
  left: -120px;
  animation: orb-float 24s ease-in-out infinite reverse;
}

.orb-3 {
  width: 550px;
  height: 550px;
  /* Brillo de iluminación central sutil */
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(245,241,235,0.1) 60%, transparent 80%);
  top: 20%;
  left: 15%;
  animation: orb-float 16s ease-in-out infinite 3s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(35px, -45px) scale(1.06); }
  66% { transform: translate(-25px, 25px) scale(0.96); }
}

.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: calc(var(--space-3xl) + 60px) var(--space-xl) var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  animation: fade-up 0.8s var(--ease-out) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-500);
  animation: fade-up 0.8s var(--ease-out) 0.1s both;
}

.eyebrow-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brown-900);
  flex-shrink: 0;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--brown-900);
  letter-spacing: -0.01em;
  animation: fade-up 0.8s var(--ease-out) 0.15s both;
}

.welcome-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brown-900);
}

.welcome-subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--brown-900);
  font-weight: 300; /* Light */
  animation: fade-up 0.8s var(--ease-out) 0.2s both;
}

.welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--brown-900);
  animation: fade-up 0.8s var(--ease-out) 0.25s both;
}

.welcome-features span { display: flex; align-items: center; gap: var(--space-xs); }

#btn-comenzar {
  width: fit-content;
  animation: fade-up 0.8s var(--ease-out) 0.3s both;
}

.welcome-disclaimer-note {
  font-size: 0.7rem;
  color: var(--sand-500);
  letter-spacing: 0.04em;
  animation: fade-up 0.8s var(--ease-out) 0.35s both;
}

/* Welcome visual decoration */
.welcome-visual {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  z-index: 1;
  animation: fade-up 1s var(--ease-out) 0.4s both;
}

.visual-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 220px; height: 220px;
  border-color: rgba(158,154,152,0.2);
  animation: ring-pulse 3s ease-in-out infinite;
}
.ring-2 {
  width: 170px; height: 170px;
  border-color: rgba(158,154,152,0.3);
  animation: ring-pulse 3s ease-in-out infinite 0.5s;
}
.ring-3 {
  width: 120px; height: 120px;
  border-color: rgba(158,154,152,0.4);
  animation: ring-pulse 3s ease-in-out infinite 1s;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
}

.visual-face-card {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 96px;
  background: var(--cream-100);
  border: 1px solid var(--sand-400);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.face-scan-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brown-900), transparent);
  animation: scan-down 2.5s ease-in-out infinite;
}

@keyframes scan-down {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.face-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.face-dots span {
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--sand-400);
  opacity: 0.6;
  animation: dot-blink 2s ease-in-out infinite;
}

.face-dots span:nth-child(2) { animation-delay: 0.3s; }
.face-dots span:nth-child(3) { animation-delay: 0.6s; }
.face-dots span:nth-child(4) { animation-delay: 0.1s; }
.face-dots span:nth-child(5) { animation-delay: 0.8s; }
.face-dots span:nth-child(6) { animation-delay: 0.4s; }
.face-dots span:nth-child(7) { animation-delay: 0.7s; }
.face-dots span:nth-child(8) { animation-delay: 0.2s; }
.face-dots span:nth-child(9) { animation-delay: 0.9s; }

@keyframes dot-blink {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.face-label {
  font-size: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown-900);
  text-align: center;
}

/* ─── DISCLAIMER MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 5, 5, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fade-in var(--duration-base) var(--ease-smooth) both;
}

.modal-overlay[hidden] { display: none; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--cream-50);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modal-in var(--duration-base) var(--ease-spring) both;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--cream-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-900);
}

.modal-icon svg { width: 22px; height: 22px; }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--brown-900);
  letter-spacing: -0.01em;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--cream-100);
  border-radius: var(--radius-md);
  border: 1px solid var(--sand-400);
}

.modal-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--brown-900);
}

.modal-body strong {
  color: var(--brown-900);
  font-weight: 600;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--sand-400);
  border-radius: var(--radius-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-smooth);
  margin-top: 1px;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--brown-900);
  border-color: var(--brown-900);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 1.5px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--brown-900);
  line-height: 1.4;
}

/* ─── STEP INNER LAYOUT ──────────────────────────────────── */
.step-inner {
  width: 100%;
  padding: calc(var(--space-3xl) + 60px) var(--space-xl) var(--space-3xl);
  animation: fade-up 0.6s var(--ease-out) both;
}

.step-inner--narrow {
  max-width: 460px;
  margin: 0 auto;
}

.step-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-500);
  margin-bottom: var(--space-md);
}

.step-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: var(--brown-900);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.step-title em {
  font-style: italic;
  color: var(--brown-900);
}

.step-subtitle {
  font-size: 0.9375rem;
  color: var(--brown-900);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: var(--space-xl);
}

/* ─── FORM ───────────────────────────────────────────────── */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brown-900);
}

.form-input {
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--sand-400);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--brown-900);
  background: white;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth);
}

.form-input::placeholder { color: var(--sand-400); }

.form-input:focus {
  border-color: var(--sand-500);
  box-shadow: 0 0 0 3px rgba(158,154,152,0.12);
}

.form-input.error {
  border-color: #E07070;
  box-shadow: 0 0 0 3px rgba(224,112,112,0.1);
}

.form-error {
  font-size: 0.78rem;
  color: #C05050;
  font-weight: 500;
  min-height: 1.1em;
  display: block;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--sand-500);
  justify-content: center;
}

/* ─── UPLOAD ─────────────────────────────────────────────── */
.upload-tips {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tip-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--brown-900);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--cream-100);
  border: 1px solid var(--sand-400);
}

.tip-icon { font-size: 1rem; flex-shrink: 0; line-height: 1; }

.upload-area {
  border: 2px dashed var(--sand-400);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  background: var(--cream-100);
  position: relative;
  margin-bottom: var(--space-xl);
  text-align: center;
}

.upload-area:hover, .upload-area:focus-within {
  border-color: var(--brown-900);
  background: white;
  box-shadow: 0 0 0 4px rgba(5,5,5,0.05);
}

.upload-area.drag-over {
  border-color: var(--brown-900);
  background: rgba(245,241,235,0.3);
  transform: scale(1.01);
}

.upload-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--sand-400);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand-500);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.upload-icon svg { width: 24px; height: 24px; }

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-text strong {
  font-size: 0.9375rem;
  color: var(--brown-900);
  font-weight: 500;
}

.upload-text span {
  font-size: 0.8125rem;
  color: var(--sand-500);
  letter-spacing: 0.04em;
}

#file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Preview */
.preview-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  position: relative;
  background: var(--cream-200);
}

.preview-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.preview-overlay {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
}

/* ─── PROCESSING SCREEN ──────────────────────────────────── */
#step-processing {
  background: var(--dark-bg);
  color: var(--cream-100);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.processing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.processing-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.p1 { width: 400px; height: 400px; background: radial-gradient(circle, var(--sand-400), transparent 70%); top: -100px; right: -100px; animation: orb-float 12s ease-in-out infinite; }
.p2 { width: 300px; height: 300px; background: radial-gradient(circle, var(--cream-100), transparent 70%); bottom: -80px; left: -60px; animation: orb-float 15s ease-in-out infinite reverse; }
.p3 { width: 200px; height: 200px; background: radial-gradient(circle, var(--sand-500), transparent 70%); top: 40%; left: 10%; animation: orb-float 10s ease-in-out infinite 2s; }
.p4 { width: 250px; height: 250px; background: radial-gradient(circle, var(--brown-900), transparent 70%); top: 20%; right: 15%; animation: orb-float 13s ease-in-out infinite 4s; }

.processing-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
  padding: var(--space-xl);
  text-align: center;
  max-width: 420px;
}

/* Scanner animation */
.processing-scanner {
  width: 180px;
  height: 180px;
  position: relative;
}

.scanner-face {
  width: 100%; height: 100%;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.scanner-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(158,154,152,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158,154,152,0.1) 1px, transparent 1px);
  background-size: 24px 24px;
}

.scanner-beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cream-100), transparent);
  box-shadow: 0 0 12px var(--cream-100);
  animation: beam-scan 2.5s ease-in-out infinite;
}

@keyframes beam-scan {
  0% { top: -2px; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.scanner-corners { position: absolute; inset: 0; }

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--cream-100);
  border-style: solid;
}

.corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.processing-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
}

.processing-message {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 300;
  color: var(--cream-100);
  min-height: 2em;
  transition: opacity 0.4s ease;
  letter-spacing: 0.01em;
}

.processing-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.processing-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sand-400), var(--cream-100));
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-smooth);
  box-shadow: 0 0 8px var(--cream-100);
}

.processing-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── RESULTS ────────────────────────────────────────────── */
#step-results {
  background: var(--cream-50);
}

.results-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(224,192,160,0.85); /* Coincide con fondo base con transparencia */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-100);
}

.results-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-hero {
  background: linear-gradient(160deg, var(--dark-bg) 0%, var(--dark-card) 100%);
  padding: var(--space-3xl) 0;
}

.results-hero .brand-logo { color: var(--cream-100); display: none; }

.results-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.results-profile-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  align-items: start;
  backdrop-filter: blur(12px);
  margin-bottom: var(--space-lg);
  animation: fade-up 0.7s var(--ease-out) both;
}

.profile-avatar-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-100);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.avatar-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(245,241,235,0.3);
  animation: ring-pulse 2.5s ease-in-out infinite;
}

.avatar-icon {
  font-size: 1.5rem;
  color: var(--cream-100);
}

.profile-card-content { color: var(--cream-100); }

.profile-greeting {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-400);
  margin-bottom: var(--space-xs);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--cream-100);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.profile-summary {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(245,241,235,0.8);
  font-weight: 300;
}

.profile-card-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.profile-tag {
  padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cream-100);
  text-transform: uppercase;
}

.results-disclaimer-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.72rem;
  color: rgba(245,241,235,0.4);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* Results sections */
.results-section {
  padding: var(--space-3xl) 0;
}

.results-section--tinted {
  background: var(--cream-100);
}

.results-section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.section-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--sand-400);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--brown-900);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--brown-900);
  font-weight: 300;
  line-height: 1.5;
}

/* Indicators grid */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.indicator-card {
  background: white;
  border: 1px solid var(--sand-400);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth);
  animation: fade-up 0.6s var(--ease-out) both;
}

.indicator-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.indicator-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.indicator-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.indicator-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-alta, .badge-alto   { background: rgba(5,5,5,0.08); color: var(--brown-900); }
.badge-media, .badge-medio { background: rgba(158,154,152,0.15); color: var(--sand-500); }
.badge-baja, .badge-bajo, .badge-bajos, .badge-leves, .badge-buena { background: rgba(245,241,235,0.5); border: 1px solid var(--sand-400); color: var(--sand-500); }
.badge-moderados, .badge-moderada { background: rgba(5,5,5,0.05); color: var(--brown-900); }
.badge-altos { background: rgba(5,5,5,0.12); color: var(--brown-900); }

.indicator-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--brown-900);
  letter-spacing: 0.01em;
}

.indicator-bar-track {
  height: 3px;
  background: var(--cream-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.indicator-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1s var(--ease-out) 0.3s;
}

.fill-alta, .fill-alto, .fill-altos   { background: linear-gradient(90deg, var(--brown-900), var(--sand-500)); }
.fill-media, .fill-medio { background: linear-gradient(90deg, var(--sand-500), var(--sand-400)); }
.fill-baja, .fill-bajo, .fill-bajos, .fill-leves, .fill-buena  { background: linear-gradient(90deg, var(--sand-400), var(--cream-100)); }
.fill-moderados, .fill-moderada { background: linear-gradient(90deg, var(--sand-500), var(--cream-100)); }

.indicator-desc {
  font-size: 0.8125rem;
  color: var(--sand-500);
  line-height: 1.55;
  font-weight: 300;
}

/* Routine */
.routine-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.routine-step {
  background: white;
  border: 1px solid var(--sand-400);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.6s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}

.routine-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sand-400), var(--brown-900));
}

.routine-step-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--cream-100);
  line-height: 1;
  letter-spacing: -0.02em;
}

.routine-step-icon { font-size: 1.5rem; line-height: 1; }

.routine-step-name {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-500);
}

.routine-step-products {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.routine-product {
  font-size: 0.8125rem;
  color: var(--brown-900);
  font-weight: 400;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.routine-product::before {
  content: '·';
  color: var(--sand-400);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Products carousel */
.products-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: white;
  border: 1px solid var(--sand-400);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth);
  animation: fade-up 0.6s var(--ease-out) both;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  aspect-ratio: 1;
  background: var(--cream-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--cream-100), var(--cream-50));
}

.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--brown-900);
  color: var(--cream-100);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.product-info {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.product-tag-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand-500);
}

.product-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--brown-900);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--brown-900);
  line-height: 1.5;
  font-weight: 300;
}

.product-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown-900);
  margin-top: auto;
  padding-top: var(--space-sm);
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem;
  background: var(--cream-100);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown-900);
  border-top: 1px solid var(--sand-400);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.product-cta:hover {
  background: var(--brown-900);
  color: var(--cream-100);
}

/* Footer CTA */
.results-footer-cta {
  background: linear-gradient(160deg, var(--cream-100), var(--cream-50));
  padding: var(--space-3xl) 0;
  text-align: center;
  border-top: 1px solid var(--sand-400);
}

.cta-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--brown-900);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.cta-subtitle {
  font-size: 0.9375rem;
  color: var(--brown-900);
  font-weight: 300;
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .welcome-visual { display: none; }

  .welcome-content {
    padding: calc(var(--space-3xl) + 80px) var(--space-md) var(--space-2xl);
  }

  .welcome-title { font-size: 2.4rem; }
  .welcome-features { flex-direction: column; gap: var(--space-xs); }

  #btn-comenzar { width: 100%; justify-content: center; }

  .step-inner { padding: calc(var(--space-2xl) + 60px) var(--space-md) var(--space-2xl); }

  .modal-card { padding: var(--space-xl); border-radius: var(--radius-lg); }

  .results-profile-card {
    grid-template-columns: 1fr;
  }

  .indicators-grid { grid-template-columns: 1fr 1fr; }

  .routine-container { grid-template-columns: 1fr 1fr; }

  .products-carousel { grid-template-columns: repeat(2, 1fr); }

  .cta-buttons { flex-direction: column; align-items: center; }
  .btn-outline { width: 100%; max-width: 260px; }
}

@media (max-width: 480px) {
  .indicators-grid { grid-template-columns: 1fr; }
  .routine-container { grid-template-columns: 1fr; }
  .products-carousel { grid-template-columns: 1fr; }
  .welcome-title { font-size: 2rem; }
}

/* ─── SCROLL ANIMATIONS ──────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for cards */
.indicator-card:nth-child(1) { animation-delay: 0.05s; }
.indicator-card:nth-child(2) { animation-delay: 0.1s; }
.indicator-card:nth-child(3) { animation-delay: 0.15s; }
.indicator-card:nth-child(4) { animation-delay: 0.2s; }
.indicator-card:nth-child(5) { animation-delay: 0.25s; }
.indicator-card:nth-child(6) { animation-delay: 0.3s; }

.routine-step:nth-child(1) { animation-delay: 0.05s; }
.routine-step:nth-child(2) { animation-delay: 0.1s; }
.routine-step:nth-child(3) { animation-delay: 0.15s; }
.routine-step:nth-child(4) { animation-delay: 0.2s; }

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* ─── UTILITY ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}