:root {
  color-scheme: dark;
  --text: #e8edf4;
  --muted: #aab5c2;
  --faint: rgba(169, 190, 214, 0.62);
  --blue: #5ea8ff;
  --blue-strong: #7bb8ff;
  --line: rgba(136, 171, 207, 0.24);
  --panel: rgba(3, 10, 17, 0.78);
  --panel-deep: rgba(2, 7, 12, 0.9);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #02070d;
}

body.night-raven-home {
  min-height: 100svh;
  font-family: "Arial Narrow", "Roboto Condensed", "Bahnschrift Condensed", "Agency FB", Arial, sans-serif;
  color: var(--text);
  letter-spacing: 0;
}

.home-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.74) 100%),
    radial-gradient(circle at 50% 36%, rgba(35, 69, 103, 0.22), rgba(2, 7, 12, 0.28) 42%, rgba(2, 7, 12, 0.72) 88%),
    url("/assets/night-raven-background.png") center / cover no-repeat;
}

.home-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 20%, transparent 78%, rgba(0, 0, 0, 0.38)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.38;
  pointer-events: none;
}

.command-stack {
  align-self: center;
  justify-self: center;
  width: min(1160px, calc(100vw - 36px));
  margin: clamp(12px, 2vh, 30px) auto;
  padding: clamp(12px, 1.7vw, 22px);
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(20, 43, 65, 0.34), rgba(1, 6, 11, 0.08) 62%, transparent 100%);
  border: 1px solid rgba(118, 154, 188, 0.08);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.22);
}

.patch-lockup {
  width: clamp(96px, 9vw, 138px);
  height: clamp(96px, 9vw, 138px);
  margin: 0 auto clamp(10px, 1.7vh, 18px);
  padding: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02) 56%, rgba(0, 0, 0, 0.5) 100%);
  border: 1px solid rgba(180, 198, 217, 0.32);
  box-shadow:
    0 0 0 8px rgba(4, 12, 20, 0.34),
    0 18px 36px rgba(0, 0, 0, 0.54),
    0 0 32px rgba(86, 146, 205, 0.12);
}

.patch-lockup img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: clamp(0.78rem, 1.15vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

h1 {
  margin: 0;
  color: #f3f5f8;
  font-family: Impact, "Arial Black", "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(3.2rem, 6.8vw, 7.35rem);
  line-height: 0.86;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.72),
    0 18px 34px rgba(0, 0, 0, 0.82),
    0 0 24px rgba(166, 191, 219, 0.16);
}

.motto {
  margin: clamp(8px, 1.4vh, 14px) 0 0;
  color: var(--blue-strong);
  font-size: clamp(1rem, 1.55vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: 0.32em;
}

.descriptor {
  margin: 9px auto 0;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.primary-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: clamp(18px, 3vh, 30px);
}

.discord-button,
.secondary-action {
  min-height: 58px;
  border: 1px solid rgba(144, 174, 207, 0.48);
  background: linear-gradient(180deg, rgba(8, 23, 38, 0.92), rgba(3, 12, 21, 0.96));
  color: #f6f8fb;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(64, 125, 204, 0.12);
}

.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(400px, 86vw);
  gap: 16px;
  padding: 0 30px;
  clip-path: polygon(5% 0, 95% 0, 100% 28%, 100% 72%, 95% 100%, 5% 100%, 0 72%, 0 28%);
}

.discord-button:hover,
.discord-button:focus-visible {
  border-color: rgba(125, 184, 255, 0.88);
  background: linear-gradient(180deg, rgba(17, 42, 68, 0.96), rgba(6, 20, 34, 0.98));
  box-shadow: 0 0 34px rgba(78, 151, 255, 0.26), 0 16px 38px rgba(0, 0, 0, 0.48);
  outline: none;
}

.discord-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 38px;
  border-radius: 18px;
  overflow: hidden;
  color: transparent;
  background:
    radial-gradient(circle at 35% 54%, #061021 0 4px, transparent 5px),
    radial-gradient(circle at 65% 54%, #061021 0 4px, transparent 5px),
    radial-gradient(circle at 50% 72%, rgba(6, 16, 33, 0.9) 0 5px, transparent 6px),
    #667dff;
  box-shadow: 0 0 18px rgba(102, 125, 255, 0.34);
}

.secondary-action {
  padding: 0 24px;
  cursor: pointer;
}

.auth-note {
  min-height: 1.2em;
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(720px, 100%);
  margin: clamp(14px, 2.4vh, 22px) auto 0;
  padding: 1px;
  background: var(--line);
  border: 1px solid rgba(124, 158, 193, 0.18);
}

.server-links div {
  padding: 10px 12px;
  background: rgba(2, 9, 16, 0.74);
}

.server-links dt {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.server-links dd {
  margin: 0;
  color: #d9e3ef;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  overflow-wrap: anywhere;
}

.protected-nav {
  position: absolute;
  left: 20px;
  top: 20px;
}

.disclaimer-panel {
  align-self: end;
  width: 100%;
  padding: 12px clamp(18px, 4vw, 64px) 12px;
  background: linear-gradient(180deg, rgba(2, 8, 14, 0.68), var(--panel-deep));
  border-top: 1px solid rgba(128, 161, 193, 0.32);
  box-shadow: 0 -24px 54px rgba(0, 0, 0, 0.42);
}

.disclaimer-panel h2 {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.92rem;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1560px;
  margin: 0 auto;
}

.disclaimer-grid p {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(139, 166, 194, 0.24);
  color: rgba(220, 228, 236, 0.72);
  font-size: clamp(0.68rem, 0.72vw, 0.8rem);
  line-height: 1.35;
}

.disclaimer-grid p:first-child {
  border-left: 0;
  padding-left: 0;
}

.disclaimer-final {
  margin: 8px 0 0;
  color: var(--blue);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
}

@media (max-height: 820px) and (min-width: 900px) {
  .home-shell {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .patch-lockup {
    width: 92px;
    height: 92px;
    margin-bottom: 8px;
  }

  .primary-actions {
    margin-top: 16px;
  }

  .server-links {
    margin-top: 12px;
  }

  .disclaimer-panel {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (max-width: 900px) {
  .home-shell {
    grid-template-rows: auto auto;
    min-height: 100svh;
    overflow-y: auto;
  }

  .command-stack {
    align-self: start;
    margin-top: 36px;
  }

  h1 {
    white-space: normal;
  }

  .descriptor {
    line-height: 1.6;
  }

  .server-links,
  .disclaimer-grid {
    grid-template-columns: 1fr;
  }

  .disclaimer-grid {
    gap: 10px;
  }

  .disclaimer-grid p,
  .disclaimer-grid p:first-child {
    padding-left: 12px;
    border-left: 1px solid rgba(139, 166, 194, 0.24);
  }
}

@media (max-width: 560px) {
  .command-stack {
    width: min(100vw - 18px, 860px);
    padding: 16px 10px;
  }

  .motto,
  .descriptor,
  .eyebrow {
    letter-spacing: 0.14em;
  }

  .discord-button {
    min-height: 60px;
    gap: 10px;
    padding: 0 18px;
  }

  .discord-mark {
    width: 48px;
    height: 32px;
  }
}
