/* ============================================================
   Home page — WOW hero with aurora, grid, floating preview,
   feature strip. Sits on Material 3 tokens from Shared.Web.Ui.
   ============================================================ */

.yg-home {
  display: grid;
  gap: 3rem;
  padding-block: clamp(1rem, 4vw, 3rem);
}

/* --- Hero stage ------------------------------------------------------ */
.yg-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: min(78vh, 680px);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--md-sys-shape-extra-large, 28px);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent) 0%,
      color-mix(in srgb, var(--md-sys-color-tertiary, #c58af9) 12%, transparent) 55%,
      transparent 100%),
    color-mix(in srgb, var(--md-sys-color-surface) 60%, transparent);
  overflow: hidden;
  isolation: isolate;
}

/* Animated aurora blobs */
.yg-hero__aurora {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  z-index: -2;
  filter: blur(40px) saturate(140%);
  mix-blend-mode: screen;
}

.yg-hero__aurora-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.58;
}

.yg-hero__aurora-blob--a {
  top: -10%;
  left: -5%;
  width: 48vmin;
  height: 48vmin;
  background: radial-gradient(circle at 30% 30%, var(--md-sys-color-primary), transparent 60%);
  animation: yg-hero-float 18s ease-in-out infinite alternate;
}

.yg-hero__aurora-blob--b {
  bottom: -20%;
  right: -10%;
  width: 56vmin;
  height: 56vmin;
  background: radial-gradient(circle at 70% 70%, var(--md-sys-color-tertiary, #c58af9), transparent 60%);
  animation: yg-hero-float 22s ease-in-out infinite alternate-reverse;
}

.yg-hero__aurora-blob--c {
  top: 30%;
  right: 30%;
  width: 36vmin;
  height: 36vmin;
  background: radial-gradient(circle at 50% 50%, #60a5fa, transparent 60%);
  animation: yg-hero-float 26s ease-in-out infinite alternate;
  opacity: 0.4;
}

@keyframes yg-hero-float {
  0%   { transform: translate3d(-4%, 2%, 0) scale(0.95); }
  50%  { transform: translate3d(6%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1); }
}

/* Subtle grid pattern */
.yg-hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,1) 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,1) 30%, transparent 75%);
}

/* Content column */
.yg-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
  animation: yg-hero-rise 720ms cubic-bezier(0.2, 0, 0, 1) both;
}

.yg-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 36%, transparent);
  color: var(--md-sys-color-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: max-content;
}

.yg-hero__eyebrow-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  box-shadow: 0 0 10px currentColor;
  animation: yg-hero-pulse 2s ease-in-out infinite;
}

@keyframes yg-hero-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.2); }
}

.yg-hero__title {
  margin: 0;
  display: grid;
  gap: 0.2rem;
  font-family: var(--font-heading, "Inter", system-ui, sans-serif);
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.yg-hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  animation: yg-hero-line 700ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.yg-hero__title-line:nth-child(1) { animation-delay: 120ms; }
.yg-hero__title-line:nth-child(2) { animation-delay: 260ms; }

.yg-hero__title-line--accent {
  background: linear-gradient(120deg,
      var(--md-sys-color-primary) 0%,
      var(--md-sys-color-tertiary, #e94cae) 50%,
      var(--md-sys-color-primary) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: yg-hero-line 700ms cubic-bezier(0.2, 0, 0, 1) forwards,
             yg-hero-shine 8s linear infinite 700ms;
}

@keyframes yg-hero-line {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes yg-hero-shine {
  from { background-position: 0 0; }
  to   { background-position: 220% 0; }
}

.yg-hero__lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant, color-mix(in srgb, var(--md-sys-color-on-surface) 72%, transparent));
  opacity: 0;
  animation: yg-hero-fade 700ms ease-out 440ms forwards;
}

@keyframes yg-hero-fade {
  to { opacity: 1; }
}

.yg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  opacity: 0;
  animation: yg-hero-fade 700ms ease-out 580ms forwards;
}

.yg-hero__cta {
  min-height: 3rem;
  padding-inline: 1.5rem !important;
}

@keyframes yg-hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Showcase column (floating mock-player) */
.yg-hero__showcase {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(38vh, 360px);
  animation: yg-hero-float-in 900ms cubic-bezier(0.2, 0, 0, 1) 160ms both;
}

@keyframes yg-hero-float-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.yg-hero__screen {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 16 / 10;
  border-radius: var(--md-sys-shape-large, 16px);
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
  border: 1px solid color-mix(in srgb, #fff 12%, transparent);
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent),
    0 0 80px -20px color-mix(in srgb, var(--md-sys-color-primary) 60%, transparent);
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform 400ms cubic-bezier(0.2, 0, 0, 1);
}

.yg-hero__screen:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg) scale(1.01);
}

.yg-hero__screen-chrome {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
}

.yg-hero__screen-chrome > span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, #fff 22%, transparent);
}

.yg-hero__screen-chrome > span:nth-child(1) { background: #f87171; }
.yg-hero__screen-chrome > span:nth-child(2) { background: #facc15; }
.yg-hero__screen-chrome > span:nth-child(3) { background: #4ade80; }

.yg-hero__screen-surface {
  position: relative;
  width: 100%;
  height: calc(100% - 1.8rem);
  overflow: hidden;
}

.yg-hero__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.yg-hero__play > * {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.6);
  animation: yg-hero-pulse-halo 3s ease-in-out infinite;
}

@keyframes yg-hero-pulse-halo {
  0%, 100% { box-shadow: 0 16px 40px -20px rgba(0,0,0,0.6), 0 0 0 0 color-mix(in srgb, var(--md-sys-color-primary) 40%, transparent); }
  50%      { box-shadow: 0 16px 40px -20px rgba(0,0,0,0.6), 0 0 0 18px color-mix(in srgb, var(--md-sys-color-primary) 0%, transparent); }
}

.yg-hero__screen-wave {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, color-mix(in srgb, var(--md-sys-color-primary) 40%, transparent), transparent 60%),
    radial-gradient(ellipse at 70% 70%, color-mix(in srgb, var(--md-sys-color-tertiary, #c58af9) 30%, transparent), transparent 60%);
  opacity: 0.8;
  animation: yg-hero-wave 14s ease-in-out infinite alternate;
}

@keyframes yg-hero-wave {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.05); }
}

.yg-hero__screen-bar {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.85rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  z-index: 2;
}

.yg-hero__screen-progress {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary, #c58af9));
  animation: yg-hero-progress 6s ease-in-out infinite alternate;
}

@keyframes yg-hero-progress {
  from { width: 18%; }
  to   { width: 76%; }
}

/* Floating chips around the showcase */
.yg-hero__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--md-sys-color-surface) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant, #bbb) 40%, transparent);
  color: var(--md-sys-color-on-surface);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  animation: yg-hero-chip-float 6s ease-in-out infinite alternate;
}

.yg-hero__chip .mud-icon-root {
  color: var(--md-sys-color-primary);
  font-size: 1rem;
}

.yg-hero__chip--a { top: 6%;   right: -3%; animation-delay: 0s; }
.yg-hero__chip--b { top: 48%;  left: -5%;  animation-delay: 1.5s; }
.yg-hero__chip--c { bottom: 6%; right: 8%; animation-delay: 3s; }

@keyframes yg-hero-chip-float {
  from { transform: translateY(-4px); }
  to   { transform: translateY(4px); }
}

/* --- Feature strip --------------------------------------------------- */
.yg-home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
}

.yg-home-feature {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--md-sys-shape-large, 16px);
  background: var(--md-sys-color-surface-container-low);
  transition: transform 260ms cubic-bezier(0.2, 0, 0, 1),
              box-shadow 260ms cubic-bezier(0.2, 0, 0, 1),
              background 260ms cubic-bezier(0.2, 0, 0, 1);
  display: grid;
  gap: 0.6rem;
  overflow: hidden;
  isolation: isolate;
}

.yg-home-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent), transparent 60%);
  transition: opacity 260ms;
}

.yg-home-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.35);
  background: var(--md-sys-color-surface-container, var(--md-sys-color-surface-container-low));
}

.yg-home-feature:hover::before {
  opacity: 1;
}

.yg-home-feature__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--md-sys-shape-small, 10px);
  background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
  color: var(--md-sys-color-primary);
}

.yg-home-feature__icon--a { color: var(--md-sys-color-primary); }
.yg-home-feature__icon--b {
  color: var(--md-sys-color-tertiary, #c58af9);
  background: color-mix(in srgb, var(--md-sys-color-tertiary, #c58af9) 14%, transparent);
}
.yg-home-feature__icon--c {
  color: #60a5fa;
  background: color-mix(in srgb, #60a5fa 18%, transparent);
}

.yg-home-feature__icon .mud-icon-root { font-size: 1.45rem; }

.yg-home-feature h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface);
}

.yg-home-feature p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant, color-mix(in srgb, var(--md-sys-color-on-surface) 72%, transparent));
}

/* UI chrome — don't let the hero eyebrow, chips, icons or CTAs be selected */
.yg-hero__eyebrow,
.yg-hero__actions,
.yg-hero__showcase,
.yg-hero__chip,
.yg-home-feature__icon {
  user-select: none;
  -webkit-user-select: none;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .yg-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .yg-hero__showcase {
    order: -1;
  }
  .yg-hero__screen {
    width: min(100%, 22rem);
    transform: none;
  }
  .yg-hero__chip--a { top: 2%; right: -4%; }
  .yg-hero__chip--b { top: auto; bottom: 10%; left: -4%; }
  .yg-hero__chip--c { bottom: -4%; right: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  .yg-hero__aurora-blob,
  .yg-hero__eyebrow-dot,
  .yg-hero__title-line,
  .yg-hero__title-line--accent,
  .yg-hero__lead,
  .yg-hero__actions,
  .yg-hero__content,
  .yg-hero__showcase,
  .yg-hero__play > *,
  .yg-hero__screen-wave,
  .yg-hero__screen-progress,
  .yg-hero__chip {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
