/**
 * Hub landing header — example-read-only brand cluster + per-shop theme glass nav.
 */

.landing-header.landing-header--public-hub {
  --accent: var(--hub-accent, #a78bfa);
  --accent-2: var(--hub-accent-2, var(--hub-primary, var(--hub-accent, #a78bfa)));
  --text: rgba(255, 255, 255, 0.92);
  --glass-bg-strong: color-mix(in srgb, var(--accent) 6%, rgba(18, 18, 22, 0.88));
  --glass-border: color-mix(in srgb, var(--accent) 24%, rgba(255, 255, 255, 0.1));
  --glass-highlight: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.14));
  --nav-glass-blur: 22px;
  --home-nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub {
  --text: #0f172a;
  --glass-bg-strong: color-mix(in srgb, #fff 78%, var(--accent) 4%);
  --glass-border: color-mix(in srgb, var(--accent) 18%, rgba(15, 23, 42, 0.1));
  --glass-highlight: rgba(255, 255, 255, 0.95);
}

.landing-header.landing-header--public-hub .landing-header__inner {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem 0.85rem;
  background: color-mix(in srgb, var(--glass-bg-strong) 62%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 82%, transparent);
  backdrop-filter: blur(var(--nav-glass-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--nav-glass-blur)) saturate(1.35);
  box-shadow:
    0 10px 40px color-mix(in srgb, var(--accent) 14%, rgba(0, 0, 0, 0.22)),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 color-mix(in srgb, var(--accent) 6%, transparent);
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub .landing-header__inner {
  background: color-mix(in srgb, #fff 74%, var(--accent) 3%);
  border-color: color-mix(in srgb, var(--accent) 16%, rgba(15, 23, 42, 0.1));
  box-shadow:
    0 12px 36px color-mix(in srgb, var(--accent) 10%, rgba(15, 23, 42, 0.08)),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.landing-header.landing-header--public-hub .landing-header__link--active {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 38%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent);
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub .landing-header__link--active {
  color: #0f172a;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 24%, #e2e8f0);
}

.landing-header.landing-header--public-hub .landing-header__btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 38%, transparent);
}

.landing-header.landing-header--public-hub .landing-header__btn--primary:hover {
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 48%, transparent);
}

.landing-header.landing-header--public-hub .landing-header__theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, rgba(255, 255, 255, 0.14));
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.06));
}

/* Brand cluster — logo + shimmer name (+ optional tagline) */
.landing-header.landing-header--public-hub .hub-store-nav-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(18rem, 42vw);
  padding: 0.32rem 0.95rem 0.32rem 0.42rem;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 10%, transparent),
    color-mix(in srgb, var(--accent) 4%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent),
    0 6px 18px color-mix(in srgb, var(--accent) 10%, transparent);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s var(--home-nav-ease);
  position: relative;
  overflow: hidden;
  z-index: 2;
  flex-shrink: 0;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 0%,
    color-mix(in srgb, var(--accent-2) 16%, transparent) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: hubNavBrandLogoShimmer 5.5s ease-in-out infinite;
  pointer-events: none;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand:hover {
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 14%, transparent),
    color-mix(in srgb, var(--accent) 6%, transparent)
  );
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 18%, transparent),
    0 8px 22px color-mix(in srgb, var(--accent) 16%, transparent);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand:hover::before {
  animation: none;
  transform: translateX(120%);
  transition: transform 0.65s var(--home-nav-ease);
}

@keyframes hubNavBrandLogoShimmer {
  0%, 80%, 100% { transform: translateX(-120%); opacity: 0; }
  8% { opacity: 0.65; }
  42% { transform: translateX(120%); opacity: 0; }
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
  transition: transform 0.35s var(--home-nav-ease);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand:hover .hub-store-nav-brand__emblem {
  transform: scale(1.04);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__logo {
  width: auto;
  height: 2.35rem;
  max-width: 6.5rem;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--accent) 18%, transparent));
  transition: filter 0.35s ease;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand:hover .hub-store-nav-brand__logo {
  filter: drop-shadow(0 6px 20px color-mix(in srgb, var(--accent) 28%, transparent));
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__mark {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent-2);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__divider {
  width: 1px;
  height: 1.85rem;
  margin: 0 -0.05rem;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.14));
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub .hub-store-nav-brand__divider {
  background: color-mix(in srgb, var(--accent) 20%, #e2e8f0);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__name--shimmer {
  max-width: 11rem;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__words {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.12em 0.28em;
  line-height: 1.1;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__word {
  --word-i: 0;
  display: inline-block;
  position: relative;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--text) 38%,
    color-mix(in srgb, var(--accent-2) 95%, #fff) 48%,
    var(--accent) 52%,
    color-mix(in srgb, var(--accent-2) 95%, #fff) 58%,
    var(--text) 68%,
    var(--text) 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    hubNavBrandWordReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards,
    hubNavBrandWordShimmer 4.5s ease-in-out infinite;
  animation-delay:
    calc(var(--word-i) * 0.12s),
    calc(0.55s + var(--word-i) * 0.28s);
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub .hub-store-nav-brand__word {
  background: linear-gradient(
    100deg,
    #0f172a 0%,
    #0f172a 38%,
    var(--accent-2) 48%,
    var(--accent) 52%,
    var(--accent-2) 58%,
    #0f172a 68%,
    #0f172a 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes hubNavBrandWordReveal {
  from {
    opacity: 0;
    transform: translateY(0.35em) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes hubNavBrandWordShimmer {
  0%, 100% { background-position: 100% center; }
  50% { background-position: 0% center; }
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__name--shimmer:has(.hub-store-nav-brand__tagline)::after {
  display: none;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__name--shimmer::after {
  content: "";
  display: block;
  align-self: flex-start;
  width: 1.65rem;
  max-width: 100%;
  height: 2px;
  margin-top: 0.22rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.85;
  animation: hubNavBrandLine 3.8s ease-in-out infinite;
  transform-origin: left center;
  flex-shrink: 0;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand:hover .hub-store-nav-brand__name--shimmer::after {
  animation-duration: 1.6s;
  opacity: 1;
}

@keyframes hubNavBrandLine {
  0%, 100% { width: 1.65rem; opacity: 0.78; }
  50% { width: 2.45rem; opacity: 1; }
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.32em;
  margin: 0.18rem 0 0;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: none;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__tagline .shop-hero__word {
  --word-i: 0;
  display: inline-block;
  position: relative;
  font-size: inherit;
  font-weight: inherit;
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--text) 38%,
    color-mix(in srgb, var(--accent-2) 95%, #fff) 48%,
    var(--accent) 52%,
    color-mix(in srgb, var(--accent-2) 95%, #fff) 58%,
    var(--text) 68%,
    var(--text) 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    hubNavBrandWordReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards,
    hubNavBrandWordShimmer 4.5s ease-in-out infinite;
  animation-delay:
    calc(var(--word-i) * 0.1s),
    calc(0.75s + var(--word-i) * 0.22s);
}

[data-mantine-color-scheme="light"] .landing-header.landing-header--public-hub .hub-store-nav-brand__tagline .shop-hero__word {
  background: linear-gradient(
    100deg,
    #0f172a 0%,
    #0f172a 38%,
    var(--accent-2) 48%,
    var(--accent) 52%,
    var(--accent-2) 58%,
    #0f172a 68%,
    #0f172a 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-header.landing-header--public-hub .hub-store-nav-brand__tagline .shop-hero__word::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.35em;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
  opacity: 0;
  filter: blur(8px);
  animation: hubNavTaglineWordGlow 3.2s ease-in-out infinite;
  animation-delay: calc(0.9s + var(--word-i) * 0.55s);
  pointer-events: none;
  z-index: -1;
}

@keyframes hubNavTaglineWordGlow {
  0%, 100% { opacity: 0; transform: scaleX(0.85); }
  45%, 55% { opacity: 0.55; transform: scaleX(1); }
}

@media (max-width: 64em) {
  .landing-header.landing-header--public-hub .hub-store-nav-brand {
    max-width: min(14rem, 38vw);
    gap: 0.55rem;
    padding-right: 0.7rem;
  }

  .landing-header.landing-header--public-hub .hub-store-nav-brand__logo {
    height: 2rem;
    max-width: 5rem;
  }

  .landing-header.landing-header--public-hub .hub-store-nav-brand__name {
    font-size: 0.92rem;
  }

  .landing-header.landing-header--public-hub .hub-store-nav-brand__tagline {
    display: none;
  }
}

@media (max-width: 48em) {
  .landing-header.landing-header--public-hub .hub-store-nav-brand__name--shimmer,
  .landing-header.landing-header--public-hub .hub-store-nav-brand__divider {
    display: none;
  }

  .landing-header.landing-header--public-hub .hub-store-nav-brand {
    padding: 0.28rem 0.55rem 0.28rem 0.38rem;
    max-width: none;
  }

  .landing-header.landing-header--public-hub .hub-store-nav-brand__logo {
    height: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-header.landing-header--public-hub .hub-store-nav-brand::before,
  .landing-header.landing-header--public-hub .hub-store-nav-brand__word,
  .landing-header.landing-header--public-hub .hub-store-nav-brand__name--shimmer::after,
  .landing-header.landing-header--public-hub .hub-store-nav-brand__tagline .shop-hero__word {
    animation: none !important;
  }
}
