/* =====================================================================
   Perfil Sistémico — estilos específicos
   Reutiliza paleta + tipografías del custom.css del sitio.
   ===================================================================== */

.ps-screen { transition: opacity .35s ease; }
.ps-hidden { display: none; }

/* ----- Portada: tarjetas meta ----- */
.ps-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.ps-meta-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: rgba(247, 241, 227, 0.7);
  border: 1px solid rgba(58, 36, 16, 0.10);
  border-radius: 12px;
  padding: .85rem 1.1rem;
  text-align: left;
  backdrop-filter: blur(4px);
}
.ps-meta-item i { font-size: 1.4rem; }

/* ----- Barra de progreso ----- */
.ps-progress { max-width: 100%; }
.ps-progress-track {
  height: 4px;
  background: rgba(58, 36, 16, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.ps-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c8201f 0%, #c9a96a 100%);
  border-radius: 999px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

/* ----- Tarjeta de pregunta ----- */
.ps-pregunta-card {
  background: rgba(247, 241, 227, 0.85);
  border: 1px solid rgba(58, 36, 16, 0.10);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px -12px rgba(58, 36, 16, 0.12);
  animation: ps-fade-in .35s ease;
}
@media (min-width: 640px) {
  .ps-pregunta-card { padding: 3rem 2.8rem; }
}
@keyframes ps-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ps-pregunta-numero {
  font-family: 'Inter Tight', sans-serif;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #8a6842;
  font-weight: 600;
  margin-bottom: .8rem;
}

.ps-pregunta-texto {
  font-family: 'Lora', serif;
  font-size: 1.45rem;
  line-height: 1.35;
  color: #3a2410;
  margin-bottom: 2rem;
  font-weight: 500;
}
@media (min-width: 640px) {
  .ps-pregunta-texto { font-size: 1.7rem; }
}

/* ----- Opciones (multi) ----- */
.ps-opciones { display: flex; flex-direction: column; gap: .7rem; }

.ps-opcion {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #fdfaf2;
  border: 1.5px solid rgba(58, 36, 16, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: left;
  font-family: 'Inter Tight', sans-serif;
  font-size: 1rem;
  color: #3a2410;
  width: 100%;
}
.ps-opcion:hover {
  border-color: #c8201f;
  background: #fff;
  transform: translateX(4px);
}
.ps-opcion-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(58, 36, 16, 0.30);
  flex-shrink: 0;
  position: relative;
  transition: all .2s ease;
}
.ps-opcion:hover .ps-opcion-marker { border-color: #c8201f; }
.ps-opcion.ps-selected {
  border-color: #c8201f;
  background: #fff;
}
.ps-opcion.ps-selected .ps-opcion-marker {
  border-color: #c8201f;
  background: #c8201f;
}
.ps-opcion.ps-selected .ps-opcion-marker::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ----- Escala 1-5 ----- */
.ps-escala {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin: 1rem 0 .7rem;
}
.ps-escala-btn {
  aspect-ratio: 1 / 1;
  border: 1.5px solid rgba(58, 36, 16, 0.20);
  border-radius: 12px;
  background: #fdfaf2;
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #3a2410;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-escala-btn:hover {
  border-color: #c8201f;
  color: #c8201f;
  transform: translateY(-2px);
}
.ps-escala-btn.ps-selected {
  border-color: #c8201f;
  background: #c8201f;
  color: #fff;
}
.ps-escala-labels {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(58, 36, 16, 0.60);
  font-style: italic;
  font-family: 'Inter', sans-serif;
}

/* ----- Spinner calculando ----- */
.ps-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(58, 36, 16, 0.15);
  border-top-color: #c8201f;
  border-radius: 50%;
  animation: ps-spin 1s linear infinite;
}
@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

/* ----- Resultado ----- */
.ps-resultado-hero {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(58, 36, 16, 0.12);
  margin-bottom: 2.5rem;
}
.ps-resultado-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #8a6842;
  font-weight: 600;
  margin-bottom: 1rem;
}
.ps-resultado-titulo {
  font-family: 'Lora', serif;
  font-size: 2.4rem;
  line-height: 1.1;
  color: #3a2410;
  font-weight: 600;
  margin-bottom: .5rem;
}
.ps-resultado-titulo em {
  color: #6b1e3a;
  font-style: italic;
}
@media (min-width: 640px) {
  .ps-resultado-titulo { font-size: 3rem; }
}
.ps-resultado-subtitulo {
  font-family: 'Lora', serif;
  font-style: italic;
  color: #5a3a22;
  font-size: 1.15rem;
  margin-bottom: 2rem;
}
.ps-resultado-imagen {
  max-width: 380px;
  width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: 14px;
  box-shadow: 0 12px 40px -12px rgba(58, 36, 16, 0.25);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #ecdfbe 0%, #c9a96a 100%);
}

.ps-seccion {
  margin-bottom: 2.5rem;
}
.ps-seccion-titulo {
  font-family: 'Inter Tight', sans-serif;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8a6842;
  font-weight: 700;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.ps-seccion-titulo::before {
  content: '';
  width: 28px;
  height: 1px;
  background: #c9a96a;
  display: inline-block;
}

.ps-diagnostico {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3a2410;
}
.ps-diagnostico p { margin-bottom: 1rem; }
.ps-diagnostico em {
  font-style: italic;
  color: #5a3a22;
}

.ps-cita {
  background: #fdfaf2;
  border-left: 3px solid #c8201f;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  font-family: 'Lora', serif;
  font-style: italic;
  color: #3a2410;
  font-size: 1.05rem;
  line-height: 1.6;
}
.ps-cita-fuente {
  display: block;
  font-style: normal;
  font-family: 'Inter Tight', sans-serif;
  font-size: .8rem;
  color: #8a6842;
  margin-top: .8rem;
  font-weight: 600;
}

.ps-senales {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
@media (min-width: 640px) {
  .ps-senales { grid-template-columns: repeat(3, 1fr); }
}
.ps-senal {
  background: #fdfaf2;
  border: 1px solid rgba(58, 36, 16, 0.12);
  border-radius: 12px;
  padding: 1.2rem;
  font-family: 'Inter Tight', sans-serif;
  font-size: .95rem;
  color: #3a2410;
  line-height: 1.5;
  position: relative;
}
.ps-senal::before {
  content: '✓';
  display: block;
  width: 24px;
  height: 24px;
  background: #c8201f;
  color: #fff;
  border-radius: 50%;
  font-size: .75rem;
  text-align: center;
  line-height: 24px;
  margin-bottom: .6rem;
  font-weight: 700;
}

.ps-cta-card {
  background: linear-gradient(135deg, #3a2410 0%, #5a3a22 100%);
  color: #f7f1e3;
  border-radius: 18px;
  padding: 2.2rem;
  text-align: center;
  margin: 2rem 0;
  border: 1px solid rgba(201, 169, 106, 0.30);
}
.ps-cta-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  margin-bottom: .6rem;
  color: #f7f1e3;
}
.ps-cta-card p {
  font-family: 'Inter Tight', sans-serif;
  color: rgba(247, 241, 227, 0.85);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.ps-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
}
.ps-cta-card .btn-rojo,
.ps-cta-card .btn-oro {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .95rem;
}

.ps-fuentes {
  background: rgba(247, 241, 227, 0.6);
  border: 1px solid rgba(58, 36, 16, 0.10);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: rgba(58, 36, 16, 0.75);
  line-height: 1.7;
}
.ps-fuentes ul { margin: .4rem 0 0 0; padding-left: 1.2rem; }
.ps-fuentes li { margin-bottom: .3rem; }

.ps-disclaimer {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: rgba(58, 36, 16, 0.65);
  font-style: italic;
  text-align: center;
  margin: 2rem 0 1rem;
  line-height: 1.6;
}

/* ----- Email opcional ----- */
.ps-email-card {
  background: #fdfaf2;
  border: 2px dashed rgba(201, 169, 106, 0.50);
  border-radius: 14px;
  padding: 1.8rem;
  margin: 2rem 0;
  text-align: center;
}
.ps-email-card h4 {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  color: #3a2410;
  margin-bottom: .4rem;
}
.ps-email-card p {
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  color: rgba(58, 36, 16, 0.75);
  margin-bottom: 1.2rem;
}
.ps-email-form {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}
.ps-email-input {
  flex: 1;
  min-width: 200px;
  padding: .8rem 1rem;
  border: 1.5px solid rgba(58, 36, 16, 0.20);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #3a2410;
  background: #fff;
}
.ps-email-input:focus {
  outline: none;
  border-color: #c8201f;
}
.ps-email-msg {
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
}
.ps-email-msg.ok { color: #5a7d3a; }
.ps-email-msg.err { color: #c8201f; }

/* ----- Compartir ----- */
.ps-share {
  display: flex;
  gap: .8rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.ps-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  background: #fdfaf2;
  border: 1px solid rgba(58, 36, 16, 0.15);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-size: .85rem;
  color: #3a2410;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.ps-share-btn:hover {
  background: #fff;
  border-color: #c8201f;
  color: #c8201f;
  transform: translateY(-2px);
}

/* ----- Reiniciar ----- */
.ps-reiniciar {
  text-align: center;
  margin-top: 2.5rem;
}
.ps-reiniciar a {
  font-family: 'Inter Tight', sans-serif;
  font-size: .85rem;
  color: rgba(58, 36, 16, 0.60);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}
.ps-reiniciar a:hover { color: #c8201f; }
