/* ═══════════════════════════════════════════════════════
   Anvil — brand hub
   Tokens come from forge-design-system.css (linked before this file)
   Single full-viewport scene (rocket/aurora), content centered on top —
   same construction as Animate's own landing (#landing in
   animate-landing.css), just without that page's 3D-projected card.
════════════════════════════════════════════════════════ */

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #111111;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

#hub {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hub canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
  cursor: grab;
}

#hub-corner-mark {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 3;
  display: flex;
  opacity: 0.85;
  filter: drop-shadow(0 2px 10px rgba(240, 160, 32, 0.25));
  transition: opacity 0.15s;
}

#hub-corner-mark:hover { opacity: 1; }

#hub-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 530px;
  pointer-events: none;
}

#hub-content a, #hub-content .hub-card { pointer-events: auto; }

#hub-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
}

#hub-title-main {
  font-family: var(--font-display);
  font-size: clamp(100px, 17.5vw, 200px);
  line-height: 0.88;
  letter-spacing: 0.02em;
  background-image:
    linear-gradient(108deg,
      transparent 35%,
      rgba(255, 255, 255, 0.72) 48%,
      rgba(255, 255, 255, 0.18) 52%,
      transparent 65%
    ),
    linear-gradient(160deg, #ffffff 30%, #888888 100%);
  background-size: 220% 100%, 100% 100%;
  background-position: -120% 0, 0 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hub-sheen 4s 1.2s ease-in-out infinite;
}

@keyframes hub-sheen {
  0%   { background-position: -120% 0, 0 0; }
  100% { background-position: 220% 0, 0 0; }
}

#hub-subtitle {
  /* hub-landing.js wraps each letter in its own span and spaces them with
     margin-right so the block's own width lands exactly on #hub-title-main's
     width -- see fitTitleBlock() in animate-landing.js, same technique.
     Starts hidden so the raw, unspaced text never paints before that JS
     runs -- fitTitleBlock() reveals it once the spacing is computed. */
  display: block;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: clamp(17.5px, 2.25vw, 25px);
  font-weight: 300;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.35em;
  opacity: 0;
}

#hub-tagline {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: 12px;
  margin-bottom: 6px;
}

#hub-products {
  display: flex;
  flex-direction: row;
  gap: 18px;
  margin-top: 14px;
  width: 100%;
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 0;
  min-height: 198px;
  text-align: left;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 15px;
  background: rgba(17,17,19,0.92);
  text-decoration: none;
  color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.hub-card:hover {
  background: rgba(26,26,29,0.95);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.hub-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.hub-card-icon {
  position: relative;
  flex: none;
  width: 74px;
  height: 74px;
  border-radius: 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hub-card-icon::before {
  /* glossy top highlight, like a real app-icon squircle */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 32%, rgba(255,255,255,0) 55%);
  z-index: 1;
}

.hub-card-icon svg {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.4));
}

.hub-card-icon-animate {
  background: linear-gradient(155deg, #ffc266 0%, #f0a020 42%, #c2570f 100%);
  box-shadow: 0 3px 10px rgba(240,160,32,0.35), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 3px rgba(0,0,0,0.25);
}

.hub-card-icon-stager {
  background: linear-gradient(155deg, #9fb8ff 0%, #5b7fff 42%, #2a3a8f 100%);
  box-shadow: 0 3px 10px rgba(91,127,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 3px rgba(0,0,0,0.25);
}

.hub-card-name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--text-bright);
}

.hub-card-desc {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.hub-card-foot {
  margin-top: auto;
  padding-top: 16px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.hub-card-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  transition: filter 0.15s ease;
}

.hub-card:hover .hub-card-btn { filter: brightness(1.1); }

.hub-card-btn-animate { background: linear-gradient(155deg, #f0a020, #c2570f); }
.hub-card-btn-stager { background: linear-gradient(155deg, #5b7fff, #2a3a8f); }

#hub-links {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
}

#hub-links a {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

#hub-links a:hover { color: var(--text-bright); }

#hub-footer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #555;
}

/* Below a comfortable breakpoint the fixed one-screen composition gets too
   tight for a title + tagline + two cards -- fall back to a normal
   scrolling layout instead of clipping content. */
@media (max-width: 700px), (max-height: 620px) {
  html, body { height: auto; overflow: visible; }
  #hub {
    position: relative;
    min-height: 100vh;
    align-items: flex-start;
    padding: 56px 20px 40px;
  }
  #hub canvas { position: fixed; }
  #hub-content {
    max-width: 100%;
    margin-left: 0;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  #hub-content a, #hub-content .hub-card { pointer-events: auto; }
  #hub-products { width: 100%; max-width: 420px; }
  #hub-links {
    position: static;
    justify-content: center;
    margin-top: 24px;
  }
  #hub-footer {
    position: static;
    margin-top: 4px;
  }
}
