@font-face {
  font-family: "Unbounded";
  src: url("../fonts/Unbounded.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("../fonts/Onest.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest: #1a3d32;
  --forest-deep: #0f2922;
  --gold: #e8c98a;
  --gold-deep: #c9a24a;
  --cream: #f3eee4;
  --font-display: "Unbounded", "Trebuchet MS", sans-serif;
  --font-body: "Onest", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--forest-deep);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gate-bg {
  position: fixed;
  inset: 0;
  background: url("../images/denis-1.jpg") 70% 30% / cover no-repeat;
  transform: scale(1.04);
}

.gate-shade {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(15, 41, 34, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(8, 22, 18, 0.55) 0%, rgba(8, 22, 18, 0.78) 100%);
  backdrop-filter: blur(1.5px);
}

.gate {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.gate-stamp {
  margin: 0 0 0.55rem;
  font-size: clamp(0.62rem, 2.2vw, 0.72rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 201, 138, 0.88);
}

.gate-mobile-tag {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 238, 228, 0.65);
}

.gate-title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.gate-question {
  margin: 0 0 1.25rem;
  max-width: 22rem;
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  line-height: 1.35;
  color: rgba(243, 238, 228, 0.95);
}

.gate-form {
  width: min(22rem, 100%);
  display: grid;
  gap: 0.7rem;
}

.gate-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(232, 201, 138, 0.45);
  border-radius: 10px;
  background: rgba(15, 41, 34, 0.72);
  color: #fff;
  font-size: 1.05rem;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gate-input::placeholder {
  color: rgba(243, 238, 228, 0.45);
}

.gate-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 201, 138, 0.22);
}

.gate-input.is-wrong {
  border-color: #e07a4a;
  box-shadow: 0 0 0 3px rgba(224, 122, 74, 0.25);
}

.gate-btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--forest-deep);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 10px 28px rgba(15, 41, 34, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.gate-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.gate-btn:active {
  transform: translateY(0);
}

.gate-error {
  margin: 1rem 0 0;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0b07a;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  animation: gate-shake 0.4s ease;
}

.gate-error[hidden] {
  display: none;
}

@keyframes gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (max-width: 640px) {
  .gate {
    padding: 1.25rem 1rem;
  }

  .gate-bg {
    background-position: 62% 28%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-btn,
  .gate-error {
    animation: none !important;
    transition: none !important;
  }
}
