:root {
  color-scheme: dark;
  font-family: Georgia, "Times New Roman", serif;
  background: #0d0912;
  color: #f6edda;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 50% 28%, rgba(231, 183, 93, 0.17), transparent 28rem),
    linear-gradient(145deg, #211128 0%, #0d0912 48%, #17101d 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,.025) 19px 20px);
}

.gate-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
  isolation: isolate;
}

.curtain {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: min(23vw, 19rem);
  background:
    linear-gradient(90deg, rgba(0,0,0,.42), transparent 18%, rgba(255,255,255,.07) 45%, rgba(0,0,0,.38)),
    #4b132a;
  box-shadow: 0 0 3rem rgba(0,0,0,.55);
}

.curtain-left {
  left: 0;
  border-right: 1px solid rgba(218, 168, 88, .25);
}

.curtain-right {
  right: 0;
  transform: scaleX(-1);
  border-right: 1px solid rgba(218, 168, 88, .25);
}

.gate-card {
  width: min(100%, 46rem);
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(39, 27, 46, .96), rgba(19, 14, 25, .98));
  border: 1px solid rgba(225, 180, 101, .48);
  border-radius: 1.25rem;
  box-shadow:
    0 2.25rem 6rem rgba(0,0,0,.52),
    inset 0 0 0 5px rgba(255,255,255,.018);
}

.sigil {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  margin: -4.1rem auto 1.5rem;
  color: #f4cc7d;
  font-size: 1.75rem;
  background: #1b1221;
  border: 1px solid rgba(225, 180, 101, .65);
  border-radius: 50%;
  box-shadow: 0 0 2rem rgba(226, 168, 72, .2);
}

.eyebrow {
  margin: 0 0 1rem;
  color: #dcae64;
  font-family: system-ui, sans-serif;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

h1 {
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 500;
  line-height: 1.03;
  text-wrap: balance;
}

.invitation {
  max-width: 38rem;
  margin: 1.5rem auto 2.25rem;
  color: #cfc1d0;
  font-size: clamp(1rem, 2.5vw, 1.16rem);
  line-height: 1.7;
}

form {
  max-width: 35rem;
  margin: 0 auto;
  text-align: left;
}

label {
  display: block;
  margin: 0 0 .65rem;
  color: #f1dfbd;
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.entry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
}

input,
button {
  min-height: 3.25rem;
  border-radius: .7rem;
  font: 700 .98rem system-ui, sans-serif;
}

input {
  width: 100%;
  padding: 0 1rem;
  color: #fff8e9;
  background: rgba(8, 6, 11, .72);
  border: 1px solid rgba(232, 200, 141, .34);
  outline: none;
}

input:focus {
  border-color: #efc575;
  box-shadow: 0 0 0 3px rgba(239, 197, 117, .14);
}

button {
  padding: 0 1.25rem;
  color: #25150d;
  cursor: pointer;
  background: linear-gradient(180deg, #f4d08a, #c99346);
  border: 1px solid #f7dfac;
  box-shadow: 0 .7rem 1.6rem rgba(0,0,0,.28);
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: .62;
}

.message {
  min-height: 1.4rem;
  margin: .75rem 0 0;
  color: #eab8a9;
  font: .88rem/1.5 system-ui, sans-serif;
}

.fine-print {
  margin: 1.6rem 0 0;
  color: #8f8094;
  font-family: system-ui, sans-serif;
  font-size: .76rem;
}

.ward-rebuke {
  width: min(calc(100% - 2rem), 52rem);
  margin: auto;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.5rem, 7vw, 4.5rem);
  overflow: visible;
  color: #fff1cf;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 179, 71, .25), transparent 45%),
    linear-gradient(155deg, #351226, #140b1b 56%, #28101f);
  border: 2px solid #e0a850;
  border-radius: 1.25rem;
  box-shadow:
    0 0 0 7px rgba(74, 24, 48, .92),
    0 0 0 9px rgba(224, 168, 80, .38),
    0 3rem 8rem rgba(0, 0, 0, .85),
    inset 0 0 5rem rgba(202, 76, 63, .16);
}

.ward-rebuke::backdrop {
  background: rgba(5, 2, 8, .84);
  backdrop-filter: blur(7px) saturate(.7);
}

.ward-rebuke[open] {
  animation: ward-rebuke-arrives .36s cubic-bezier(.2, .9, .25, 1.2) both;
}

.ward-rebuke-sigil {
  display: grid;
  place-items: center;
  width: 5.25rem;
  height: 5.25rem;
  margin: -5.9rem auto 1.6rem;
  color: #2b1020;
  font-size: 2.25rem;
  background: linear-gradient(145deg, #ffe3a0, #bd742f);
  border: 3px solid #f9d58d;
  border-radius: 50%;
  box-shadow: 0 0 2.8rem rgba(242, 172, 63, .55);
}

.ward-rebuke-kicker {
  margin: 0 0 1rem;
  color: #e4b760;
  font: 900 .78rem/1.2 system-ui, sans-serif;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.ward-rebuke h2 {
  max-width: 15ch;
  margin: 0 auto 2rem;
  color: #fff4d8;
  font-size: clamp(2.5rem, 8vw, 5.75rem);
  font-weight: 700;
  line-height: .98;
  text-wrap: balance;
  text-shadow: 0 .2rem 0 #651f35, 0 0 2rem rgba(236, 153, 54, .34);
}

.ward-rebuke.sky-rebuke h2 {
  max-width: 12ch;
  color: #f8d176;
  font-size: clamp(3rem, 10vw, 7rem);
  text-transform: uppercase;
}

.ward-rebuke button {
  min-width: min(100%, 14rem);
}

@keyframes ward-rebuke-arrives {
  from {
    opacity: 0;
    transform: scale(.78) translateY(2rem);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 640px) {
  .gate-shell {
    padding: 1rem;
  }

  .curtain {
    width: 9vw;
  }

  .gate-card {
    padding: 2.5rem 1.25rem 2rem;
  }

  .sigil {
    margin-top: -4.65rem;
  }

  .entry-row {
    grid-template-columns: 1fr;
  }

  .ward-rebuke {
    width: calc(100% - 1.5rem);
    padding: 3rem 1.25rem 2rem;
  }

  .ward-rebuke-sigil {
    width: 4.25rem;
    height: 4.25rem;
    margin-top: -5.2rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sigil {
    animation: glow 3.5s ease-in-out infinite;
  }

  .ward-rebuke-sigil {
    animation: rebuke-glow 1.2s ease-in-out infinite alternate;
  }

  @keyframes glow {
    50% { box-shadow: 0 0 2.8rem rgba(226, 168, 72, .38); }
  }

  @keyframes rebuke-glow {
    to { box-shadow: 0 0 4rem rgba(242, 172, 63, .82); }
  }
}
