/* ─── Deadlock Forge — Hub / Home ───────────────────────────────────────────
   Same noir-industrial palette. Centred layout. Two large module cards.
─────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:        #1c1916;
  --bg-1:      #252119;
  --bg-2:      #2e2a22;
  --bg-3:      #3a352c;
  --ink:       #f2ead8;
  --ink-dim:   #c0ae96;
  --ink-faint: #8a7a68;
  --line:      #4a4238;
  --line-hot:  #6e5c48;
  --brass:     #d4a86a;
  --brass-hot: #f3c789;
  --brass-dim: #8a6d45;
  --blood:     #c14a2d;
  --blood-hot: #e25c3a;
  --teal:      #4fa391;

  --font-display: "Syncopate", "Arial Narrow", sans-serif;
  --font-mono:    "IBM Plex Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ─── overlays ───────────────────────────────────────── */

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: 0.025; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(0,0,0,0.5) 100%);
}

/* ─── page shell ─────────────────────────────────────── */

.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 0;
}

/* ─── header ─────────────────────────────────────────── */

.hub-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeUp 0.6s ease both;
}

.brand-mark {
  font-family: var(--font-display);
  color: var(--brass);
  letter-spacing: 0.5em;
  font-size: 12px;
  margin-bottom: 20px;
}

.brand-name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  line-height: 1;
}
.brand-dead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: 0.38em;
  color: var(--ink);
}
.brand-forge {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: 0.38em;
  color: var(--brass);
}

.brand-sub {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─── rule ───────────────────────────────────────────── */

.rule {
  display: flex; align-items: center;
  width: 100%; max-width: 820px;
  margin-bottom: 36px;
  gap: 16px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-hot));
}
.rule::after {
  background: linear-gradient(to left, transparent, var(--line-hot));
}
.rule-glyph {
  color: var(--brass-dim);
  font-size: 10px;
  flex-shrink: 0;
}
.rule-bottom {
  margin-top: 36px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s 0.35s ease both;
}

/* ─── module grid ────────────────────────────────────── */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  width: 100%; max-width: 820px;
  animation: fadeUp 0.6s 0.2s ease both;
}

/* ─── module card ────────────────────────────────────── */

.module-card {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-1);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;

  /* corner notch */
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.module-card::before {
  /* decorative diagonal line in corner notch */
  content: "";
  position: absolute; top: 0; right: 0;
  width: 24px; height: 24px;
  background: linear-gradient(135deg, transparent 50%, var(--line-hot) 50%, var(--line-hot) 52%, transparent 52%);
  pointer-events: none;
}
.module-card:hover {
  border-color: var(--brass-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--brass-dim);
}
.module-card:hover .card-cta .arrow {
  transform: translateX(6px);
}
.module-card:hover .card-glyph {
  color: var(--brass-hot);
}

.card-inner {
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 0;
}

.card-status {
  display: inline-flex;
  align-self: flex-start;
  font-size: 9px;
  letter-spacing: 0.3em;
  padding: 2px 7px;
  border: 1px solid;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: var(--font-mono);
}
.card-status.live {
  color: var(--teal);
  border-color: var(--teal);
  background: rgba(79,163,145,0.08);
}
.card-status.soon {
  color: var(--ink-faint);
  border-color: var(--line-hot);
}

.card-glyph {
  font-size: 28px;
  color: var(--brass-dim);
  margin-bottom: 12px;
  transition: color 0.2s;
  line-height: 1;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.38em;
  color: var(--ink);
  margin-bottom: 14px;
}

.card-desc {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.65;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  flex: 1;
}

.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.meta-dot { color: var(--line-hot); }

.card-cta {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--brass);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.card-cta .arrow {
  display: inline-block;
  transition: transform 0.2s;
}

/* Online indicator — subtle bottom border glow when API is live */
.module-card.online {
  border-bottom-color: var(--teal);
  box-shadow: 0 2px 12px rgba(79,163,145,0.12);
}

/* ─── footer ─────────────────────────────────────────── */

.hub-footer {
  text-align: center;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  line-height: 2;
  animation: fadeUp 0.6s 0.4s ease both;
}

/* ─── animation ──────────────────────────────────────── */

/* ─── floating widgets (bottom-right) ─────────────────────────── */

.float-widgets {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 200;
  /* ensure nothing from .page affects these */
  pointer-events: none;
}

.float-btn {
  pointer-events: all;
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-hot);
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
  cursor: pointer;
  overflow: visible;
}
.float-btn:hover {
  color: var(--brass);
  border-color: var(--brass-dim);
  background: var(--bg-3);
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}

.float-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

/* tooltip bubble — appears to the left on hover */
.float-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-2);
  border: 1px solid var(--line-hot);
  padding: 8px 12px;
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  white-space: normal;
}
/* arrow pointing right toward the button */
.float-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--bg-2);
  border-top: 1px solid var(--line-hot);
  border-right: 1px solid var(--line-hot);
}
.float-btn:hover .float-tooltip { opacity: 1; }

.float-tooltip-title {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--brass);
  text-transform: uppercase;
  white-space: nowrap;
}
.float-tooltip-sub {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  line-height: 1.45;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── responsive ─────────────────────────────────────── */

@media (max-width: 520px) {
  .brand-name { flex-direction: column; gap: 4px; }
  .card-inner { padding: 22px 20px 18px; }
}
