/* Home showcase motion — inspired by premium marketing landings (aurora + floating panels) */

.home-hero--showcase {
  position: relative;
  overflow: visible;
  min-height: 0;
  padding: clamp(1rem, 2.4vw, 1.75rem) clamp(1rem, 4vw, 3rem) clamp(0.75rem, 1.6vw, 1.25rem);
  isolation: isolate;
}

.home-hero--showcase .hero-aurora {
  position: absolute;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.home-hero--showcase .hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}
.home-hero--showcase .hero-orb--1 {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: -8%;
  right: 5%;
  background: radial-gradient(circle, rgba(45, 107, 181, 0.85) 0%, transparent 70%);
  animation: showcase-orb-a 18s ease-in-out infinite;
}
.home-hero--showcase .hero-orb--2 {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  bottom: 5%;
  left: -5%;
  background: radial-gradient(circle, rgba(150, 51, 51, 0.45) 0%, transparent 70%);
  animation: showcase-orb-b 22s ease-in-out infinite;
}
.home-hero--showcase .hero-orb--3 {
  width: min(35vw, 320px);
  height: min(35vw, 320px);
  top: 35%;
  left: 38%;
  background: radial-gradient(circle, rgba(0, 40, 104, 0.35) 0%, transparent 70%);
  animation: showcase-orb-c 16s ease-in-out infinite;
}

@keyframes showcase-orb-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-4%, 6%) scale(1.08);
  }
}
@keyframes showcase-orb-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8%, -5%) scale(1.12);
  }
}
@keyframes showcase-orb-c {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-6%, 4%);
  }
}

.home-hero--showcase .home-hero-inner {
  position: relative;
  z-index: 1;
  align-items: start;
  gap: clamp(1rem, 4.8vw, 4.8rem);
  grid-template-columns: minmax(0, 1.12fr) minmax(272px, 0.88fr);
}

/* Globe hero: headline + globe side-by-side; actions under headline on desktop */
.home-hero--showcase .home-hero-inner--globe {
  grid-template-areas:
    "lead visual"
    "actions visual"
    "stats stats";
}
.home-hero--showcase .home-hero-copy--lead {
  grid-area: lead;
}
.home-hero--showcase .home-hero-copy--actions {
  grid-area: actions;
}
.home-hero--showcase .home-hero-inner--globe .home-hero-visual--globe {
  grid-area: visual;
}
.home-hero--showcase .home-hero-inner:not(.home-hero-inner--globe) .home-hero-copy--lead,
.home-hero--showcase .home-hero-inner:not(.home-hero-inner--globe) .home-hero-copy--actions {
  grid-column: 1;
}
.home-hero--showcase .home-hero-inner:not(.home-hero-inner--globe) .home-hero-visual {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
}
.home-hero--showcase .home-hero-copy--actions .home-hero-summary {
  margin-top: 0;
}

.home-hero--showcase .home-hero-copy {
  position: relative;
  z-index: 2;
}

.home-hero--showcase .hero-kicker {
  font-size: 10px;
  margin-bottom: 0.45rem;
}

.home-hero--showcase .home-hero-summary {
  font-size: clamp(0.84rem, 1.36vw, 1.02rem);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.home-hero--showcase .community-pills {
  margin-bottom: 0.55rem;
  gap: 8px;
}

.home-hero--showcase .community-pills li {
  padding: 6px 13px;
  font-size: 10px;
}

.home-hero--showcase .community-pills li i {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.home-hero--showcase .hero-btns {
  position: relative;
  z-index: 3;
  flex-wrap: wrap;
  gap: 8px;
}

/* Top of right panel aligns with hero kicker; ~20% smaller than prior */
.home-hero--showcase .home-hero-visual {
  align-self: start;
  margin-top: 0;
  padding-top: 0;
  min-height: clamp(272px, 33.6vw, 384px);
  max-height: 384px;
  overflow: visible;
}

/* Globe sits on the hero — no card, gradient, or glass panel */
.home-hero--showcase .home-hero-visual--globe,
body.theme-community .home-hero--showcase .home-hero-visual--globe {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
  overflow: visible;
}

.home-hero--showcase .hero-principles {
  display: none;
}

/* Rotating globe — transparent; uses page hero background */
.hero-globe-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: pan-y;
}

.hero-globe-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.25rem 0.5rem 0;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.home-hero--showcase .hero-stats {
  grid-column: 1 / -1;
  grid-area: stats;
  margin-top: 0.35rem;
  padding: 0.6rem 0.8rem !important;
}

@media (max-width: 640px) {
  .home-hero--showcase .hero-stats {
    padding: 0.85rem 0.65rem !important;
  }
  .home-hero--showcase .stat-item .num {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
  }
}

.home-hero--showcase .stat-item .num {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.home-hero--showcase .stat-item .lbl {
  font-size: 0.65rem;
}

.home-hero--showcase .hero-animate {
  opacity: 0;
  transform: translateY(28px);
  animation: showcase-rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.home-hero--showcase .hero-animate--1 {
  animation-delay: 0.05s;
}
.home-hero--showcase .hero-animate--2 {
  animation-delay: 0.18s;
}
.home-hero--showcase .hero-animate--3 {
  animation-delay: 0.32s;
}
.home-hero--showcase .hero-animate--4 {
  animation-delay: 0.46s;
}
.home-hero--showcase .hero-animate--5 {
  animation-delay: 0.58s;
}

@keyframes showcase-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero--showcase h1 {
  font-size: clamp(2.12rem, 4.64vw, 4.4rem);
  line-height: 1.04;
  max-width: 14ch;
  margin-bottom: 0.5rem;
}
.home-hero--showcase .hero-gradient-text {
  display: inline;
  background: linear-gradient(
    105deg,
    var(--navy) 0%,
    #2d6bb5 35%,
    var(--gold) 55%,
    #2d6bb5 75%,
    var(--navy) 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: showcase-gradient-text 10s linear infinite;
}

@keyframes showcase-gradient-text {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 250% center;
  }
}

.hero-showcase {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}
.hero-showcase-card {
  position: absolute;
  width: min(70%, 256px);
  padding: 0.88rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 40, 104, 0.18);
  color: var(--navy);
  animation: showcase-float-card 7s ease-in-out infinite;
}
.hero-showcase-card strong {
  display: block;
  font-size: 0.76rem;
  margin-bottom: 0.28rem;
}
.hero-showcase-card p {
  margin: 0;
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.4;
}
.hero-showcase-card .showcase-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.6rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-blue);
  font-size: 16px;
}
.hero-showcase-card--events {
  top: 6%;
  right: 4%;
  animation-delay: 0s;
  transform: rotate(2deg);
}
.hero-showcase-card--members {
  top: 38%;
  left: 0;
  animation-delay: -2.3s;
  transform: rotate(-3deg);
}
.hero-showcase-card--members .showcase-icon {
  background: var(--surface-red);
  color: var(--gold-dark);
}
.hero-showcase-card--learn {
  bottom: 4%;
  right: 12%;
  animation-delay: -4.1s;
  transform: rotate(1.5deg);
}
.hero-showcase-card--learn .showcase-icon {
  background: var(--gold-light);
  color: var(--gold-dark);
}

@keyframes showcase-float-card {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

.home-hero--showcase .hero-orbit {
  opacity: 0.15;
  transform: scale(1.4);
}

.showcase-marquee {
  position: relative;
  z-index: 2;
  margin-top: -0.5rem;
  padding: 0.85rem 0;
  overflow: hidden;
  border-block: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}
.showcase-marquee-track {
  display: flex;
  width: max-content;
  animation: showcase-marquee 36s linear infinite;
}
.showcase-marquee-track span {
  flex-shrink: 0;
  padding: 0 2rem;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.75;
}
.showcase-marquee-track span em {
  font-style: normal;
  color: var(--gold-dark);
}

@keyframes showcase-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.motion-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion-reveal.is-visible {
  opacity: 1;
  transform: none;
}
.motion-reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.motion-reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.motion-reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

@media (max-width: 820px) {
  .home-hero--showcase {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .home-hero--showcase .home-hero-inner,
  .home-hero--showcase .home-hero-inner--globe {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lead"
      "visual"
      "actions"
      "stats";
    gap: clamp(0.75rem, 3.5vw, 1.25rem);
  }
  .home-hero--showcase .home-hero-inner:not(.home-hero-inner--globe) .home-hero-visual {
    grid-column: auto;
    grid-row: auto;
  }
  .home-hero--showcase h1 {
    max-width: none;
    font-size: clamp(1.7rem, 6.4vw, 2.2rem);
  }
  .home-hero--showcase .home-hero-visual,
  .home-hero--showcase .home-hero-visual--globe {
    width: 100%;
    max-width: min(420px, 100%);
    min-height: clamp(240px, 56vw, 300px);
    max-height: none;
    margin-inline: auto;
  }
  .home-hero--showcase .hero-globe-stage {
    min-height: clamp(240px, 56vw, 300px);
  }
  .home-hero--showcase .hero-globe-caption {
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    padding-bottom: 0.15rem;
  }
  .home-hero--showcase .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .home-hero--showcase .hero-btns .btn-primary,
  .home-hero--showcase .hero-btns .btn-outline {
    width: 100%;
    min-height: 48px;
  }
  .home-hero--showcase .community-pills {
    justify-content: center;
  }
  .home-hero--showcase .home-hero-copy--lead,
  .home-hero--showcase .home-hero-copy--actions {
    text-align: center;
  }
  .home-hero--showcase .home-hero-summary {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-showcase-card {
    width: min(62%, 204px);
    padding: 0.7rem 0.8rem;
  }
  .hero-showcase-card--events {
    right: 0;
  }
}

@media (max-width: 820px) and (hover: none) {
  .hero-globe-canvas {
    pointer-events: none;
  }
}

@media (max-width: 480px) {
  .home-hero--showcase .home-hero-visual--globe {
    min-height: clamp(220px, 62vw, 280px);
  }
  .home-hero--showcase .hero-orb {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero--showcase .hero-orb,
  .hero-showcase-card,
  .home-hero--showcase .hero-gradient-text,
  .showcase-marquee-track,
  .home-hero--showcase .hero-animate {
    animation: none !important;
    transition: none !important;
  }
  .home-hero--showcase .hero-animate,
  .motion-reveal {
    opacity: 1;
    transform: none;
  }
}
