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

:root {
  --brand: rgb(83, 64, 81);
  --gray: #c2c2c2;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --copy-size: clamp(9px, 0.85vw, 13px);
}

html, body {
  width: 100%;
  height: 100%;
  background: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.layer {
  position: fixed;
  inset: 0;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
  background:
    linear-gradient(
      to bottom,
      var(--gray) 0px,
      var(--gray) var(--sat),
      #fff var(--sat),
      #fff 100%
    );
}

#copyright {
  position: fixed;
  bottom: calc(clamp(10px, 1.8vh, 22px) + var(--sab));
  left: clamp(36px, 3.9vw, 60px);
  font-size: var(--copy-size);
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.03em;
  z-index: 500;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
@media (max-width: 767px) {
  #copyright { left: 50%; transform: translateX(-50%); }
}

#splash {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  perspective: 920px;
  perspective-origin: 50% 48%;
}
#splash.gone { opacity: 0; pointer-events: none; }

#logo-wrap {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  animation: logoAppear 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
  padding: 0;
}
#logo-wrap img {
  width: clamp(160px, 17vw, 260px);
  height: auto;
  display: block;
}
@media (max-width: 767px) and (orientation: portrait) {
  #logo-wrap img { width: clamp(140px, 44vw, 230px); }
}
#logo-wrap.burst {
  /* ANIM-1: splash logo burst — one continuous 3D approach */
  transform-style: preserve-3d;
  animation:
    logoBurstZoom 0.96s cubic-bezier(0.22, 0.2, 0.25, 1) forwards,
    logoBurstBlur 0.96s linear forwards,
    logoBurstFade 0.96s linear forwards !important;
}
@keyframes logoAppear {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes logoBurstZoom {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, 0, 560px) scale(1.45); }
}
@keyframes logoBurstBlur {
  0%   { filter: blur(0); }
  18%  { filter: blur(0); }
  40%  { filter: blur(5px); }
  70%  { filter: blur(13px); }
  100% { filter: blur(22px); }
}
@keyframes logoBurstFade {
  0%   { opacity: 1; }
  25%  { opacity: 1; }
  50%  { opacity: 0.7; }
  78%  { opacity: 0.28; }
  100% { opacity: 0; }
}

#pass-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
#pass-screen.visible {
  opacity: 1;
  pointer-events: all;
  z-index: 110;
}
#pass-screen.visible #lozenge {
  /* ANIM-2: site-access field reveal */
  animation: lozengeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes lozengeIn {
  from { opacity: 0; transform: scale(0.86) translateY(10px); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

#gate-form {
  width: min(620px, 92vw);
  display: grid;
  gap: 14px;
  justify-items: center;
}

#lozenge {
  width: clamp(260px, 44vw, 620px);
  background: linear-gradient(to right, rgb(83, 64, 81) 0%, rgb(18, 14, 18) 100%);
  border-radius: 999px;
  padding: clamp(15px, 2.2vh, 22px) clamp(28px, 3.5vw, 48px);
  display: flex;
  align-items: center;
}
@media (max-width: 767px) {
  #lozenge {
    width: clamp(200px, 70vw, 340px);
    padding: clamp(18px, 3.5vh, 28px) clamp(24px, 5vw, 36px);
  }
}

#pass-input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  font-size: clamp(13px, 1.4vw, 18px);
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.03em;
  caret-color: #fff;
}
#pass-input::placeholder { color: rgba(255, 255, 255, 0.42); }
#pass-input:not(:placeholder-shown) {
  color: #fff;
  font-weight: 400;
  font-size: clamp(14px, 1.55vw, 20px);
}
@media (max-width: 767px) {
  #pass-input,
  #pass-input:not(:placeholder-shown) { font-size: 14px; }
}

.gate-status {
  min-height: 1.2em;
  font-size: 13px;
  color: #a33;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  #logo-wrap,
  #logo-wrap.burst,
  #pass-screen.visible #lozenge {
    animation: none !important;
  }
  #splash { transition: none; }
  #pass-screen { transition: none; }
}
