/* Omega Overlords — site styles
   Palette: dark base + MH-style red/gold + custom rarity color accents.
   Single stylesheet, no preprocessor. Mobile-first. */

:root {
  --bg-0: #0a0a0b;
  --bg-1: #111114;
  --bg-2: #16161b;
  --bg-card: #1c1c22;
  --border: #2a2a32;
  --border-strong: #3a3a45;

  --text: #e7e7ea;
  --text-muted: #9b9ba5;
  --text-dim: #6f6f7a;

  --accent: #dc143c;          /* MH red, also our Godlike rarity color */
  --accent-hover: #ff2a52;
  --gold: #d4a836;

  /* Custom rarity palette — matches docs/CustomRarity/11-CLIENT-EXTENDED-TIER-COLORS-AND-TOOLING.md */
  --rarity-mythic: #7B2FBE;
  --rarity-divine: #4B9CD3;
  --rarity-astral: #FFB6C1;
  --rarity-godlike: #DC143C;
  --rarity-secret: #1A1A1A;

  --status-online: #36c476;
  --status-offline: #c43636;
  --status-loading: #c4a836;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hero: 0 30px 80px rgba(0, 0, 0, 0.55);
  --max-w: 1180px;

  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

p { margin: 0 0 1em; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  background: var(--bg-1);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.code-block {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0 0;
  overflow-x: auto;
  color: #e7e7ea;
}

.code-block code {
  background: transparent;
  border: none;
  padding: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }

.brand-logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(220, 20, 60, 0.35));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.brand:hover .brand-logo {
  filter: drop-shadow(0 0 14px rgba(220, 20, 60, 0.6));
  transform: scale(1.04);
}

.brand-glyph {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(220, 20, 60, 0.08);
}

.brand-name { font-size: 0.95rem; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.primary-nav a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-cta:hover { background: var(--accent-hover); text-decoration: none; }

@media (max-width: 720px) {
  .primary-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 100px 28px 80px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% -20%, rgba(220, 20, 60, 0.18), transparent 60%),
              linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(123, 47, 190, 0.08), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(75, 156, 211, 0.08), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 16px;
}

.hero h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero h1 .omega {
  display: inline-block;
  margin-right: 0.2em;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
}

/* Hero brand mark — static logo */
.hero-mark {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 40px rgba(220, 20, 60, 0.35));
}

.hero-mark-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .hero-mark { max-width: 240px; margin-bottom: 20px; }
}

.hero-accent {
  background: linear-gradient(180deg, var(--accent) 0%, #8a0e26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 18px 0 8px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text);
  font-weight: 500;
}

.hero-sub {
  max-width: 680px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn-block { display: block; width: 100%; }

/* ---------- Live status badge (in hero) ---------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-loading);
  box-shadow: 0 0 10px currentColor;
  color: var(--status-loading);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot[data-state="online"]  { background: var(--status-online); color: var(--status-online); }
.status-dot[data-state="offline"] { background: var(--status-offline); color: var(--status-offline); animation: none; }
.status-dot[data-state="loading"] { background: var(--status-loading); color: var(--status-loading); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ---------- Sections ---------- */

.section {
  padding: 80px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-alt {
  max-width: none;
  margin: 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-alt > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-foot {
  text-align: center;
  color: var(--text-muted);
  margin-top: 40px;
}

/* ---------- Quick start steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.step-num {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 50%;
  font-size: 1rem;
}

.steps h3 { margin-top: 8px; }

/* ---------- Perks grid ---------- */

.perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.perk {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.perk::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--rarity-mythic), var(--rarity-divine));
  opacity: 0.6;
}

.perk:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.perk-icon {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 12px;
  margin-bottom: 14px;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 56px;
}

.perk-icon-sub {
  font-size: 0.75em;
  font-weight: 600;
  opacity: 0.65;
  margin-left: 2px;
}

.perk h3 { margin-bottom: 8px; }
.perk p { color: var(--text-muted); margin-bottom: 0; }

.rarity-swatches {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.85rem;
  color: var(--text);
}

.rarity-swatches li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rarity-swatches .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.rarity-swatches .dot-secret {
  border: 1px solid #555;
  box-shadow: none;
}

/* ---------- Live stats ---------- */

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.stat-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text);
}

.region-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 80px;
}

.region-list h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.region-empty {
  margin: 0;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
}

.region-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.region-row:last-child { border-bottom: none; }

.region-name { color: var(--text); }
.region-difficulty { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; }
.region-uptime { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- Install grid ---------- */

.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.install-card,
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.install-card ol { padding-left: 1.2em; margin: 0 0 1em; }
.install-card li { margin-bottom: 0.5em; }

.recommended {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(54, 196, 118, 0.15);
  color: var(--status-online);
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  vertical-align: middle;
}

.soon {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(196, 168, 54, 0.15);
  color: var(--gold);
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  vertical-align: middle;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
}

.about-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.about-side h3 { margin-top: 0; }

.about-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.about-side li { padding: 6px 0; border-top: 1px solid var(--border); }
.about-side li:first-child { border-top: none; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 50px 28px 30px;
  margin-top: 40px;
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

.footer-grid h4 { color: var(--text); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--text); }

.brand-footer { margin: 0 0 8px; font-size: 0.85rem; }

.legal {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.site-footer-compact { padding: 24px 28px; margin-top: 0; }
.site-footer-compact .legal { padding-top: 0; border: none; }

/* ---------- Register page ---------- */

.page-narrow main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 60px 28px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.register-card {
  width: 100%;
  max-width: 460px;
}

.register-card h1 { font-size: 1.8rem; margin-bottom: 8px; }
.register-card .eyebrow { margin-bottom: 8px; }

.register-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.register-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.register-card input {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.register-card input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-0);
}

.register-card input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--status-offline);
}

.field-hint {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 400;
}

.form-result {
  min-height: 20px;
  font-size: 0.9rem;
  padding: 0;
}

.form-result.error {
  color: var(--status-offline);
  background: rgba(196, 54, 54, 0.08);
  border: 1px solid rgba(196, 54, 54, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.form-result.success {
  color: var(--status-online);
  background: rgba(54, 196, 118, 0.08);
  border: 1px solid rgba(54, 196, 118, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Closed-beta banner ---------- */

.beta-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(90deg, rgba(196, 168, 54, 0.18), rgba(220, 20, 60, 0.18));
  border-bottom: 1px solid rgba(196, 168, 54, 0.35);
  font-size: 0.9rem;
  color: var(--text);
  text-align: center;
  flex-wrap: wrap;
}

.beta-banner a { color: var(--gold); font-weight: 600; }
.beta-banner a:hover { color: #ffd76b; }

.beta-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gold);
  color: #1a1100;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .beta-banner { font-size: 0.82rem; padding: 8px 14px; gap: 8px; }
}

/* ---------- Ethics card (no P2W / donations only) ---------- */

.ethics-card {
  margin: 50px auto 0;
  max-width: var(--max-w);
  background: linear-gradient(135deg, rgba(123, 47, 190, 0.08), rgba(75, 156, 211, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.ethics-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ethics-card h3 span { font-size: 1.4rem; }

.ethics-card > p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.ethics-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 24px;
}

.ethics-list li {
  position: relative;
  padding: 10px 12px 10px 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.ethics-list li::before {
  content: "\2713";
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--status-online);
  font-weight: 800;
}

.ethics-list strong { color: var(--text); }

/* ---------- Mini ethics box (used on /register coming-soon page) ---------- */

.ethics-mini {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ethics-mini h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ethics-mini ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ethics-mini li {
  padding: 4px 0;
  color: var(--text);
  font-size: 0.92rem;
}

/* ---------- Smaller button variant (used in install cards) ---------- */

.btn-small {
  padding: 8px 16px;
  font-size: 0.88rem;
}
