/* =====================================================================
   InKuba · Coming Soon · Sticky CTA + Modal (Interacción #09)
   ===================================================================== */

/* ---------- Sticky pill ---------- */
.sticky-cta {
  position: fixed;
  bottom: clamp(20px, 3vh, 32px);
  right:  clamp(20px, 3vw, 32px);
  z-index: var(--z-sticky);

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 14px 22px;
  background: #ffffff;
  color: #0a0a0a;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  cursor: pointer;

  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform .4s var(--ease-out-expo),
    opacity   .4s var(--ease-out-expo),
    background .25s ease,
    box-shadow .25s ease;
}

.sticky-cta:hover {
  background: #f4f1ec;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.sticky-cta[hidden] {
  display: inline-flex; /* override <button hidden> default — controlamos vía .is-visible */
}

.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@supports (padding: env(safe-area-inset-bottom)) {
  .sticky-cta {
    bottom: max(env(safe-area-inset-bottom), 20px);
  }
}

@media (max-width: 480px) {
  .sticky-cta {
    bottom: max(env(safe-area-inset-bottom), 16px);
    right: 16px;
    left: 16px;
    justify-content: center;
    padding: 14px 18px;
    font-size: 10.5px;
  }
}

/* ---------- Modal ---------- */
.modal {
  /* dialog reset */
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
}

.modal::backdrop {
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal[open] {
  display: grid;
  place-items: center;
  z-index: var(--z-modal);
}

.modal__form,
.modal__success {
  position: relative;
  background: var(--ink-near-black);
  color: var(--ink-paper);
  width: min(440px, 92vw);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);

  animation: modal-in .35s var(--ease-out-expo) both;
}

.modal__success {
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-muted);
  border-radius: 50%;
  transition: background .2s ease, color .2s ease;
}
.modal__close:hover { background: rgba(255,255,255,0.06); color: var(--ink-paper); }

.modal__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  margin: 0;
}

.modal__lead {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.modal__lead em {
  font-style: italic;
  color: var(--ink-paper);
  opacity: 0.85;
}

.modal__input {
  width: 100%;
  padding: 14px 16px;
  margin-top: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  color: var(--ink-paper);
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: border-color .2s ease, background .2s ease;
}

.modal__input::placeholder {
  color: var(--ink-faint);
  font-size: 13px;
}

.modal__input:focus {
  outline: none;
  border-color: var(--ink-paper);
  background: rgba(255,255,255,0.06);
}

.modal__input.is-invalid {
  border-color: #d96a6a;
}

.modal__hint {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: #d96a6a;
  letter-spacing: 0.3px;
}

.modal__submit {
  margin-top: var(--space-2);
  width: 100%;
  padding: 14px 18px;
  background: var(--ink-paper);
  color: var(--ink-near-black);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.modal__submit:hover { transform: translateY(-1px); }
.modal__submit:disabled { opacity: 0.5; cursor: wait; transform: none; }

.modal__legal {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
}

.modal__success svg {
  color: var(--ink-paper);
  margin-bottom: 4px;
}

/* El display:flex de arriba sobreescribe [hidden] — forzamos display:none */
.modal__form[hidden],
.modal__success[hidden] {
  display: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sticky-cta,
  .modal__form,
  .modal__success {
    animation: none;
    transition: none;
  }
  .sticky-cta {
    transform: none;
    opacity: 1;
  }
  .sticky-cta:not(.is-visible) {
    visibility: hidden;
  }
}
