@font-face {
  font-family: 'CaptainJack';
  src: url('../assets/fonts/CaptainJack-TropicalGroove.woff2') format('woff2'),
       url('../assets/fonts/CaptainJack-TropicalGroove.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Abside';
  src: url('../assets/fonts/Abside-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #6ba7e3; }

body {
  min-height: 100vh;
  background: #6ba7e3 url('../assets/img/gate-bg.webp') center / cover no-repeat fixed;
  color: #ffffff;
  font-family: 'Abside', sans-serif;
  overflow-x: hidden;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 4vw, 72px) 20px;
}

.gate {
  width: 100%; max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

.gate__logo {
  width: clamp(80px, 8vw, 110px);
  height: auto;
  margin: 0 0 clamp(18px, 1.8vw, 28px);
}

.gate__title {
  font-family: 'CaptainJack', sans-serif;
  font-weight: normal;
  font-size: clamp(32px, 2.5vw, 48px);
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #E8C869;
  margin: 0 0 clamp(14px, 1.4vw, 22px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.gate__lead {
  font-weight: 400;
  font-size: clamp(11px, 0.95vw, 14px);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 clamp(22px, 2.4vw, 36px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.gate__form {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(16px, 1.8vw, 24px);
  width: 100%;
}

.gate__inputs {
  display: flex; gap: clamp(8px, 1vw, 14px);
  justify-content: center; flex-wrap: wrap;
}

.gate__select {
  position: relative;
  width: clamp(112px, 9.5vw, 146px);
  height: clamp(50px, 3.7vw, 60px);
  z-index: 1;
}
.gate__select.is-open { z-index: 90; }
.gate__select-trigger {
  width: 100%; height: 100%;
  padding: 7px 16px 8px; text-align: center;
  font-weight: 900; font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: 0.02em;
  color: #00124A;
  background: #ffffff;
  border: 1px solid #ffffff; border-radius: 20px;
  cursor: pointer; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
  white-space: nowrap; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.gate__select-value {
  display: inline-block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gate__select-trigger:focus,
.gate__select.is-open .gate__select-trigger {
  border-color: #E8C869;
  box-shadow: 0 0 0 3px rgba(232, 200, 105, 0.35), 0 4px 14px rgba(0, 0, 0, 0.18);
}
.gate__select.is-error .gate__select-trigger {
  border-color: #d44;
  box-shadow: 0 0 0 3px rgba(221, 68, 68, 0.35);
}
.gate__select-placeholder { color: #00124A; opacity: 0.85; }
.gate__select-trigger::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid #00124A; border-bottom: 2px solid #00124A;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.gate__select.is-open .gate__select-trigger::after {
  transform: translateY(-30%) rotate(-135deg);
}
.gate__select-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 260px; overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(29, 52, 135, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  z-index: 50; display: none; padding: 6px 0;
  scrollbar-width: thin; scrollbar-color: #1d3487 #f1f3f9;
}
.gate__select-list::-webkit-scrollbar { width: 6px; }
.gate__select-list::-webkit-scrollbar-thumb { background: #1d3487; border-radius: 3px; }
.gate__select.is-open .gate__select-list { display: block; }
.gate__select-option {
  padding: 9px 14px;
  font-weight: 400; font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.02em; color: #00124A;
  cursor: pointer; text-align: center;
  transition: background 0.15s;
}
.gate__select-option:hover,
.gate__select-option.is-active { background: rgba(0, 18, 74, 0.08); }

.gate__remember {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 400; font-size: clamp(12px, 0.95vw, 14px);
  letter-spacing: 0.06em;
  color: #ffffff;
  cursor: pointer; user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.gate__remember input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
  margin: 0;
}
.gate__remember::before {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  background-position: center; background-repeat: no-repeat; background-size: 12px 12px;
}
.gate__remember:has(input:checked)::before {
  background-color: #E8C869;
  border-color: #E8C869;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='%2300124A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.gate__remember:has(input:focus-visible)::before {
  box-shadow: 0 0 0 3px rgba(232, 200, 105, 0.45);
}
.gate__remember:hover::before { border-color: #E8C869; }

.gate__submit {
  min-width: clamp(140px, 11vw, 181px);
  height: clamp(44px, 3.2vw, 52px);
  padding: 0 clamp(20px, 2vw, 32px);
  font-family: 'CaptainJack', sans-serif;
  font-weight: normal; font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: 0.02em; text-transform: uppercase;
  color: #00124A; background: #E8C869;
  border: none; border-radius: 17px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  margin-top: clamp(6px, 0.6vw, 10px);
  display: inline-flex; align-items: center; justify-content: center;
}
.gate__submit:hover  { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32); background: #f0d180; }
.gate__submit:active { transform: translateY(0); }

.gate .kp {
  width: clamp(160px, 16vw, 230px);
  height: auto;
  margin: 30px auto;
  display: block;
  opacity: 0;
}

.gate__disclaimer {
  font-weight: 400;
  font-size: clamp(10px, 0.88vw, 14px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  max-width: 520px;
  margin: 0 auto 10px;
  text-align: center;
}
.gate__disclaimer a {
  color: #E8C869;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gate__disclaimer a:hover { color: #fff8d8; }

.gate__copyright {
  font-weight: 400;
  font-size: clamp(10px, 0.88vw, 14px);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  margin: 25px 0 0;
  text-align: center;
}


.modal {
  position: fixed; inset: 0;
  background: rgba(29, 52, 135, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 100; opacity: 0;
}
.modal.is-open { display: flex; }
.modal__card {
  position: relative;
  background: #ffffff;
  border: 2px solid #E8C869; border-radius: 14px;
  padding: clamp(32px, 4vw, 56px) clamp(28px, 4vw, 64px);
  text-align: center; max-width: 520px; width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: scale(0.85); opacity: 0;
}
.modal__title {
  font-weight: 900;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d3487;
  margin: 0 0 14px;
}
.modal__msg {
  font-weight: 500;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #1d3487;
  opacity: 0.9;
  margin: 0 0 clamp(18px, 2vw, 28px);
}
.modal__btn {
  padding: 12px 40px;
  font-weight: 900; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #1a1410; background: #E8C869;
  border: none; border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.modal__btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); background: #f0d180; }
.modal__btn:active { transform: translateY(0); }

.gate__logo, .gate__title, .gate__lead, .gate__remember, .gate__submit,
.gate__inputs .gate__select, .gate__abc, .gate__disclaimer, .gate__copyright { opacity: 0; }

@media (max-width: 600px) {
  body {
    padding: 28px 18px;
    min-height: 100vh;
    justify-content: center; /* zawartość pionowo wysrodkowana */
    background-position: 78% center;
  }
  .gate__logo { width: 72px; margin-bottom: 14px; }
  .gate__title { font-size: 32px; line-height: 1.0; margin-bottom: 12px; }
  .gate__lead { font-size: 10.5px; margin-bottom: 20px; }
  .gate__inputs { gap: 8px; }
  .gate__select { width: 28vw; max-width: 110px; height: 48px; }
  .gate__select-trigger { font-size: 16px; padding: 6px 22px 7px 10px; border-radius: 14px; }
  .gate__select-trigger::after { right: 10px; }
  .gate__select-option { font-size: 14px; padding: 9px 12px; }
  .gate__submit {
    min-width: 150px; height: 44px;
    padding: 0 24px;
    font-size: 18px;
    border-radius: 14px;
  }
  .gate .kp { width: 160px; margin: 32px auto 14px; }
  .gate__disclaimer { font-size: 10px; line-height: 1.5; max-width: 92%; }
  .gate__copyright { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
