:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --surface: #15151a;
  --surface-raised: #1f1f26;
  --border: #34343e;
  --text: #f2f2f4;
  --muted: #9b9ba6;
  --dim: #666671;
  --amber: #f5a524;
  --orange: #ff6b35;
  --error: #ff8a65;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.gate-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 34rem);
  min-height: 100svh;
  overflow: hidden;
}

.gate-visual {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #111116;
}

.gate-visual > img {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
  animation: gate-drift 18s ease-in-out infinite alternate;
}

.gate-visual__shade {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 11, 0.38);
}

.gate-visual__caption {
  position: absolute;
  left: 2rem;
  bottom: 1.7rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.gate-stage {
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: 2rem 3.5rem 1.6rem;
  background: rgba(11, 11, 14, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.gate-brand img {
  display: block;
  width: 13.5rem;
  height: auto;
}

.gate-brand span {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.gate-content {
  align-self: center;
  width: min(100%, 25rem);
  margin: 3rem 0;
}

.gate-kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.gate-meter {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  width: 20px;
  height: 14px;
}

.gate-meter i {
  width: 3px;
  height: 5px;
  background: var(--amber);
  animation: gate-meter 1.1s ease-in-out infinite alternate;
}

.gate-meter i:nth-child(2) {
  height: 10px;
  animation-delay: 0.15s;
}

.gate-meter i:nth-child(3) {
  height: 14px;
  background: var(--orange);
  animation-delay: 0.3s;
}

.gate-meter i:nth-child(4) {
  height: 8px;
  animation-delay: 0.45s;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0;
}

.gate-lead {
  max-width: 29rem;
  margin: 1.25rem 0 2.2rem;
  color: var(--muted);
  font-size: 1rem;
}

.gate-form {
  display: grid;
  gap: 0.65rem;
}

.gate-form label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.gate-form input[type="password"] {
  width: 100%;
  height: 3.4rem;
  padding: 0 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  caret-color: var(--amber);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.gate-form input[type="password"]:hover {
  background: var(--surface-raised);
}

.gate-form input[type="password"]:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.14);
}

.gate-form input[aria-invalid="true"] {
  border-color: var(--error);
}

.gate-message {
  min-height: 1.35rem;
  color: var(--error);
  font-size: 0.82rem;
}

.gate-form button,
.gate-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.4rem;
  padding: 0 1rem;
  color: #101014;
  background: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.gate-form button:hover,
.gate-link:hover {
  background: #ffb43d;
  border-color: #ffb43d;
  transform: translateY(-1px);
}

.gate-form button:focus-visible,
.gate-link:focus-visible {
  outline: 3px solid rgba(245, 165, 36, 0.35);
  outline-offset: 3px;
}

.gate-button__arrow {
  font-size: 1.15rem;
}

.gate-form--compact {
  margin-top: 2rem;
}

.gate-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

@keyframes gate-drift {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

@keyframes gate-meter {
  from { transform: scaleY(0.55); opacity: 0.62; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 860px) {
  .gate-shell {
    display: block;
    position: relative;
  }

  .gate-visual {
    position: fixed;
    inset: 0;
  }

  .gate-visual__shade {
    background: rgba(8, 8, 11, 0.72);
  }

  .gate-visual__caption {
    display: none;
  }

  .gate-stage {
    position: relative;
    min-height: 100svh;
    padding: 1.4rem 1.4rem 1.2rem;
    background: rgba(11, 11, 14, 0.88);
    border-left: 0;
  }

  .gate-content {
    width: min(100%, 27rem);
    margin: 3rem auto;
  }

  .gate-brand,
  .gate-footer {
    width: min(100%, 27rem);
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .gate-stage {
    padding-inline: 1.1rem;
  }

  .gate-brand {
    gap: 0.7rem;
  }

  .gate-brand img {
    width: 10.5rem;
  }

  .gate-brand span {
    padding-left: 0.7rem;
    font-size: 0.65rem;
  }

  h1 {
    font-size: 2.75rem;
  }
}

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