/* ============================================================
   ARC–IELP · sensor-style.css
   Instrumento de captura — mobile-first
   ============================================================ */
   @font-face {
    font-family: 'Jost';
    src: url('imagenes/fuentes/Jost/Jost-Light.woff2') format('woff2');
    font-weight: 300;
  }
  @font-face {
    font-family: 'Jost';
    src: url('imagenes/fuentes/Jost/Jost-Regular.woff2') format('woff2');
    font-weight: 400;
  }
  @font-face {
    font-family: 'Jost';
    src: url('imagenes/fuentes/Jost/Jost-Medium.woff2') format('woff2');
    font-weight: 500;
  }
  @font-face {
    font-family: 'Jost';
    src: url('imagenes/fuentes/Jost/Jost-SemiBold.woff2') format('woff2');
    font-weight: 600;
  }
:root {
  --verde:          #063927;
  --verde-alto:     #0B4D35;
  --verde-bajo:     #2F8C6B;
  --verde-marginal: #BFE5D8;
  --blanco:         #F7F9FA;
  --grafito:        #1F2933;
  --ambar:          #F0B300;
  --gris-claro:     #B0B7BD;
  --gris-medio:     #6B7780;
  --texto-cuerpo:   #3a4450;
  --texto-suave:    #4e5a66;
  --fondo:          #F3F5F3;
  --borde:          rgba(6,57,39,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--fondo);
  color: var(--grafito);
  line-height: 1.55;
  min-height: 100vh;
}


/* ── HEADER FIJO ─────────────────────────────────────────── */
.sensor-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  background: rgba(247,249,250,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
  padding: 0 24px;
  height: 56px;
}
.sensor-header-inner {
  max-width: 680px; margin: 0 auto;
  height: 100%; display: flex; align-items: center; gap: 14px;
}
.sensor-logo-mark { flex-shrink: 0; display: flex; align-items: center; }
.sensor-header-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--verde); flex-shrink: 0;
}
.sensor-progress-wrap {
  flex: 1; height: 2px; background: rgba(6,57,39,0.08);
  border-radius: 1px; overflow: hidden;
}
.sensor-progress-bar {
  height: 100%; width: 0%;
  background: var(--ambar);
  transition: width 0.6s ease;
}
.sensor-progress-label {
  font-size: 10px; font-weight: 500; color: var(--gris-medio);
  flex-shrink: 0; min-width: 36px; text-align: right;
}


/* ── MAIN ────────────────────────────────────────────────── */
.sensor-main { padding-top: 56px; min-height: 100vh; }


/* ── SCREENS ─────────────────────────────────────────────── */
.sensor-screen { display: none; min-height: calc(100vh - 56px); }
.sensor-screen.active { display: block; }
.sensor-screen-inner {
  max-width: 620px; margin: 0 auto;
  padding: 48px 24px 64px;
}


/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
.sensor-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--verde);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.sensor-eyebrow::before {
  content: ''; display: inline-block;
  width: 20px; height: 1px; background: var(--ambar);
}
.sensor-title {
  font-size: clamp(36px, 7vw, 54px); font-weight: 600;
  color: var(--grafito); letter-spacing: -0.025em;
  line-height: 1.05; margin-bottom: 24px;
}
.sensor-title-sm {
  font-size: clamp(26px, 5vw, 38px); font-weight: 600;
  color: var(--grafito); letter-spacing: -0.02em;
  line-height: 1.1; margin-bottom: 20px;
}
.sensor-body {
  font-size: 15px; font-weight: 400; color: var(--texto-suave);
  line-height: 1.72; margin-bottom: 32px;
}


/* ── CAMPOS ──────────────────────────────────────────────── */
.sensor-field-wrap { margin-bottom: 24px; }
.sensor-label {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gris-medio); margin-bottom: 8px;
}
.sensor-input {
  width: 100%; padding: 14px 16px;
  font-family: 'Jost', sans-serif; font-size: 15px; font-weight: 400;
  border: 1px solid var(--borde); background: var(--blanco);
  color: var(--grafito); outline: none; transition: border-color 0.2s;
}
.sensor-input:focus { border-color: var(--verde); }
.sensor-input-token {
  font-size: 18px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.sensor-select {
  width: 100%; padding: 12px 16px;
  font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 400;
  border: 1px solid var(--borde); background: var(--blanco);
  color: var(--grafito); outline: none; appearance: none;
  cursor: pointer; transition: border-color 0.2s;
}
.sensor-select:focus { border-color: var(--verde); }
.sensor-error {
  font-size: 12px; font-weight: 500; color: #c0392b;
  margin-top: 8px; display: none;
}
.sensor-error.visible { display: block; }


/* ── RADIO GRUPOS ────────────────────────────────────────── */
.sensor-radio-group { display: flex; flex-direction: column; gap: 6px; }
.sensor-radio-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--blanco); border: 1px solid var(--borde);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  font-size: 14px; font-weight: 400; color: var(--texto-cuerpo);
}
.sensor-radio-item:hover {
  border-color: var(--verde-bajo);
  background: rgba(6,57,39,0.02);
}
.sensor-radio-item input[type="radio"] {
  appearance: none; width: 16px; height: 16px; flex-shrink: 0;
  border: 1.5px solid var(--gris-claro); border-radius: 50%;
  transition: all 0.2s;
}
.sensor-radio-item input[type="radio"]:checked {
  border-color: var(--verde); background: var(--verde);
  box-shadow: inset 0 0 0 3px var(--blanco);
}
.sensor-radio-item:has(input:checked) {
  border-color: var(--verde);
  background: rgba(6,57,39,0.04);
}


/* ── ÉTICA ───────────────────────────────────────────────── */
.sensor-ethics-block {
  background: var(--blanco); border: 1px solid var(--borde);
  border-left: 3px solid var(--verde);
  padding: 24px 22px; margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.sensor-ethics-block p {
  font-size: 15px; font-weight: 400; color: var(--texto-cuerpo);
  line-height: 1.72;
}
.sensor-ethics-block strong { font-weight: 600; color: var(--grafito); }
.sensor-ethics-accent {
  font-size: 14px; font-weight: 500; color: var(--verde) !important;
  padding-top: 8px; border-top: 1px solid var(--borde);
}
.sensor-ethics-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.sensor-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--verde);
  border: 1px solid rgba(6,57,39,0.15); padding: 4px 10px;
  background: rgba(6,57,39,0.03);
}


/* ════════════════════════════════════════════════════════════
   NARRATIVE HEADER — bloque verde animado
   ════════════════════════════════════════════════════════════ */
.narrative-header {
  background: var(--verde);
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  position: relative; overflow: hidden;
}

/* Textura sutil de fondo */
.narrative-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(191,229,216,0.04) 48px,
      rgba(191,229,216,0.04) 49px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(191,229,216,0.03) 48px,
      rgba(191,229,216,0.03) 49px
    );
  pointer-events: none;
}

.narrative-inner {
  max-width: 560px; width: 100%;
  position: relative; z-index: 1;
}

/* Fila del punto + label de sección */
.narrative-dot-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}

.narrative-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(191,229,216,0.6);
  /* Oculto inicialmente — aparece con el texto */
  opacity: 0;
  transition: opacity 0.4s ease 1.8s;
}
.narrative-section-label.visible { opacity: 1; }

/* ── EL PUNTO ÁMBAR ── */
.narrative-dot {
  width: 10px; height: 10px;
  background: var(--ambar);
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  /* Estado inicial: pulsa lento */
  animation: dotPulse 1.2s ease-in-out infinite;
}
/* Cuando el texto ya apareció, el punto se estabiliza */
.narrative-dot.settled {
  animation: dotSettle 0.4s ease forwards;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0 rgba(240,179,0,0.5); }
  50%       { opacity: 0.5; transform: scale(0.7);  box-shadow: 0 0 0 6px rgba(240,179,0,0); }
}
@keyframes dotSettle {
  0%   { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(1);   opacity: 1;   box-shadow: 0 0 0 0 transparent; }
}

/* ── EL TEXTO NARRATIVO ── */
.narrative-text {
  font-size: clamp(20px, 4vw, 28px); font-weight: 400;
  color: var(--blanco); line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
  /* Estado inicial: invisible y desplazado */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.narrative-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BOTÓN DEL HEADER ── */
.sensor-btn-outline {
  background: transparent !important;
  color: var(--blanco) !important;
  border: 1px solid rgba(247,249,250,0.3) !important;
  /* Oculto inicialmente */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease 2.4s, transform 0.5s ease 2.4s,
              background 0.2s, border-color 0.2s !important;
}
.sensor-btn-outline.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.sensor-btn-outline:hover {
  background: rgba(247,249,250,0.1) !important;
  border-color: rgba(247,249,250,0.6) !important;
}


/* ── BOTONES ─────────────────────────────────────────────── */
.sensor-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 24px;
  background: var(--verde); color: var(--blanco);
  font-family: 'Jost', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: none; cursor: pointer; transition: background 0.2s;
  margin-top: 8px;
}
.sensor-btn:hover { background: var(--verde-alto); }
.sensor-btn-arrow { font-size: 16px; font-weight: 300; }
.sensor-btn-ghost {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px 24px;
  background: transparent; color: var(--gris-medio);
  font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--borde); cursor: pointer;
  transition: all 0.2s; margin-top: 6px;
}
.sensor-btn-ghost:hover { border-color: var(--gris-medio); color: var(--grafito); }
.sensor-btn-group { display: flex; flex-direction: column; gap: 0; }


/* ── PREGUNTAS LIKERT ────────────────────────────────────── */
.sensor-questions-block {
  display: flex; flex-direction: column; gap: 20px; margin-bottom: 8px;
}
.sensor-question-item {
  background: var(--blanco); border: 1px solid var(--borde);
  padding: 20px 18px;
  opacity: 0;
  animation: fadeSlide 0.35s ease forwards;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sensor-question-num {
  font-size: 9px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gris-claro); margin-bottom: 8px;
}
.sensor-question-text {
  font-size: 15px; font-weight: 400; color: var(--texto-cuerpo);
  line-height: 1.6; margin-bottom: 18px;
}
.sensor-likert-row { display: flex; gap: 4px; }
.sensor-likert-opt {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px; cursor: pointer;
}
.sensor-likert-opt input[type="radio"] { display: none; }
.sensor-likert-btn {
  width: 100%; aspect-ratio: 1; max-width: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--borde); background: var(--fondo);
  font-size: 14px; font-weight: 500; color: var(--gris-medio);
  transition: all 0.18s; border-radius: 2px;
}
.sensor-likert-opt:hover .sensor-likert-btn {
  border-color: var(--verde-bajo); color: var(--verde);
  background: rgba(6,57,39,0.04);
}
.sensor-likert-opt input:checked ~ .sensor-likert-btn {
  background: var(--verde); border-color: var(--verde); color: var(--blanco);
}
.sensor-likert-label {
  font-size: 9px; font-weight: 500; color: var(--gris-claro);
  text-align: center; line-height: 1.2;
}
.sensor-likert-instructions {
  font-size: 13px; font-weight: 400; color: var(--gris-medio);
  margin-bottom: 24px; line-height: 1.6;
}
.sensor-likert-scale-hint {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--gris-claro); margin-top: 4px;
}


/* ── PREGUNTA ABIERTA ────────────────────────────────────── */
.sensor-textarea {
  width: 100%; padding: 14px 16px;
  font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 400;
  border: 1px solid var(--borde); background: var(--blanco);
  color: var(--grafito); outline: none; resize: vertical;
  line-height: 1.65; min-height: 120px; margin-bottom: 16px;
  transition: border-color 0.2s;
}
.sensor-textarea:focus { border-color: var(--verde); }
.sensor-textarea::placeholder { color: var(--gris-claro); }


/* ── ENVIANDO ────────────────────────────────────────────── */
.sensor-sending {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: 24px;
}
.sensor-spinner {
  width: 40px; height: 40px;
  border: 2px solid rgba(6,57,39,0.1);
  border-top-color: var(--verde);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sensor-sending-label {
  font-size: 13px; font-weight: 400; color: var(--gris-medio);
  letter-spacing: 0.04em;
}


/* ── CIERRE ──────────────────────────────────────────────── */
.sensor-close-screen {
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  min-height: 60vh;
}
.sensor-close-mark { margin-bottom: 28px; animation: fadeSlide 0.5s ease forwards; }
.sensor-close-note {
  font-size: 11px; font-weight: 400; color: var(--gris-claro);
  line-height: 1.7; margin-top: 28px;
  padding-top: 20px; border-top: 1px solid var(--borde);
}


/* ── SPINNER INLINE (validación token) ──────────────────── */
.sensor-spinner-inline {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(247,249,250,0.3);
  border-top-color: var(--blanco);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .sensor-header-label { display: none; }
  .narrative-header { padding: 36px 20px; }
  .narrative-text { font-size: clamp(18px, 5vw, 24px); }
  .sensor-screen-inner { padding: 36px 18px 52px; }
  .sensor-likert-btn { font-size: 13px; }
  .sensor-likert-label { font-size: 8px; }
}
