/* Light stays behind the content so contrast and pointer targets are preserved. */
.hero-light {
  position: absolute;
  inset: 28% 0 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 87%, transparent);
}
.hero-light::before, .hero-light::after {
  content: "";
  position: absolute;
  inset: -5% -9%;
}
.hero-light::before {
  background:
    radial-gradient(ellipse at 24% 72%, #6f87f553 0, transparent 39%),
    radial-gradient(ellipse at 76% 56%, #a79bf565 0, transparent 36%),
    radial-gradient(ellipse at 78% 100%, #8ddbbf54 0, transparent 42%);
  opacity: .78;
}
.hero-light::after {
  background:
    radial-gradient(circle at 19% 73%, #fff 0 1px, #9eacff88 2px, transparent 6px),
    radial-gradient(circle at 28% 51%, #fff 0 1px, #8095fa88 2px, transparent 6px),
    radial-gradient(circle at 71% 44%, #fff 0 1px, #8f9de888 2px, transparent 7px),
    radial-gradient(circle at 82% 67%, #fff 0 1px, #8dc9c888 2px, transparent 7px),
    radial-gradient(ellipse at 52% 73%, #ffffffc9, transparent 52%);
  opacity: .62;
}
.hero-illustration {
  position: relative;
  isolation: isolate;
}
.hero-illustration::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 14% 9% 10%;
  background: radial-gradient(ellipse, #c2cfff70, transparent 68%);
}

.story-art, .workspace-card {
  --light-tint: #8ca5ff;
  --light-x: 50%;
  --light-y: 40%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.story-art-agenda { --light-tint: #eac778; }
.story-art-care, .workspace-finance { --light-tint: #80d8b6; }
.workspace-records { --light-tint: #ad9af5; }
.story-art::before, .workspace-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at var(--light-x) var(--light-y),
    #fff 0%, var(--light-tint) 22%, transparent 65%);
  opacity: .17;
}
.story-art::after, .workspace-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 28%, #fff0 36%, #fffd 48%, #fff2 57%, transparent 66%);
  transform: translateX(-110%);
  opacity: 0;
}
.story-art::after { z-index: -1; }
.workspace-card::after {
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, var(--light-tint), transparent);
}

.demo-frame { position: relative; isolation: isolate; }
.demo-action-light {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 91% 80%, #7c92ff25, transparent 56%),
    radial-gradient(ellipse at 4% 0%, #8bddca23, transparent 40%);
  box-shadow: inset 0 0 0 2px #91a7ff9c, inset 0 0 22px #879afc40;
  opacity: 0;
  pointer-events: none;
}

.closing-inner::before, .closing-inner::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.closing-inner::before {
  inset: -45% -10%;
  background:
    radial-gradient(ellipse at 82% 27%, #94b8f78a, transparent 29%),
    radial-gradient(ellipse at 88% 85%, #8ae1cf72, transparent 31%),
    radial-gradient(ellipse at 55% 95%, #766bedaa, transparent 40%);
  opacity: .57;
}
.closing-inner::after {
  inset: 0 6% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #bccbfa99, #d9edff, transparent);
  box-shadow: 0 0 9px #a6bcff99;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-light::before { animation: ambient-drift 4.5s cubic-bezier(.25,.55,.35,1) both; }
  .hero-light::after { animation: ambient-spark 4.25s .2s ease-out both; }
  .hero-illustration::before { animation: illustration-halo 2.4s .28s ease-out both; }
  .feature-story.in-view .story-art::after, .workspace-card.in-view::after {
    animation: panel-light-pass 1.16s .24s ease-out both;
  }
  .workspace-card:nth-child(2).in-view::after { animation-delay: .4s; }
  .workspace-card:nth-child(3).in-view::after { animation-delay: .56s; }
  .closing.in-view .closing-inner::before { animation: closing-light-pass 2.5s ease-out both; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .story-art::before, .workspace-card::before { transition: opacity .26s ease; }
  .story-art:hover::before, .workspace-card:hover::before { opacity: .46; }
}

@keyframes ambient-drift {
  from { transform: translate(-9%, 7%) scale(.94); opacity: .4; }
  52% { transform: translate(5%, -3%) scale(1.11); opacity: .96; }
  to { transform: translate(0, 0) scale(1); opacity: .78; }
}
@keyframes ambient-spark {
  from { opacity: .08; transform: scale(.96); }
  48% { opacity: .96; }
  to { opacity: .62; transform: scale(1); }
}
@keyframes illustration-halo {
  from { transform: scale(.82); opacity: .38; }
  52% { transform: scale(1.08); opacity: 1; }
  to { transform: scale(1); opacity: .68; }
}
@keyframes panel-light-pass {
  from { transform: translateX(-110%); opacity: 0; }
  35%, 62% { opacity: .82; }
  to { transform: translateX(110%); opacity: 0; }
}
@keyframes closing-light-pass {
  from { transform: translateX(-13%) scale(.94); opacity: .25; }
  58% { transform: translateX(3%) scale(1.06); opacity: .77; }
  to { transform: none; opacity: .57; }
}
