:root {
  box-sizing: border-box;
  color-scheme: dark;
  --black: #080706;
  --lacquer: #100d0b;
  --panel: rgba(17, 13, 11, .88);
  --ivory: #eee6d4;
  --muted: #9c9079;
  --gold: #bb9652;
  --gold-bright: #e0bf78;
  --crimson: #651d24;
  --line: rgba(187, 150, 82, .3);
}

* { box-sizing: inherit; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: "Source Sans 3", Arial, sans-serif;
}

body { padding: 18px; }

.gateway-shell {
  width: min(1180px, 100%);
  min-height: 700px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border: 1px solid var(--gold);
  background: var(--lacquer);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .58), inset 0 0 0 5px var(--black), inset 0 0 0 6px rgba(187, 150, 82, .24);
}

.invite-field,
.access-panel { position: relative; overflow: hidden; }

.invite-field,
.candidate-grid {
  transform-style: preserve-3d;
  will-change: transform;
}

.invite-field {
  min-height: 700px;
  padding: 36px 44px;
  border-right: 1px solid var(--line);
  background-color: #0a0807;
  background-image: linear-gradient(rgba(5, 4, 3, .14), rgba(5, 4, 3, .62)), url("assets/inner-orbit-occult-engraving.webp");
  background-position: 35% center;
  background-size: cover;
}

.invite-field::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(187, 150, 82, .22);
  pointer-events: none;
}

.field-head,
.panel-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font: 8px DM Mono, monospace;
  color: var(--muted);
}

.field-head b,
.panel-head i { color: var(--gold-bright); font-style: normal; }

.eyebrow {
  position: relative;
  z-index: 2;
  margin: 72px 0 20px;
  color: var(--gold);
  font: 8px DM Mono, monospace;
}

h1,
h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: .88;
  letter-spacing: 0;
}

h1 { max-width: 520px; font-size: clamp(64px, 7vw, 96px); text-shadow: 0 3px 30px #000; }
h1 em,
h2 em { color: var(--gold-bright); font-style: italic; }

.candidate-grid {
  position: relative;
  z-index: 2;
  width: min(430px, 100%);
  margin: 58px 0 35px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.candidate-grid i {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(187, 150, 82, .38);
  border-radius: 50%;
  background: rgba(8, 7, 6, .7);
  box-shadow: inset 0 0 18px rgba(187, 150, 82, .08), 0 0 0 3px rgba(8, 7, 6, .4);
  color: #8a744d;
  font: 500 clamp(12px, 2vw, 20px) "Cormorant Garamond", serif;
  animation: sealPulse 4.5s ease-in-out infinite;
  animation-delay: var(--delay);
}

.candidate-grid i:nth-child(odd) { transform: translateZ(12px); }
.candidate-grid i:nth-child(even) { transform: translateZ(22px); }

.candidate-grid i:nth-child(4n) { border-color: var(--gold); color: var(--gold-bright); }
.candidate-grid i:nth-child(7n) { border-color: rgba(126, 38, 45, .85); color: #b7696e; }
@keyframes sealPulse { 50% { transform: scale(.92); opacity: .58; } }

.field-copy {
  position: relative;
  z-index: 2;
  max-width: 390px;
  color: #b6aa93;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
}

.access-panel {
  min-height: 700px;
  padding: 36px 44px 76px;
  background-color: var(--lacquer);
  background-image: linear-gradient(rgba(16, 13, 11, .94), rgba(8, 7, 6, .98)), url("assets/inner-orbit-occult-engraving.webp");
  background-position: right center;
  background-size: auto 100%;
}

.access-panel::before {
  content: "✦";
  position: absolute;
  right: 42px;
  top: 74px;
  color: var(--gold);
  font-size: 20px;
}

.panel-head i::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 14px #9d3640;
}

.access-panel .eyebrow { margin-top: 62px; }
.access-panel h2 { max-width: 470px; font-size: clamp(50px, 6vw, 76px); }

.gateway-form { margin-top: 40px; }
.gateway-form label { display: block; margin-bottom: 10px; color: var(--muted); font: 8px DM Mono, monospace; }
.gateway-form > div { display: grid; grid-template-columns: 1fr 52px; }

.gateway-form input {
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  outline: none;
  background: rgba(3, 3, 2, .62);
  color: var(--ivory);
  font: 500 13px DM Mono, monospace;
}

.gateway-form input:focus { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--crimson); }
.gateway-form button,
.gateway-result button {
  border: 1px solid var(--gold);
  border-radius: 0;
  background: var(--gold);
  color: #15100a;
  cursor: pointer;
}

.route-divider { display: flex; align-items: center; gap: 14px; margin-top: 50px; color: var(--muted); font: 7px DM Mono, monospace; }
.route-divider::before,
.route-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.lookup-block .eyebrow { margin-top: 34px; }
.lookup-block .gateway-form { margin-top: 18px; }

.gateway-error { padding: 12px 14px; border-left: 2px solid #9c3842; background: rgba(101, 29, 36, .18); color: #d8a1a5; font-size: 11px; }
.privacy-note { position: absolute; left: 44px; right: 44px; bottom: 20px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: #766d5d; font: 7px/1.5 DM Mono, monospace; }

.gateway-result { position: relative; z-index: 2; padding-top: 45px; }
.result-avatar { width: 82px; height: 82px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--gold); border-radius: 50%; background: var(--gold); color: #171009; box-shadow: 0 0 0 7px rgba(187, 150, 82, .08); font: 15px DM Mono; }
.result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gateway-result .eyebrow { margin: 30px 0 18px; }
.gateway-result h2 { font-size: clamp(48px, 6vw, 74px); }
.gateway-result h4 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(28px, 3.5vw, 42px); line-height: 1; font-weight: 500; }
.gateway-result h4 em { color: var(--gold-bright); font-style: italic; }
.gateway-result > p:not(.eyebrow) { max-width: 440px; color: #b6aa93; font-family: "Cormorant Garamond", Georgia, serif; font-size: 18px; line-height: 1.5; }
.gateway-result form { margin-top: 30px; }
.gateway-result button { min-height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 45px; font: 600 10px "Source Sans 3", sans-serif; }
.gateway-result dl { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gateway-result dl div { padding: 18px 0; }
.gateway-result dt { color: var(--muted); font: 7px DM Mono; }
.gateway-result dd { margin: 8px 0 0; color: var(--gold-bright); font-size: 13px; text-transform: capitalize; }
.gateway-result a { display: inline-block; margin-top: 16px; color: var(--gold-bright); font-size: 11px; }

@media (max-width: 760px) {
  body { padding: 0; }
  .gateway-shell { grid-template-columns: 1fr; border-left: 0; border-right: 0; box-shadow: none; }
  .invite-field { min-height: 650px; padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--gold); background-position: 42% center; }
  .access-panel { min-height: 720px; padding: 28px 24px 86px; }
  .candidate-grid { margin: 42px 0 28px; gap: 10px; }
  .privacy-note { left: 24px; right: 24px; }
  .field-head,
  .panel-head { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .candidate-grid i { animation: none; transform: none; }
}
