:root {
  --bg: #070807;
  --ink: #f2f5f1;
  --muted: #9dab8d;
  --green: #3f8f52;
  --green-deep: #2a4f35;
  --red: #b4232a;
  --line: rgba(242, 245, 241, 0.14);
  --font-display: "Comfortaa", sans-serif;
  --font-body: "Syne", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.gate {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.gate__stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
}

.gate__poster {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(63, 143, 82, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(180, 35, 42, 0.12), transparent 50%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.gate__poster img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  max-height: calc(100svh - 3rem);
  object-fit: contain;
  box-shadow:
    0 0 0 1px rgba(242, 245, 241, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.55);
  animation: poster-in 1.1s var(--ease) both;
}

.gate__side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 20, 17, 0.55), rgba(7, 8, 7, 0.92));
}

.gate__logo {
  display: block;
  width: min(100%, 280px);
  height: auto;
  animation: rise 0.9s var(--ease) 0.1s both;
}

.gate__artist {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: rise 0.9s var(--ease) 0.2s both;
}

.gate__when {
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  opacity: 0.85;
  animation: rise 0.9s var(--ease) 0.3s both;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0 0.5rem;
  animation: rise 0.9s var(--ease) 0.4s both;
}

.countdown__unit {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 0.85rem 0.4rem;
  border: 1px solid var(--line);
  background: rgba(7, 8, 7, 0.45);
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.countdown__lab {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate__open {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green);
}

.gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: rise 0.9s var(--ease) 0.5s both;
}

.gate__enter,
.gate__preview,
.auth__submit,
.auth__cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.gate__enter,
.auth__submit {
  background: var(--green);
  color: #071008;
  font-weight: 700;
}

.gate__enter.is-disabled,
.gate__enter[aria-disabled="true"] {
  background: rgba(63, 143, 82, 0.22);
  color: rgba(242, 245, 241, 0.35);
  pointer-events: none;
  cursor: not-allowed;
}

.gate__enter:hover,
.auth__submit:hover {
  background: #4fa762;
}

.gate__enter.is-disabled:hover,
.gate__enter[aria-disabled="true"]:hover {
  background: rgba(63, 143, 82, 0.22);
}

.gate__preview,
.auth__cancel {
  border: 1px solid var(--line);
  color: var(--ink);
}

.gate__preview:hover,
.auth__cancel:hover {
  border-color: rgba(242, 245, 241, 0.35);
  background: rgba(242, 245, 241, 0.04);
}

.auth {
  width: min(92vw, 420px);
  padding: 0;
  border: 1px solid var(--line);
  background: #0d110e;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.auth::backdrop {
  background: rgba(4, 6, 5, 0.72);
  backdrop-filter: blur(4px);
}

.auth__form {
  display: grid;
  gap: 0.9rem;
  padding: 1.5rem;
}

.auth__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.auth__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth__field {
  display: grid;
  gap: 0.4rem;
}

.auth__field span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth__field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(7, 8, 7, 0.7);
  outline: none;
}

.auth__field input:focus {
  border-color: var(--green);
}

.auth__error {
  margin: 0;
  color: #e8a0a0;
  font-size: 0.88rem;
}

.auth__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

@keyframes poster-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 860px) {
  .gate__stage {
    grid-template-columns: 1fr;
  }

  .gate__poster {
    min-height: auto;
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .gate__poster img {
    width: min(100%, 420px);
    max-height: 58svh;
  }

  .gate__side {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-bottom: 2.5rem;
  }
}
