:root {
  --bg: #02050b;
  --gold: #d8a94a;
  --gold-bright: #ffd978;
  --ivory: #f4e9cf;
  --muted: #cab98d;
  --line: rgba(255, 217, 120, 0.42);
  --panel: rgba(3, 8, 16, 0.72);
  --panel-strong: rgba(4, 10, 20, 0.88);
  --success: #79e0b8;
  --error: #ffaaaa;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 12%, rgba(35, 90, 100, 0.22), transparent 25%),
    linear-gradient(180deg, #010307 0%, #07111d 45%, #010307 100%);
}

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

.guardian-page {
  width: min(1500px, calc(100% - 18px));
  margin: 0 auto;
  padding: 10px 0;
}

.artboard {
  position: relative;
  width: 100%;
  aspect-ratio: 1055 / 1491;
  min-height: min(92vh, 1491px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 217, 120, 0.22);
  background: var(--bg);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.background-art,
.background-shade {
  position: absolute;
  inset: 0;
}

.background-art {
  background-image: url('assets/guardian-background-clean.png');
  background-size: cover;
  background-position: center top;
}

.background-shade {
  background:
    radial-gradient(circle at 50% 64%, rgba(4, 10, 20, 0.08), transparent 15%),
    linear-gradient(180deg, rgba(3, 8, 16, 0.04), rgba(3, 8, 16, 0.02));
  pointer-events: none;
}

.gate-card {
  position: absolute;
  left: 50%;
  top: 57.8%;
  transform: translateX(-50%);
  width: min(40%, 430px);
  padding: 22px 24px 24px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(4, 10, 20, 0.86), rgba(3, 8, 16, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(255, 217, 120, 0.08), transparent 55%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 217, 120, 0.06);
  backdrop-filter: blur(10px);
}

.gate-card.gate-open {
  box-shadow: 0 0 30px rgba(121, 224, 184, 0.24), var(--shadow);
}

.gate-card h2 {
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 217, 120, 0.18);
}

.gate-card p {
  margin: 10px 0 16px;
  color: rgba(244, 233, 207, 0.84);
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
}

.entry-form {
  display: grid;
  gap: 12px;
}

.entry-form input {
  width: 100%;
  min-height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255, 217, 120, 0.44);
  background: rgba(1, 5, 11, 0.7);
  color: var(--ivory);
  text-align: center;
  padding: 0 16px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.entry-form input::placeholder {
  color: rgba(244, 233, 207, 0.48);
}

.entry-form input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(255, 217, 120, 0.16);
}

.entry-form button {
  min-height: 62px;
  border-radius: 14px;
  border: 1px solid rgba(255, 217, 120, 0.72);
  background: linear-gradient(180deg, rgba(18, 106, 98, 0.96), rgba(5, 53, 48, 0.96));
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: clamp(1.15rem, 1.8vw, 1.9rem);
  font-family: inherit;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.entry-form button:hover,
.entry-form button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 0 22px rgba(255, 217, 120, 0.14);
  outline: none;
}

.gate-message {
  min-height: 1.4em;
  color: var(--muted);
  font-size: .98rem;
}

.gate-message.success { color: var(--success); }
.gate-message.error { color: var(--error); }

@media (max-width: 1100px) {
  .gate-card {
    width: min(54%, 480px);
    top: 57%;
  }
}

@media (max-width: 760px) {
  .guardian-page {
    width: min(100% - 10px, 1500px);
  }

  .artboard {
    aspect-ratio: auto;
    min-height: 100vh;
    height: auto;
  }

  .background-art {
    background-position: center top;
  }

  .gate-card {
    width: min(86%, 520px);
    top: 54%;
    padding: 18px 16px 18px;
  }

  .gate-card h2 {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
  }

  .entry-form button {
    min-height: 56px;
  }
}
