/* ============================================
   GEN4TRAVEL — ACCESS GATE STYLES
   ============================================ */

#g4tGate,
#g4tGateProto {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(46, 59, 196, 0.4), transparent 60%),
    radial-gradient(ellipse at 75% 75%, rgba(107, 127, 232, 0.22), transparent 55%),
    linear-gradient(180deg, #060929, #0D1342);
  color: #F4EFE7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter Tight", ui-sans-serif, system-ui;
  overflow: hidden;
  animation: g4tgFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#g4tGate.granted,
#g4tGateProto.granted {
  animation: g4tgFadeOut 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes g4tgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes g4tgFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.g4tg-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#g4tgCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.g4tg-streams {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#g4tGate::after,
#g4tGateProto::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

.g4tg-lang {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 3;
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.g4tg-lang-btn {
  padding: 8px 14px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  /* Touch target */
  min-height: 36px;
  min-width: 44px;
}

.g4tg-lang-btn.active {
  background: #F4EFE7;
  color: #0D1342;
}

.g4tg-lang-btn:not(.active):hover {
  color: #F4EFE7;
}

.g4tg-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  padding: 56px 48px;
  background: rgba(13, 19, 66, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  margin: 24px;
  animation: g4tgCardFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes g4tgCardFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.g4tg-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.g4tg-logo-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.g4tg-brand {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #F4EFE7;
}

.g4tg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 28px;
}

.g4tg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6FCF9F;
  box-shadow: 0 0 12px #6FCF9F;
  animation: g4tgPulse 2s infinite;
}

@keyframes g4tgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.g4tg-title {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui;
  font-weight: 600;
  font-size: clamp(26px, 4.5vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  color: #F4EFE7;
}

.g4tg-subtitle {
  font-size: clamp(15px, 2.5vw, 16px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
}

.g4tg-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#g4tgInput {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #F4EFE7;
  font-family: inherit;
  font-size: 16px; /* min 16px to prevent iOS zoom on focus */
  outline: none;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  /* Avoid iOS rounding-corner clip */
  -webkit-appearance: none;
  appearance: none;
}

#g4tgInput::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  letter-spacing: 0;
}

#g4tgInput:focus {
  border-color: #6B7FE8;
  background: rgba(255, 255, 255, 0.10);
}

#g4tgInput.error {
  border-color: #E1000F;
  background: rgba(225, 0, 15, 0.08);
  animation: g4tgShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

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

.g4tg-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  background: #F4EFE7;
  color: #0D1342;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  /* Touch */
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}

.g4tg-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(244, 239, 231, 0.2);
}

.g4tg-submit svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.g4tg-submit:hover svg {
  transform: translateX(3px);
}

.g4tg-error {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(225, 0, 15, 0.08);
  border: 1px solid rgba(225, 0, 15, 0.25);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 14px;
}

.g4tg-error.show {
  display: flex;
  animation: g4tgFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.g4tg-error svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #E1000F;
}

.g4tg-error a {
  color: #9BABF0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  word-break: break-all;
}

.g4tg-error a:hover {
  color: #F4EFE7;
}

.g4tg-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.g4tg-gov {
  height: 36px;
  width: auto;
  object-fit: contain;
  background: #FFFFFF;
  padding: 4px 8px;
  border-radius: 6px;
}

@media (max-width: 540px) {
  .g4tg-card { padding: 36px 24px; margin: 16px; }
  .g4tg-form { flex-direction: column; gap: 12px; }
  .g4tg-submit { width: 100%; }
  .g4tg-lang { top: 16px; right: 16px; }
  .g4tg-foot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .g4tg-logo-row { margin-bottom: 24px; }
  .g4tg-eyebrow { margin-bottom: 20px; }
  .g4tg-subtitle { margin-bottom: 28px; }
}

@media (max-width: 380px) {
  .g4tg-card { padding: 28px 20px; }
  .g4tg-eyebrow {
    font-size: 9px;
    padding: 5px 10px;
  }
}

/* ============================================
   DEMONSTRATOR GATE — warning banner
   ============================================ */
.g4tg-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(244, 184, 96, 0.12);
  border: 1px solid rgba(244, 184, 96, 0.40);
  color: #FFE7B5;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  position: relative;
  z-index: 3;
}

.g4tg-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #F4B860;
}
