/* ========================================================
   TUCANEO ACADEMY — CONTENT GATE (SISTEMA DE BLOQUEO SUAVE)
   Archivo maestro: css/content-gate.css
   ======================================================== */

:root {
  --gate-primary: #004d40;
  --gate-primary-hover: #00332a;
  --gate-accent: #ff6f00;
  --gate-accent-hover: #e66000;
  --gate-bg-card: #f8fafc;
  --gate-border: #e2e8f0;
  --gate-text-main: #0f172a;
  --gate-text-muted: #64748b;
  --gate-height-lock: 260px;
}

/* 1. Contenedor con recorte y degradado */
.gated-wrapper {
  position: relative;
  max-height: var(--gate-height-lock);
  overflow: hidden;
  user-select: none;
  transition: max-height 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* Deshabilita interacción táctil/clics en inputs mientras está bloqueado */
.gated-wrapper:not(.is-unlocked) * {
  pointer-events: none !important;
}

/* Efecto de fade-out gradual hacia blanco */
.gated-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    #ffffff 92%
  );
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Estado desbloqueado */
.gated-wrapper.is-unlocked {
  max-height: none !important;
  overflow: visible !important;
  user-select: auto !important;
}

.gated-wrapper.is-unlocked::after {
  display: none !important;
}

/* 2. Tarjeta de Captura (Gate Card) */
.gate-card {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 620px;
  margin: -40px auto 30px auto;
  padding: 32px 28px;
  background: var(--gate-bg-card);
  border: 1px solid var(--gate-border);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 
              0 8px 10px -6px rgba(15, 23, 42, 0.04);
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gate-card.is-hidden {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
  display: none !important;
}

/* Badge superior */
.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2f1;
  color: var(--gate-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}

/* Tipografía de la tarjeta */
.gate-card h3 {
  color: var(--gate-text-main);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.gate-card p.gate-subtitle {
  color: var(--gate-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 20px 0;
}

/* Formulario */
.gate-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 14px auto;
}

.gate-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  font-size: 0.95rem;
  color: var(--gate-text-main);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.gate-input:focus {
  border-color: var(--gate-primary);
  box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.15);
}

.gate-button {
  height: 48px;
  padding: 0 22px;
  background: var(--gate-primary);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 77, 64, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.gate-button:hover {
  background: var(--gate-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 77, 64, 0.3);
}

.gate-button:active {
  transform: translateY(0);
}

/* Micro-copy de confianza */
.gate-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gate-text-muted);
  margin: 0;
}

/* Responsividad para móviles */
@media screen and (max-width: 600px) {
  .gate-card {
    padding: 24px 16px;
    margin: -30px 10px 25px 10px;
  }

  .gate-card h3 {
    font-size: 1.1rem;
  }

  .gate-form {
    flex-direction: column;
  }

  .gate-button {
    width: 100%;
  }
}

/* ========================================================
   BLINDAJE DE IMPRESIÓN (REGLAS OBLIGATORIAS TUCANEO)
   ======================================================== */
@media print {
  .gated-wrapper {
    max-height: none !important;
    overflow: visible !important;
    user-select: auto !important;
  }

  .gated-wrapper:not(.is-unlocked) * {
    pointer-events: auto !important;
  }

  .gated-wrapper::after {
    display: none !important;
  }

  .gate-card {
    display: none !important;
  }
}
