/* ==================================================================
   Hotelia360 demo — EMAIL GATE

   Self-contained so it can render before tailwind.css finishes: the
   gate is the first thing a visitor sees and must never flash the
   login card behind it.
   ================================================================== */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* A centred flex child taller than the viewport gets clipped at the top
     and cannot be scrolled back to — which on a landscape phone would put
     the email field out of reach. Scrolling the overlay plus auto margins
     keeps the card centred when it fits and reachable when it does not. */
  overflow-y: auto;
  background: rgba(10, 17, 32, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  animation: gate-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Brand bloom behind the card, same language as the login screen. */
.gate::before,
.gate::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
}
.gate::before {
  width: 520px;
  height: 520px;
  top: -200px;
  left: -160px;
  background: #1d42d3;
}
.gate::after {
  width: 460px;
  height: 460px;
  right: -180px;
  bottom: -180px;
  background: #aa70f2;
}

.gate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: auto;
  flex: none;
  padding: 32px;
  border: 1px solid #253352;
  border-radius: 20px;
  background: rgba(18, 29, 49, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(47, 90, 239, 0.14),
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -30px rgba(47, 90, 239, 0.55);
  animation: gate-card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.gate-logo {
  height: 26px;
  width: auto;
  display: block;
}

.gate-eyebrow {
  margin: 14px 0 0;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5f6f92;
  display: flex;
  align-items: center;
  gap: 7px;
}

.gate-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d39a;
  box-shadow: 0 0 0 0 rgba(34, 211, 154, 0.6);
  animation: gate-pulse 2s ease-out infinite;
}

.gate-title {
  margin: 10px 0 0;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 30%, #c091f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-sub {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
  color: #8b9bbd;
}

.gate-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b9bbd;
}

.gate-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #253352;
  border-radius: 11px;
  background: #16233c;
  color: #fff;
  font: 600 13.5px/1.4 inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.gate-input::placeholder {
  color: #5f6f92;
  font-weight: 500;
}
.gate-input:focus {
  outline: none;
  border-color: #2f5aef;
  box-shadow: 0 0 0 3px rgba(47, 90, 239, 0.16);
}
.gate-input[aria-invalid='true'] {
  border-color: #ff5d73;
  box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.14);
}

/* Honeypot. Off-screen rather than display:none — some bots skip
   fields they can tell are hidden. */
.gate-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gate-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  color: #8b9bbd;
  cursor: pointer;
}
.gate-consent input {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  accent-color: #2f5aef;
  cursor: pointer;
}
.gate-consent a {
  color: #c3cde4;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gate-consent a:hover {
  color: #fff;
}
.gate-consent input[aria-invalid='true'] {
  outline: 2px solid #ff5d73;
  outline-offset: 2px;
  border-radius: 3px;
}

.gate-btn {
  margin-top: 2px;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #2f5aef 0%, #aa70f2 100%);
  color: #fff;
  font: 800 14px/1 inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
}
.gate-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}
.gate-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.gate-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.gate-arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}
.gate-btn:hover:not(:disabled) .gate-arrow {
  transform: translateX(3px);
}

.gate-error {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 93, 115, 0.3);
  border-radius: 10px;
  background: rgba(255, 93, 115, 0.1);
  color: #ff5d73;
  font-size: 12px;
  font-weight: 700;
}

.gate-note {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.55;
  font-weight: 500;
  color: #5f6f92;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.gate-note svg {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.gate-proof {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #1b2740;
  display: flex;
  gap: 20px;
}
.gate-proof div {
  flex: 1;
}
.gate-proof b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.gate-proof span {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f6f92;
}

/* ---- Exit --------------------------------------------------------- */

.gate.is-done {
  animation: gate-out 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
  pointer-events: none;
}
.gate.is-done .gate-card {
  animation: gate-card-out 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

/* ---- Keyframes ---------------------------------------------------- */

@keyframes gate-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gate-out {
  from { opacity: 1; }
  to   { opacity: 0; visibility: hidden; }
}
@keyframes gate-card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes gate-card-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-14px) scale(0.97); }
}
@keyframes gate-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 154, 0); }
}
@keyframes gate-spin {
  to { transform: rotate(360deg); }
}

.gate-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gate-spin 0.65s linear infinite;
}

@media (max-width: 420px) {
  .gate-card { padding: 26px 22px; }
  .gate-title { font-size: 22px; }
  .gate-proof { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate,
  .gate-card,
  .gate.is-done,
  .gate.is-done .gate-card {
    animation-duration: 0.01ms;
    animation-delay: 0ms;
  }
  .gate-dot,
  .gate-spinner { animation: none; }
}

.gate-note a {
  color: #8b9bbd;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gate-note a:hover {
  color: #c3cde4;
}
