/* Four ultra-minimal landing portals — almost nothing but air + chrome + buttons */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');
@import './core.css';

.hub {
  --hub-sans: 'Instrument Sans', system-ui, sans-serif;
  --hub-display: 'Syne', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--hub-sans);
  position: relative;
  isolation: isolate;
}

.hub a.ej-skip:focus {
  outline-color: currentColor;
}

/* —— Shared chrome —— */
.hub__bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(0.85rem, 3vw, 1.35rem);
  border-bottom: 1px solid var(--hub-line, rgba(255, 255, 255, 0.08));
  background: var(--hub-bar-bg, transparent);
  backdrop-filter: blur(10px);
}

.hub__mark {
  font-family: var(--hub-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--hub-fg, #e8e6e3);
  opacity: 0.85;
}

.hub__mark:hover {
  opacity: 1;
}

.hub__jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  justify-content: flex-end;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hub__jump a {
  color: var(--hub-muted, rgba(255, 255, 255, 0.45));
  text-decoration: none;
  transition: color 0.2s ease;
}

.hub__jump a:hover {
  color: var(--hub-fg, #fff);
}

.hub__jump a[aria-current='page'] {
  color: var(--hub-accent, #fff);
}

/* Center stage: the only “content” */
.hub__void {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  position: relative;
}

.hub__orbit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2rem);
}

/* Sleek buttons: glass / wire / glow per hub */
.hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  max-width: 42rem;
}

.hub__btn {
  appearance: none;
  border: 1px solid var(--hub-btn-border, rgba(255, 255, 255, 0.18));
  background: var(--hub-btn-bg, rgba(255, 255, 255, 0.04));
  color: var(--hub-fg, #f0eeeb);
  font-family: var(--hub-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  backdrop-filter: blur(12px);
}

.hub__btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--hub-btn-border-hover, rgba(255, 255, 255, 0.45));
  box-shadow: var(--hub-btn-glow, 0 0 40px rgba(255, 255, 255, 0.08));
}

.hub__btn:active {
  transform: translateY(0) scale(0.99);
}

.hub__btn--quiet {
  opacity: 0.75;
}

.hub__glyph {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hub-accent, #fff);
  opacity: 0.35;
  box-shadow: 0 0 18px var(--hub-accent, #fff);
}

.hub__feet {
  position: relative;
  z-index: 2;
  padding: 0.5rem 1rem 1rem;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hub-muted, rgba(255, 255, 255, 0.28));
  text-align: center;
}

.hub__feet a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Light paper — same bar/feet geometry as hubs, tuned for warm surfaces (About) */
.hub__bar--light {
  --hub-fg: #2c2720;
  --hub-muted: rgba(44, 39, 32, 0.42);
  --hub-line: rgba(44, 39, 32, 0.09);
  --hub-accent: #6b5a32;
  --hub-bar-bg: rgba(255, 252, 247, 0.88);
  border-bottom-color: var(--hub-line);
  background: var(--hub-bar-bg);
}

.hub__bar--light .hub__mark {
  color: var(--hub-fg);
  opacity: 0.92;
}

.hub__bar--light .hub__jump a {
  color: var(--hub-muted);
}

.hub__bar--light .hub__jump a:hover {
  color: var(--hub-fg);
}

.hub__bar--light .hub__jump a[aria-current='page'] {
  color: var(--hub-accent);
}

.hub__feet--light {
  color: rgba(44, 39, 32, 0.4);
  border-top: 1px solid rgba(44, 39, 32, 0.07);
  padding-top: 1rem;
}

.hub__feet--light a {
  color: rgba(44, 39, 32, 0.52);
}

.hub__feet--light a:hover {
  color: #2c2720;
}

/* Deep interior pages — same rhythm as hubs, zone-tinted */
.hub__bar--vibe-deep {
  --hub-fg: #f2ede6;
  --hub-muted: rgba(242, 237, 230, 0.42);
  --hub-line: rgba(255, 210, 150, 0.14);
  --hub-accent: #e8b04a;
  --hub-bar-bg: rgba(8, 12, 10, 0.72);
  border-bottom-color: var(--hub-line);
  background: var(--hub-bar-bg);
}

.hub__bar--vibe-deep .hub__mark {
  color: var(--hub-fg);
  opacity: 0.9;
}

.hub__bar--vibe-deep .hub__jump a {
  color: var(--hub-muted);
}

.hub__bar--vibe-deep .hub__jump a:hover,
.hub__bar--vibe-deep .hub__jump a[aria-current='page'] {
  color: var(--hub-fg);
}

.hub__bar--evan {
  --hub-fg: #e8ecf2;
  --hub-muted: rgba(160, 175, 195, 0.5);
  --hub-line: rgba(120, 190, 255, 0.16);
  --hub-accent: #8ec8ff;
  --hub-bar-bg: rgba(6, 8, 12, 0.82);
  border-bottom-color: var(--hub-line);
  background: var(--hub-bar-bg);
}

.hub__bar--evan .hub__mark {
  color: var(--hub-fg);
  opacity: 0.92;
}

.hub__bar--evan .hub__jump a {
  color: var(--hub-muted);
}

.hub__bar--evan .hub__jump a:hover,
.hub__bar--evan .hub__jump a[aria-current='page'] {
  color: var(--hub-fg);
}

.hub__bar--jade {
  --hub-fg: #1a1f28;
  --hub-muted: rgba(26, 31, 40, 0.48);
  --hub-line: rgba(0, 120, 130, 0.12);
  --hub-accent: #1e6b6f;
  --hub-bar-bg: rgba(255, 253, 250, 0.92);
  border-bottom-color: var(--hub-line);
  background: var(--hub-bar-bg);
}

.hub__bar--jade .hub__mark {
  color: var(--hub-fg);
  opacity: 0.92;
}

.hub__bar--jade .hub__jump a {
  color: var(--hub-muted);
}

.hub__bar--jade .hub__jump a:hover,
.hub__bar--jade .hub__jump a[aria-current='page'] {
  color: var(--hub-fg);
}

.hub__bar--unleashed-deep {
  --hub-fg: #f6e8ee;
  --hub-muted: rgba(246, 232, 238, 0.4);
  --hub-line: rgba(255, 140, 180, 0.16);
  --hub-accent: #ff9ec4;
  --hub-bar-bg: rgba(14, 8, 12, 0.78);
  border-bottom-color: var(--hub-line);
  background: var(--hub-bar-bg);
}

.hub__bar--unleashed-deep .hub__mark {
  color: var(--hub-fg);
  opacity: 0.92;
}

.hub__bar--unleashed-deep .hub__jump a {
  color: var(--hub-muted);
}

.hub__bar--unleashed-deep .hub__jump a:hover,
.hub__bar--unleashed-deep .hub__jump a[aria-current='page'] {
  color: var(--hub-fg);
}

.hub__feet--vibe-deep {
  color: rgba(240, 235, 227, 0.38);
  border-top: 1px solid rgba(255, 220, 160, 0.1);
  padding-top: 1rem;
  margin-top: auto;
}

.hub__feet--vibe-deep a {
  color: rgba(255, 245, 230, 0.48);
}

.hub__feet--evan {
  color: rgba(180, 195, 215, 0.42);
  border-top: 1px solid rgba(120, 180, 255, 0.12);
  padding-top: 1rem;
  margin-top: auto;
}

.hub__feet--evan a {
  color: rgba(200, 215, 235, 0.55);
}

.hub__feet--jade {
  color: rgba(60, 65, 72, 0.45);
  border-top: 1px solid rgba(0, 100, 120, 0.1);
  padding-top: 1rem;
  margin-top: auto;
}

.hub__feet--jade a {
  color: rgba(50, 60, 75, 0.55);
}

.hub__feet--unleashed {
  color: rgba(230, 200, 210, 0.4);
  border-top: 1px solid rgba(255, 140, 180, 0.12);
  padding-top: 1rem;
  margin-top: auto;
}

.hub__feet--unleashed a {
  color: rgba(255, 200, 220, 0.5);
}

.hub__whisper {
  margin: 0;
  max-width: 18rem;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--hub-muted);
}

/* ═══ 1 · Universe (root) — void + constellation ═══ */
.hub--universe {
  --hub-fg: #eceae6;
  --hub-muted: rgba(236, 234, 230, 0.35);
  --hub-line: rgba(255, 255, 255, 0.06);
  --hub-accent: #c9a227;
  --hub-btn-border: rgba(201, 162, 39, 0.35);
  --hub-btn-bg: rgba(201, 162, 39, 0.06);
  --hub-btn-border-hover: rgba(201, 162, 39, 0.65);
  --hub-btn-glow: 0 0 50px rgba(201, 162, 39, 0.18);
  --hub-bar-bg: rgba(6, 6, 8, 0.35);
  background: #050506;
  color: var(--hub-fg);
}

.hub--universe::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 45%, rgba(201, 162, 39, 0.07), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(80, 120, 200, 0.06), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(200, 100, 140, 0.05), transparent 40%);
  pointer-events: none;
}

.hub--universe::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 40% 90%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255, 255, 255, 0.3), transparent);
  background-size: 100% 100%;
  pointer-events: none;
  animation: hub-twinkle 14s ease-in-out infinite alternate;
}

@keyframes hub-twinkle {
  from {
    opacity: 0.25;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.42;
    transform: translate3d(-8px, 4px, 0);
  }
}

/* ═══ 2 · Vibe — dawn mist, almost white ═══ */
.hub--vibe {
  --hub-fg: #3a3228;
  --hub-muted: rgba(58, 50, 40, 0.4);
  --hub-line: rgba(58, 50, 40, 0.1);
  --hub-accent: #e8a849;
  --hub-btn-border: rgba(232, 168, 73, 0.45);
  --hub-btn-bg: rgba(255, 252, 246, 0.65);
  --hub-btn-border-hover: rgba(232, 168, 73, 0.85);
  --hub-btn-glow: 0 12px 40px rgba(232, 168, 73, 0.2);
  --hub-bar-bg: rgba(255, 252, 246, 0.55);
  background: #fefdfb;
  color: var(--hub-fg);
}

.hub--vibe::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: 0;
  background: conic-gradient(
    from 210deg at 50% 50%,
    rgba(255, 220, 180, 0.35),
    rgba(200, 235, 220, 0.25),
    rgba(255, 245, 210, 0.3),
    rgba(255, 220, 180, 0.35)
  );
  filter: blur(80px);
  animation: hub-dawn 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hub-dawn {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(25deg) scale(1.08);
  }
}

.hub--vibe .hub__btn {
  color: #3a3228;
}

/* ═══ 3 · HunterTech — cold signal, grid breath ═══ */
.hub--tech {
  --hub-fg: #d4e8f0;
  --hub-muted: rgba(180, 210, 220, 0.35);
  --hub-line: rgba(100, 200, 255, 0.12);
  --hub-accent: #5ee0d0;
  --hub-btn-border: rgba(94, 224, 208, 0.35);
  --hub-btn-bg: rgba(10, 20, 28, 0.55);
  --hub-btn-border-hover: rgba(94, 224, 208, 0.75);
  --hub-btn-glow: 0 0 45px rgba(94, 224, 208, 0.15);
  --hub-bar-bg: rgba(5, 10, 14, 0.65);
  background: #030608;
  color: var(--hub-fg);
}

.hub--tech::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(rgba(94, 224, 208, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 224, 208, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  animation: hub-grid 24s linear infinite;
  pointer-events: none;
}

@keyframes hub-grid {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(48px, 48px, 0);
  }
}

.hub--tech::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 50%, rgba(94, 224, 208, 0.06), transparent 55%);
  pointer-events: none;
}

/* ═══ 4 · Unleashed — velvet pulse ═══ */
.hub--unleashed {
  --hub-fg: #f3d6e4;
  --hub-muted: rgba(243, 214, 228, 0.38);
  --hub-line: rgba(200, 100, 150, 0.2);
  --hub-accent: #ff4d8d;
  --hub-btn-border: rgba(255, 77, 141, 0.45);
  --hub-btn-bg: rgba(40, 12, 28, 0.45);
  --hub-btn-border-hover: rgba(255, 77, 141, 0.85);
  --hub-btn-glow: 0 0 55px rgba(255, 77, 141, 0.2);
  --hub-bar-bg: rgba(8, 4, 8, 0.55);
  background: #0a0308;
  color: var(--hub-fg);
}

.hub--unleashed::before {
  content: '';
  position: fixed;
  inset: -30%;
  z-index: 0;
  background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(120, 30, 80, 0.35), transparent 60%),
    radial-gradient(ellipse 40% 35% at 70% 30%, rgba(60, 40, 120, 0.2), transparent 55%);
  animation: hub-vein 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hub-vein {
  from {
    transform: scale(1) rotate(0deg);
    opacity: 0.85;
  }
  to {
    transform: scale(1.12) rotate(6deg);
    opacity: 1;
  }
}

.hub--unleashed::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hub > * {
  position: relative;
  z-index: 1;
}

/* Full-screen enter bridge (see js/hubs-nav.js) — sits above hub chrome during fade */
.hub-bridge {
  mix-blend-mode: normal;
}

@media (prefers-reduced-motion: reduce) {
  .hub-bridge {
    opacity: 0 !important;
    transition: none !important;
  }
}
