@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&family=Bebas+Neue&display=swap');

:root {
  --bg: #030609;
  --bg-2: #071016;
  --panel: rgba(8, 15, 20, 0.88);
  --panel-2: rgba(13, 24, 31, 0.9);
  --line: rgba(109, 231, 255, 0.2);
  --line-strong: rgba(109, 231, 255, 0.48);
  --text: #edf7fb;
  --muted: #9aacb4;
  --dim: #607078;
  --cyan: #6de7ff;
  --red: #ff3347;
  --amber: #ffca78;
  --green: #86f3bd;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Syne, system-ui, sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.032) 0, rgba(255,255,255,0.032) 1px, transparent 1px, transparent 4px);
  opacity: 0.2;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
body.gated { overflow: hidden; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: rgba(3, 6, 9, 0.82);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: max-content;
  text-decoration: none;
}
.brand-sigil {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  transform: rotate(45deg);
  position: relative;
}
.brand-sigil::before, .brand-sigil::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,0.46);
}
.brand-sigil::after { inset: 10px; background: rgba(109,231,255,0.18); }
.brand-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  letter-spacing: 2.4px;
  line-height: 1;
  text-transform: uppercase;
}
.brand-title-full { white-space: nowrap; }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(13px, 2.4vw, 38px);
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.55px;
  text-transform: uppercase;
  color: #becbd0;
}
.nav::before {
  content: "";
  width: 1px;
  height: 34px;
  margin-right: clamp(6px, 0.8vw, 14px);
  flex: 0 0 auto;
  background: var(--line-strong);
}
.nav a { text-decoration: none; transition: color 160ms ease; }
.nav a:hover, .nav a.active { color: var(--cyan); }
.nav a.enter { color: var(--red); }

.hero {
  min-height: 76vh;
  padding: 132px 32px 56px;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(3,6,9,0.96) 0%, rgba(3,6,9,0.66) 38%, rgba(3,6,9,0.16) 100%),
    linear-gradient(0deg, rgba(3,6,9,0.96) 0%, rgba(3,6,9,0.1) 52%, rgba(3,6,9,0.74) 100%),
    url('https://raw.githubusercontent.com/HeartlessN3ko/realm-assets/main/locations/onboarding_room.png') center / cover no-repeat;
  filter: saturate(0.95) contrast(1.15) brightness(0.72);
}
.hero::after {
  content: "";
  position: absolute;
  right: 8vw;
  top: 17vh;
  width: min(34vw, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: -2;
  background:
    radial-gradient(circle, rgba(109,231,255,0.68) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(109,231,255,0.16), rgba(109,231,255,0.08) 42%, transparent 62%);
  background-size: 38px 38px, 100% 100%;
  border: 2px solid rgba(109,231,255,0.32);
  box-shadow: 0 0 70px rgba(109,231,255,0.32), inset 0 0 80px rgba(109,231,255,0.16);
  opacity: 0.82;
}
.hero.compact { min-height: 46vh; }
.hero.compact::after { opacity: 0.35; }
.container { width: min(1180px, 100%); margin: 0 auto; }
.hero-kicker, .kicker {
  font-family: 'DM Mono', monospace;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}
.hero-kicker { margin-bottom: 20px; }
h1, h2 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1.5px;
  line-height: 0.9;
  margin: 0;
}
h1 { font-size: clamp(64px, 9vw, 132px); max-width: 820px; }
h2 { font-size: clamp(42px, 5.8vw, 78px); }
h3 { margin: 0; font-size: 22px; }
p { color: var(--muted); line-height: 1.7; }
.hero-text { max-width: 660px; margin-top: 22px; font-size: 17px; color: #d9e7ec; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(109,231,255,0.09);
  color: var(--text);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { border-color: var(--cyan); background: rgba(109,231,255,0.16); }
.btn.red { border-color: rgba(255,51,71,0.64); color: #ffd8dd; background: rgba(255,51,71,0.12); }
.btn.ghost { color: var(--muted); background: rgba(3,6,9,0.42); }
.btn.wide { width: 100%; }

.section { padding: 78px 32px; border-top: 1px solid var(--line); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 44px;
  align-items: end;
  margin-bottom: 34px;
}
.kicker { color: var(--red); margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.panel, .card {
  background: var(--panel);
  border: 1px solid transparent;
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card .num {
  font-family: 'DM Mono', monospace;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.timeline { display: grid; gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.step {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: center;
  background: var(--panel);
  padding: 22px 26px;
}
.step-index {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--cyan);
  font-size: 42px;
}
.step-status {
  justify-self: end;
  font-family: 'DM Mono', monospace;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.portal-note {
  border: 1px solid rgba(255,51,71,0.42);
  background: rgba(255,51,71,0.08);
  padding: 18px;
  color: #ffd5da;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
}

.handbook { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.handbook-list, .handbook-main, .progress-card { background: var(--panel); padding: 26px; }
.handbook-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(109,231,255,0.14);
  text-decoration: none;
  color: inherit;
}
.handbook-item.active { border: 1px solid var(--line-strong); padding: 17px 14px; background: rgba(109,231,255,0.06); }
.handbook-item strong { display: block; font-size: 14px; }
.handbook-item span { color: var(--muted); font-size: 12px; }
.chapter-num { font-family: 'DM Mono', monospace; color: var(--cyan); font-size: 18px; }
.media-card {
  border: 1px solid var(--line);
  background: rgba(3,6,9,0.5);
  overflow: hidden;
}
.media-image {
  min-height: 250px;
  background: linear-gradient(180deg, rgba(3,6,9,0.02), rgba(3,6,9,0.78)), url('https://raw.githubusercontent.com/HeartlessN3ko/realm-assets/main/locations/dorm_lobby.png') center / cover no-repeat;
}
.media-body { padding: 22px; }
.slide-controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

.form-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.progress-card { position: sticky; top: 90px; border: 1px solid var(--line); }
.progress-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(109,231,255,0.12); color: var(--muted); font-size: 13px; }
.progress-dot { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-family: 'DM Mono', monospace; color: var(--cyan); }
.form-card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; }
.form-section { padding: 28px 0; border-top: 1px solid rgba(109,231,255,0.16); }
.form-section:first-child { padding-top: 0; border-top: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label { font-family: 'DM Mono', monospace; color: #bfd0d6; font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; }
input, textarea, select {
  width: 100%;
  color: var(--text);
  background: rgba(3,6,9,0.62);
  border: 1px solid rgba(109,231,255,0.2);
  padding: 12px 13px;
  outline: none;
}
textarea { min-height: 116px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(109,231,255,0.08); }
.file-zone { border: 1px dashed rgba(109,231,255,0.42); padding: 18px; background: rgba(109,231,255,0.05); }
.checks { display: grid; gap: 12px; margin-top: 20px; }
.checks label { display: flex; align-items: flex-start; gap: 10px; text-transform: none; letter-spacing: 0; font-family: Syne, system-ui, sans-serif; color: var(--muted); font-size: 14px; line-height: 1.5; }
.checks input { width: 16px; min-width: 16px; margin-top: 2px; }
.status-box { margin-top: 20px; border: 1px solid var(--line); background: rgba(3,6,9,0.56); color: var(--muted); padding: 16px; font-family: 'DM Mono', monospace; font-size: 12px; line-height: 1.65; }

.rules-list { display: grid; gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.rule { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 18px; padding: 24px; background: var(--panel); }
.rule-code { font-family: 'DM Mono', monospace; color: var(--red); letter-spacing: 2px; }

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 7, 0.82);
  backdrop-filter: blur(18px);
}
.login-panel {
  width: min(620px, 100%);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  padding: 30px;
}
.login-panel h2 { margin-bottom: 16px; }
.login-panel input { margin: 10px 0 0; }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); box-shadow: var(--shadow); }
.status-card { background: var(--panel); padding: 22px; }
.status-card strong { display: block; margin-top: 8px; font-family: 'DM Mono', monospace; color: var(--text); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.status-card.good strong { color: var(--green); }
.status-card.warn strong { color: var(--amber); }
.status-card.bad strong { color: var(--red); }
.account-chip { display: inline-flex; margin-top: 16px; border: 1px solid var(--line); padding: 10px 12px; color: var(--cyan); font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 1px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: var(--dim);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.footer span { color: var(--cyan); }

@media (max-width: 940px) {
  .site-header { position: static; height: auto; flex-direction: column; align-items: flex-start; padding: 18px 22px; }
  .nav { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 4px; font-size: 9px; }
  .nav::before { display: none; }
  .brand-title { font-size: 32px; letter-spacing: 1.8px; line-height: 0.92; }
  .brand-title-full { max-width: min(76vw, 430px); white-space: normal; }
  .hero { min-height: 72vh; padding: 70px 22px 44px; }
  .hero::after { right: -12vw; top: 20vh; width: 58vw; }
  .section { padding: 58px 22px; }
  .section-head, .grid-2, .grid-3, .handbook, .form-shell, .status-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 54px 1fr; }
  .step-status { grid-column: 2; justify-self: start; }
  .progress-card { position: static; }
  .fields { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
