/* MJ Sonder brand hub — cinematic editorial skin
   (mind-map structure, State of Sonder dark/gold visual language) */

:root {
  --hub-bg: #0a0a0a;
  --hub-surface: #141412;
  --hub-cream: #171614;            /* node fill (dark surface) */
  --hub-ink: #f2efea;              /* primary text (bone) */
  --hub-soft: #b5b0a6;             /* secondary text */
  --hub-fade: #7d786e;             /* faint text */
  --hub-rose: #c6a15b;             /* accent = muted gold */
  --hub-gold: #c6a15b;
  --hub-glow: rgba(198, 161, 91, 0.3);
  --hub-hairline: rgba(242, 239, 234, 0.12);
  --hub-red: #c62828;
  --hub-serif: "Bodoni Moda", "Didot", serif;
  --hub-sans: "Inter Tight", "Helvetica Neue", sans-serif;
}

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

body.hub {
  font-family: var(--hub-sans);
  color: var(--hub-ink);
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(198, 161, 91, 0.07), transparent),
    radial-gradient(ellipse 70% 60% at 80% 10%, rgba(198, 161, 91, 0.04), transparent),
    var(--hub-bg);
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

/* film grain */
body.hub::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* faint drifting embers instead of pastel sparkles */
.sparkle {
  position: fixed;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--hub-gold);
  opacity: 0.2;
  pointer-events: none;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.06; transform: scale(0.7); }
  to { opacity: 0.35; transform: scale(1.15); }
}

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

/* header block */
.hub-intro {
  position: absolute;
  top: 2.4rem;
  left: 3.5vw;
  max-width: 270px;
  z-index: 20;
}
.hub-wordmark {
  font-family: var(--hub-serif);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
}
.hub-wordmark .script {
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--hub-gold);
  display: block;
  margin-top: 0.35rem;
  margin-left: 2.2rem;
  letter-spacing: 0.06em;
}
.hub-intro p { margin-top: 1rem; font-size: 0.85rem; color: var(--hub-soft); }
.hub-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--hub-hairline);
  background: rgba(20, 20, 18, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hub-fade);
}
.hub-hint::before { content: "✦"; color: var(--hub-gold); }

/* the radial stage */
.hub-stage {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: none;
}
@media (min-width: 901px) { .hub-stage { display: block; } }

/* ambient ring */
.hub-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: min(64vh, 640px); height: min(64vh, 640px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(198, 161, 91, 0.22);
  box-shadow: 0 0 110px 4px rgba(198, 161, 91, 0.12), inset 0 0 80px rgba(198, 161, 91, 0.05);
  pointer-events: none;
}

/* center monogram */
.hub-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
}
.mj-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px; height: 118px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--hub-surface);
  border: 1px solid var(--hub-gold);
  box-shadow: 0 0 44px rgba(198, 161, 91, 0.18);
  font-family: var(--hub-serif);
  font-style: italic;
  font-size: 2.5rem;
  color: var(--hub-gold);
  cursor: pointer;
  transition: transform 0.35s, box-shadow 0.35s;
  position: relative;
}
.mj-monogram:hover { transform: scale(1.05); box-shadow: 0 0 60px var(--hub-glow); }

/* generic node */
.hub-node {
  position: absolute;
  left: 0; top: 0;
  z-index: 12;
}
.node-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  border: 1px solid rgba(198, 161, 91, 0.4);
  cursor: pointer;
  background: rgba(20, 20, 18, 0.78);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  color: var(--hub-gold);
  transition: transform 0.35s cubic-bezier(0.3, 1, 0.4, 1.15), box-shadow 0.35s, border-color 0.35s;
  position: relative;
}
.node-btn svg { width: 27px; height: 27px; }
.hub-node:hover .node-btn, .hub-node.open .node-btn {
  transform: scale(1.1);
  border-color: var(--hub-gold);
  box-shadow: 0 0 34px var(--hub-glow);
}
/* name label above icon on hover */
.node-name {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-family: var(--hub-serif);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--hub-ink);
  background: rgba(14, 14, 13, 0.92);
  border: 1px solid var(--hub-hairline);
  padding: 0.3rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.hub-node:hover .node-name, .hub-node.open .node-name, .hub-center:hover .node-name { opacity: 1; transform: translateX(-50%) translateY(0); }
.hub-center .node-name { bottom: auto; top: -40px; }

/* inner triad nodes */
.hub-node.inner .node-btn {
  width: 62px; height: 62px;
  margin: -31px 0 0 -31px;
  border-color: var(--hub-hairline);
  color: var(--hub-soft);
}
.hub-node.inner:hover .node-btn { border-color: var(--hub-gold); color: var(--hub-gold); }

/* bloom sub-icons */
.subs { position: absolute; top: 0; left: 0; }
.sub {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(23, 22, 20, 0.94);
  border: 1px solid rgba(198, 161, 91, 0.35);
  color: var(--hub-soft);
  transform: translate(0, 0) scale(0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.3, 1.2, 0.4, 1), opacity 0.35s;
}
.sub svg { width: 18px; height: 18px; }
.hub-node.open .sub, .hub-center.open .sub {
  transform: translate(var(--sx), var(--sy)) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.sub:hover { color: var(--hub-gold); border-color: var(--hub-gold); box-shadow: 0 0 20px var(--hub-glow); }
.sub .sub-name {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hub-ink);
  background: rgba(14, 14, 13, 0.94);
  border: 1px solid var(--hub-hairline);
  padding: 0.2rem 0.7rem;
  opacity: 0;
  transition: opacity 0.25s;
}
.sub:hover .sub-name { opacity: 1; }

/* BeLulu bloom keeps her pink world as a portal preview */
.hub-node.pink .node-btn { color: #f29ec4; border-color: rgba(242, 158, 196, 0.45); }
.hub-node.pink:hover .node-btn, .hub-node.pink.open .node-btn { border-color: #f29ec4; box-shadow: 0 0 34px rgba(242, 158, 196, 0.35); }
.hub-node.pink .sub { background: rgba(46, 18, 32, 0.95); border-color: rgba(242, 158, 196, 0.45); color: #f2b9d4; }
.hub-node.pink .sub:hover { color: #ffd9ec; border-color: #f29ec4; box-shadow: 0 0 20px rgba(242, 158, 196, 0.35); }

/* Books node: opening book animation on hover */
.hub-node.books .node-btn svg .page-l { transform-origin: 12px 12px; transition: transform 0.5s; }
.hub-node.books:hover .node-btn svg .page-l { transform: rotate(-14deg); }

/* Monroe node: red block text on hover */
.hub-node.monroe .monroe-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--hub-surface);
  opacity: 0;
  transition: opacity 0.3s;
}
.hub-node.monroe .monroe-text .m1 { color: var(--hub-red); font-size: 0.7rem; letter-spacing: 0.04em; font-family: Impact, "Arial Black", sans-serif; }
.hub-node.monroe .monroe-text .m2 { color: var(--hub-fade); font-size: 0.48rem; letter-spacing: 0.14em; margin-top: 2px; }
.hub-node.monroe:hover .monroe-text { opacity: 1; }

/* how it works card */
.hub-howto {
  position: absolute;
  top: 2.4rem;
  right: 3.5vw;
  width: 220px;
  background: rgba(18, 18, 16, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hub-hairline);
  padding: 1.5rem 1.5rem 1.1rem;
  z-index: 20;
  font-size: 0.75rem;
  color: var(--hub-soft);
}
.hub-howto h3 {
  font-family: var(--hub-serif);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--hub-gold);
  margin-bottom: 1rem;
  font-weight: 500;
}
.hub-howto li { list-style: none; margin-bottom: 0.75rem; }
.hub-howto strong { display: block; color: var(--hub-ink); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }

/* sign-off + utility row */
.hub-signoff {
  position: absolute;
  bottom: 1.7rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--hub-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--hub-fade);
  z-index: 20;
  white-space: nowrap;
}
.hub-utility {
  position: absolute;
  bottom: 2rem;
  right: 3.5vw;
  display: flex;
  gap: 1.4rem;
  z-index: 20;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hub-fade);
}
.hub-utility a:hover { color: var(--hub-gold); }

/* ---------- mobile accordion fallback ---------- */
.hub-mobile { display: none; padding: 9rem 6vw 4rem; }
@media (max-width: 900px) {
  .hub-mobile { display: block; }
  .hub-intro { position: static; padding: 2.2rem 6vw 0; max-width: none; }
  .hub-howto, .hub-utility, .hub-signoff { position: static; transform: none; margin: 2rem auto; }
  .hub-howto { width: auto; }
  .hub-mobile { padding-top: 1.5rem; }
  .hm-cluster { background: var(--hub-surface); border: 1px solid var(--hub-hairline); margin-bottom: 0.8rem; overflow: hidden; }
  .hm-cluster summary { list-style: none; display: flex; align-items: center; gap: 0.9rem; padding: 1.05rem 1.3rem; font-family: var(--hub-serif); font-size: 1.1rem; cursor: pointer; }
  .hm-cluster summary::before { content: "◦"; color: var(--hub-gold); }
  .hm-links { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0 1.3rem 1.2rem; }
  .hm-links a { font-size: 0.75rem; letter-spacing: 0.04em; padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid rgba(198, 161, 91, 0.35); color: var(--hub-ink); }
  .hub-signoff { display: block; text-align: center; }
  .hub-utility { justify-content: center; }
}

/* ---------- Substack pop-up ---------- */
.pop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.pop-overlay.show { opacity: 1; visibility: visible; }
.pop {
  position: relative;
  width: min(400px, 88vw);
  background: var(--hub-surface);
  border: 1px solid rgba(198, 161, 91, 0.4);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 60px rgba(198, 161, 91, 0.1);
  padding: 2.8rem 2.4rem 2.2rem;
  text-align: center;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.3, 1, 0.4, 1.1);
}
.pop-overlay.show .pop { transform: none; }
.pop h3 {
  font-family: var(--hub-serif);
  font-style: italic;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--hub-ink);
}
.pop p { font-size: 0.88rem; color: var(--hub-soft); margin: 0.8rem 0 1.5rem; }
.pop input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--hub-hairline);
  background: rgba(10, 10, 10, 0.6);
  font-family: var(--hub-sans);
  font-size: 0.95rem;
  color: var(--hub-ink);
  outline: none;
  margin-bottom: 0.8rem;
}
.pop input:focus { border-color: var(--hub-gold); }
.pop button.join {
  width: 100%;
  padding: 0.95rem;
  border: 1px solid var(--hub-gold);
  background: transparent;
  color: var(--hub-ink);
  font-family: var(--hub-sans);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.35s;
}
.pop button.join::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hub-gold);
  transform: translateY(101%);
  transition: transform 0.35s cubic-bezier(0.6, 0, 0.2, 1);
  z-index: -1;
}
.pop button.join:hover { color: #0a0a0a; }
.pop button.join:hover::before { transform: none; }
.pop .powered { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hub-fade); margin-top: 1rem; }
.pop .pop-x {
  position: absolute;
  top: 0.8rem; right: 1rem;
  border: 0; background: none;
  font-size: 1.3rem;
  color: var(--hub-fade);
  cursor: pointer;
}
.pop .pop-x:hover { color: var(--hub-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
