@charset "UTF-8";
/* ==========================================================================
   gate.css — styles for the passcode entry screen only.
   Deliberately self-contained: the gate loads none of the site's identity,
   imagery, typography licences or SEO assets.
   ========================================================================== */

:root {
  --g-bg:      #101F1A;
  --g-bg-2:    #0B1714;
  --g-line:    rgba(199, 154, 82, 0.26);
  --g-line-2:  rgba(199, 154, 82, 0.5);
  --g-brass:   #C79A52;
  --g-brass-2: #E0C08A;
  --g-text:    #EDE8DC;
  --g-mute:    #8FA79C;
  --g-error:   #E0A48A;
  --g-ok:      #9CC7A8;
  --g-sans:    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --g-serif:   Georgia, "Times New Roman", serif;
  --g-ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--g-bg);
  background-image:
    radial-gradient(120% 90% at 50% 0%, rgba(46, 90, 78, 0.55) 0%, rgba(16, 31, 26, 0) 62%),
    radial-gradient(80% 60% at 50% 110%, rgba(199, 154, 82, 0.1) 0%, rgba(16, 31, 26, 0) 60%);
  color: var(--g-text);
  font-family: var(--g-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

::selection { background: var(--g-brass); color: var(--g-bg-2); }

.gate {
  width: 100%;
  max-width: 392px;
  display: grid;
  justify-items: center;
  gap: 34px;
  animation: gate-in 0.7s var(--g-ease) both;
}

@keyframes gate-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* abstract arch — carries no name, wordmark or identifying detail */
.gate__mark {
  width: 34px;
  height: 40px;
  color: var(--g-brass);
  opacity: 0.85;
}

.gate__form {
  width: 100%;
  display: grid;
  gap: 18px;
}

.gate__label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--g-mute);
  text-align: center;
}

.gate__field {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--g-line);
  transition: border-color 0.3s var(--g-ease);
}
.gate__field:focus-within { border-bottom-color: var(--g-line-2); }

.gate__input {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--g-text);
  font-family: var(--g-serif);
  font-size: 1.4rem;
  letter-spacing: 0.28em;
  text-align: center;
  padding: 14px 44px 14px 44px;
}
.gate__input::placeholder { color: rgba(143, 167, 156, 0.42); letter-spacing: 0.2em; }
.gate__input:-webkit-autofill {
  -webkit-text-fill-color: var(--g-text);
  -webkit-box-shadow: 0 0 0 1000px var(--g-bg) inset;
}

.gate__reveal {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--g-mute);
  transition: color 0.24s var(--g-ease);
}
.gate__reveal:hover, .gate__reveal:focus-visible { color: var(--g-brass-2); }
.gate__reveal svg { width: 17px; height: 17px; display: block; }
.gate__reveal .icon-off { display: none; }
.gate__reveal[aria-pressed="true"] .icon-on { display: none; }
.gate__reveal[aria-pressed="true"] .icon-off { display: block; }

.gate__submit {
  position: relative;
  width: 100%;
  padding: 16px 22px;
  background: transparent;
  border: 1px solid var(--g-line-2);
  color: var(--g-text);
  font-family: var(--g-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.3s var(--g-ease), border-color 0.3s var(--g-ease);
}
.gate__submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--g-brass);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--g-ease);
  z-index: -1;
}
.gate__submit:hover:not(:disabled)::after,
.gate__submit:focus-visible:not(:disabled)::after { transform: scaleX(1); }
.gate__submit:hover:not(:disabled),
.gate__submit:focus-visible:not(:disabled) { color: var(--g-bg-2); border-color: var(--g-brass); }
.gate__submit:disabled { opacity: 0.55; cursor: progress; }

.gate__status {
  min-height: 1.4em;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--g-mute);
  line-height: 1.5;
}
.gate__status[data-tone="error"] { color: var(--g-error); }
.gate__status[data-tone="ok"]    { color: var(--g-ok); }

:focus-visible { outline: 2px solid var(--g-brass); outline-offset: 3px; }

/* feedback states */
.gate.is-wrong .gate__field { animation: gate-shake 0.42s var(--g-ease); border-bottom-color: var(--g-error); }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(2px); }
}

.gate.is-open { animation: gate-out 0.5s var(--g-ease) both; }
@keyframes gate-out {
  to { opacity: 0; transform: translateY(-10px); }
}

.gate__noscript {
  font-size: 0.8rem;
  color: var(--g-error);
  text-align: center;
  max-width: 34ch;
}

@media (max-width: 420px) {
  .gate { gap: 28px; }
  .gate__input { font-size: 1.2rem; letter-spacing: 0.2em; padding-inline: 40px; }
}

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