/*
  hub.css
  Cathedral layout: large mandala dominates, honeycomb tiling everywhere,
  hex+icon nodes at the bottom matching the topnav design.
*/

.hub-page { padding-top: 0; } /* hub never has the top nav */


.hub {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  grid-template-areas:
    "mandala"
    "tagline"
    "instructions"
    "nodes";
  align-items: center;
  justify-items: center;
  padding: 1.25rem 1.5rem 1rem;
  overflow: hidden;
  gap: 0.6rem;
}

.hub__honeycomb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  color: var(--accent);
}

.hub__honeycomb svg { width: 100%; height: 100%; display: block; }

.hub__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 50%, rgba(6, 7, 13, 0.4) 100%);
}

.hub__mandala-wrap,
.hub__tagline-wrap,
.hub__instructions,
.hub__nodes {
  position: relative;
  z-index: 2;
}

.hub__mandala-wrap {
  grid-area: mandala;
  width: min(76vmin, 720px);
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub__mandala {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  animation: mandala-drift 360s linear infinite;
  transform-origin: 50% 50%;
}

.hub__mandala-glow {
  position: absolute;
  inset: 5%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.18) 0%, rgba(10, 11, 18, 0.55) 50%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

@keyframes mandala-drift {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hub__mandala { animation: none; }
}

/* Tagline */
.hub__tagline-wrap {
  grid-area: tagline;
  text-align: center;
  margin: 0;
  max-width: 90%;
}

.hub__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3.4vmin, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  margin: 0;
}

/* Bolded "Life is" and "beautiful." — readable as a hidden second sentence:
   "Life is beautiful." Slightly brighter color, full weight, no italic for contrast. */
.hub__tagline strong {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0;
}

.hub__tagline-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  opacity: 0.55;
}

/* Instructions */
.hub__instructions {
  grid-area: instructions;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

.hub__instructions kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin: 0 0.15rem;
}

/* Hex nodes (matching topnav, larger). Grid with equal columns guarantees even spacing. */
.hub__nodes {
  grid-area: nodes;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.5rem;
  margin: 0 auto;
  max-width: min(1080px, 96vw);
  width: 100%;
  padding: 0.25rem 0;
  align-items: end;
  justify-items: center;
}

.hub__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  background: transparent;
  position: relative;
  color: var(--accent);
  transition: transform 0.25s var(--easing), color 0.25s var(--easing);
}

.hub__node:hover, .hub__node:focus-visible {
  transform: translateY(-3px);
  color: var(--text);
  outline: none;
}

.hub__hex {
  width: 76px;
  height: 68px;
  display: block;
}

.hub__hex-bg {
  fill: rgba(20, 21, 42, 0.65);
  stroke: var(--accent);
  stroke-width: 1.4;
  transition: all 0.25s var(--easing);
}

.hub__node:hover .hub__hex-bg,
.hub__node:focus-visible .hub__hex-bg {
  fill: var(--accent-soft);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 14px rgba(201, 169, 97, 0.35));
}

.hub__icon { color: var

/* Mobile: ensure perfect horizontal centering. The 88vmin mandala can outgrow
   a 100vw container with side padding, so cap it. Also ensure instructions text
   stays centered when it wraps. */
@media (max-width: 600px) {
  .hub {
    padding: 0.75rem 0 0.5rem;
    gap: 0.5rem;
    grid-template-columns: 100%;
    justify-items: stretch;
    text-align: center;
  }
  .hub__mandala-wrap {
    width: min(80vmin, 100vw);
    margin: 0 auto;
  }
  .hub__tagline-wrap,
  .hub__instructions {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    text-align: center;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }
  .hub__nodes {
    width: 100%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }
}
