/* ══════════════════════════════════════════
   VALORACION PAGE — CSS
   Sigue el mismo design system que contacto.css
   ══════════════════════════════════════════ */

/* Override del reveal global: en esta pagina siempre visible */
.val-page .reveal,
.val-page .reveal.delay-1 {
  opacity: 1 !important;
  transform: none !important;
}

.val-page {
  min-height: 100vh;
  padding-bottom: 6rem;
}

#bg-canvas {
  opacity: 0.3;
}

/* ── Layout principal ── */
.val-wrap {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 9rem 3rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 5rem;
  align-items: start;
}

.val-left,
.val-form-col {
  min-width: 0;
}

/* ── Kicker ── */
.val-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--v2);
  margin-bottom: 1rem;
}

.val-kicker::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--v2);
}

/* ── H1 ── */
.val-left h1 {
  font-family: var(--head);
  font-size: clamp(2.8rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.val-grad {
  background: linear-gradient(135deg, var(--v2), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Descripcion ── */
.val-desc {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* ── Trust items ── */
.val-trust {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.val-trust-item {
  background: var(--bg2);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.val-trust-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: var(--vd);
  color: var(--v2);
}

.val-trust-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.val-trust-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  text-transform: uppercase;
}

.val-trust-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text1);
}

/* ── Quote card ── */
.val-quote-card {
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--bg2);
  margin-bottom: 1.5rem;
}

.val-quote-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--v2);
  margin-bottom: 0.75rem;
}

.val-quote-copy {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 1rem;
}

.val-quote-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.val-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--text2);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.03);
}

/* ── Privacy note ── */
.val-privacy-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text3);
  line-height: 1.6;
}

.val-privacy-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   FORMULARIO CARD
═══════════════════════════════════════ */
.val-form-card {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2.5rem;
}

.val-form-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.08), transparent 70%);
  pointer-events: none;
}

/* ── Heading interno ── */
.val-form-heading {
  font-family: var(--head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--text1);
}

/* ── Sección label (estilo mono) ── */
.val-section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: #b8b8d0;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* ══════════════════
   ESTRELLAS
══════════════════ */
.val-stars-group {
  margin-bottom: 2rem;
}

.val-stars {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.val-star {
  font-size: 2.2rem;
  color: var(--border2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
  -webkit-appearance: none;
  position: relative;
}

.val-star:hover,
.val-star.hovered,
.val-star.selected {
  color: #f59e0b;
  transform: scale(1.18);
}

.val-star.selected {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.val-stars-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  min-height: 1em;
  transition: color 0.2s ease;
}

.val-stars-label.active {
  color: #f59e0b;
}

/* ══════════════════
   INPUTS / FORM
══════════════════ */
.val-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.val-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.val-form-group--message {
  margin-bottom: 0.5rem;
}

.val-form-group label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: #b8b8d0;
  text-transform: uppercase;
}

/* URL con prefijo */
.val-url-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.val-url-prefix {
  position: absolute;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text3);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

.val-url-wrap input[type="url"] {
  padding-left: 5.5rem;
}

/* Inputs generales */
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: var(--body);
  font-size: 0.88rem;
  color: var(--text1);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
}

input[type="text"],
input[type="email"],
input[type="url"] {
  min-height: 48px;
}

input:focus,
textarea:focus {
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--bg4);
}

input::placeholder,
textarea::placeholder {
  color: #8f8fa6;
}

textarea {
  resize: none;
  min-height: 130px;
  line-height: 1.75;
}

.field-invalid {
  border-color: rgba(248, 113, 113, 0.5) !important;
}

/* Contador de caracteres */
.val-char-count {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text3);
  text-align: right;
  margin-top: 0.3rem;
}

/* ══════════════════
   CHIPS DE SERVICIO
══════════════════ */
.val-service-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.5rem;
}

.val-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  color: var(--v2);
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  text-align: center;
}

.val-chip:hover {
  color: #fff;
  background: var(--v2);
  border-color: var(--v);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.val-chip.selected {
  color: #fff;
  border-color: var(--v);
  background: var(--v);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

/* ══════════════════
   FORM FOOTER
══════════════════ */
.val-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.val-form-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #b2b2c8;
  line-height: 1.72;
  max-width: 200px;
}

.val-form-note a {
  color: var(--v2);
  text-decoration: none;
}

.val-form-note a:hover {
  color: var(--v3);
}

.val-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 10px;
  background: var(--v);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.val-btn-submit:hover {
  background: var(--v2);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.val-btn-submit.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ══════════════════
   ESTADO DE EXITO
══════════════════ */
.val-success {
  display: none; /* oculto por defecto; JS lo activa */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  min-height: 420px;
}

/* cuando JS elimina el hidden y lo muestra */
.val-success.visible {
  display: flex;
}

.val-success-stars {
  display: flex;
  gap: 0.4rem;
  font-size: 1.6rem;
  color: #f59e0b;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.45));
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.val-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teald);
  border: 1px solid rgba(45, 212, 191, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.val-success-title {
  font-family: var(--head);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.val-success-desc {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.75;
  max-width: 320px;
}

.val-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--teal);
  background: var(--teald);
  border: 1px solid rgba(45, 212, 191, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-top: 1.25rem;
}

/* ══════════════════
   DELAY
══════════════════ */
.delay-1 {
  transition-delay: 0.1s;
}

/* ══════════════════
   RESPONSIVE
══════════════════ */
@media (max-width: 1080px) {
  .val-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .val-left h1 {
    max-width: 12ch;
  }
}

@media (max-width: 860px) {
  .val-wrap {
    padding-top: 7.5rem;
    padding-bottom: 4.5rem;
  }

  .val-form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .val-form-card {
    padding: 1.75rem;
  }
}

@media (max-width: 640px) {
  .val-wrap {
    padding: 7.5rem 1rem 4rem;
    gap: 2.5rem;
  }

  .val-left h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
    max-width: none;
  }

  .val-desc {
    margin-bottom: 2rem;
  }

  .val-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .val-form-note,
  .val-btn-submit {
    max-width: none;
    width: 100%;
  }

  .val-btn-submit {
    justify-content: center;
  }

  .val-success {
    min-height: 340px;
    padding: 2rem 1rem;
  }

  .val-star {
    font-size: 1.8rem;
  }

  .val-service-chips {
    grid-template-columns: repeat(2, 1fr);
  }
}
