/* Drop Shop — bloque company (Fase C). Estilos para Nosotros y Contacto. */

/* ════════════════════════════════════════════
   1. NOSOTROS: TEXT REVEAL
   ════════════════════════════════════════════ */
.text-reveal {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
  max-width: 900px;
  margin: 0 auto;
  padding: 26vh 20px;
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box;
}

.text-reveal-p {
  display: inline;
  margin: 0;
  padding: 0;
}

.tr-word {
  display: inline-block;
  opacity: 0.15;
  color: var(--ink);
  transition: opacity 0.1s linear;
  will-change: opacity;
}

/* ════════════════════════════════════════════
   2. NOSOTROS: TIMELINE
   ════════════════════════════════════════════ */
.about-timeline-section {
  margin: 64px 0 48px 0;
  position: relative;
  box-sizing: border-box;
}

.about-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 0 48px 0;
  box-sizing: border-box;
}

.tl-beam {
  position: absolute;
  left: 220px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.tl-beam-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, #E11D2E, #8B5CF6);
  border-radius: 999px;
  will-change: height;
}

.tl-item {
  display: flex;
  position: relative;
  padding: 36px 0;
  gap: 48px;
  box-sizing: border-box;
}

.tl-left {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
  box-sizing: border-box;
}

.tl-dot-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E11D2E;
}

.tl-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.tl-right {
  flex: 1;
  padding-left: 12px;
  box-sizing: border-box;
}

.tl-title-mobile {
  display: none;
}

.tl-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0;
}

/* ════════════════════════════════════════════
   3. CONTACTO: ETIQUETAS FLOTANTES Y VALIDACIÓN
   ════════════════════════════════════════════ */
.float-field {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.float-field input {
  width: 100%;
  height: 54px;
  padding: 22px 16px 6px 16px;
  border-radius: var(--r-md, 12px);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.1));
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.float-field textarea {
  width: 100%;
  padding: 24px 16px 8px 16px;
  border-radius: var(--r-md, 12px);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.1));
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.float-field input:focus,
.float-field textarea:focus {
  border-color: rgba(225, 29, 46, 0.6);
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}

.float-field label {
  position: absolute;
  left: 16px;
  top: 17px;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1), font-size 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  user-select: none;
}

.float-field-textarea label {
  top: 18px;
}

/* Al enfocar o al contener texto: sube y se achica */
.float-field input:focus ~ label,
.float-field input:not(:placeholder-shown) ~ label,
.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label,
.float-field.has-value label,
.float-field.is-focused label {
  top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

.float-field input:focus ~ label,
.float-field textarea:focus ~ label,
.float-field.is-focused label {
  color: #E11D2E;
}

/* Validación */
.float-field.is-invalid input,
.float-field.is-invalid textarea {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.float-field.is-invalid label {
  color: #EF4444 !important;
}

.float-field.is-valid input,
.float-field.is-valid textarea {
  border-color: #10B981;
}

.field-error {
  display: block;
  font-size: 11px;
  color: #EF4444;
  min-height: 16px;
  margin-top: 4px;
  line-height: 1.3;
  font-weight: 500;
}

.float-field-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 4px;
  gap: 12px;
}

.contact-count {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

/* Shake de formulario o botón */
#contact-form.shake,
.contact-submit-btn.shake,
.shake {
  animation: contactShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes contactShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ════════════════════════════════════════════
   4. CONTACTO: BOTÓN QUE SE TRANSFORMA
   ════════════════════════════════════════════ */
.contact-submit-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--r-md, 12px);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.btn-content {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-text {
  display: inline-block;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.contact-submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

#contact-submit[data-state="idle"] .btn-content-idle {
  display: inline-flex;
}

#contact-submit[data-state="loading"] {
  opacity: 0.85;
  cursor: not-allowed;
}

#contact-submit[data-state="loading"] .btn-content-loading {
  display: inline-flex;
}

#contact-submit[data-state="success"] {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #ffffff !important;
}

#contact-submit[data-state="success"] .btn-content-success {
  display: inline-flex;
}

#contact-submit[data-state="error"] {
  background: #EF4444 !important;
  border-color: #EF4444 !important;
  color: #ffffff !important;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: contactSpin 0.6s linear infinite;
  display: inline-block;
  box-sizing: border-box;
}

@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

.btn-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-check svg {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: drawCheck 0.4s ease forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ════════════════════════════════════════════
   5. CONTACTO: BLUR FADE (INFO ITEMS)
   ════════════════════════════════════════════ */
.contact-info-item {
  transition: opacity 0.45s ease-out, filter 0.45s ease-out, transform 0.45s ease-out;
}

.contact-info-item.bf-item {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(10px);
}

.contact-info-item.bf-item.bf-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* ════════════════════════════════════════════
   6. RESPONSIVE Y PREFERS-REDUCED-MOTION
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .text-reveal {
    padding: 18vh 16px;
  }

  .about-timeline {
    padding-left: 0;
  }

  .tl-beam {
    left: 15px;
  }

  .tl-item {
    flex-direction: column;
    padding: 24px 0 24px 44px;
    gap: 8px;
  }

  .tl-left {
    position: absolute;
    left: 0;
    top: 24px;
    width: auto;
  }

  .tl-dot-wrapper {
    width: 30px;
    height: 30px;
  }

  .tl-title {
    display: none;
  }

  .tl-right {
    padding-left: 0;
  }

  .tl-title-mobile {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-word {
    opacity: 1 !important;
    transition: none !important;
  }

  .contact-info-item,
  .contact-info-item.bf-item {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  #contact-form.shake,
  .contact-submit-btn.shake,
  .shake {
    animation: none !important;
  }

  .btn-spinner {
    animation: none !important;
  }

  .btn-check svg {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .float-field label {
    transition: none !important;
  }
}

/* Sin tarjeta doble: el panel exterior ya es el vidrio */
.glass-panel-heavy > .contact-form-v2 {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
#contact-submit[data-state="loading"],
#contact-submit[data-state="success"],
#contact-submit[data-state="error"] { opacity: 1; }
