﻿/* Scoped WebGL hero styles. Only affects #webgl-home-cover. */
#webgl-home-cover {
  --ink: #121936;
  --muted: #66708b;
  --violet: #7951ee;
  --violet-2: #a66eff;
  --line: rgba(122, 84, 232, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

#webgl-home-cover * {
  box-sizing: border-box;
}

#webgl-home-cover {
  color: var(--ink);
  background: #fbfaff;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

#webgl-home-cover a {
  color: inherit;
  text-decoration: none;
}

#webgl-home-cover .page-preview {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 20%, rgba(183, 150, 255, 0.34), transparent 34%),
    radial-gradient(circle at 52% 84%, rgba(255, 207, 246, 0.2), transparent 36%),
    linear-gradient(118deg, #ffffff 0%, #fbf9ff 42%, #efeaff 100%);
}

#webgl-home-cover .hero-cover {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 30px 3.5vw 42px;
}

#webgl-home-cover .hero-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -5;
  background:
    linear-gradient(110deg, transparent 0 57%, rgba(157, 120, 255, 0.15) 62%, transparent 74%),
    repeating-linear-gradient(112deg, transparent 0 25px, rgba(124, 87, 230, 0.04) 26px 27px);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 40%, #fff 100%);
}

#webgl-home-cover .ambient,
#webgl-home-cover .light-thread {
  position: absolute;
  pointer-events: none;
}

#webgl-home-cover .ambient {
  z-index: -4;
  border-radius: 999px;
  filter: blur(32px);
}

#webgl-home-cover .ambient-left {
  left: 4%;
  top: 15%;
  width: 340px;
  height: 140px;
  background: rgba(184, 159, 255, 0.2);
}

#webgl-home-cover .ambient-right {
  right: 6%;
  bottom: 8%;
  width: 560px;
  height: 250px;
  background: rgba(255, 183, 245, 0.23);
}

#webgl-home-cover .light-thread {
  z-index: -2;
  width: 62vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(177, 132, 255, 0.58), rgba(255, 255, 255, 0.92), transparent);
  opacity: 0.45;
}

#webgl-home-cover .thread-a {
  top: 22%;
  right: -2%;
  transform: rotate(-10deg);
}

#webgl-home-cover .thread-b {
  top: 54%;
  right: -11%;
  transform: rotate(9deg);
}

#webgl-home-cover .site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(245px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
}

#webgl-home-cover .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

#webgl-home-cover .brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--violet);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(231,221,255,0.74));
  box-shadow: 0 14px 32px rgba(111, 68, 225, 0.15);
}

#webgl-home-cover .brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#webgl-home-cover .brand-copy {
  display: grid;
  gap: 2px;
}

#webgl-home-cover .brand-copy strong {
  color: #171f42;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 780;
}

#webgl-home-cover .brand-copy span {
  color: #6d748e;
  font-size: 13px;
  line-height: 1.2;
}

#webgl-home-cover .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 74px);
  color: #1a2243;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}

#webgl-home-cover .nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
}

#webgl-home-cover .nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8258f5, #bb86ff);
  transform: translateX(-50%);
  transition: width 240ms var(--ease);
}

#webgl-home-cover .nav-links a:hover::after,
#webgl-home-cover .nav-links a.active::after {
  width: 28px;
}

#webgl-home-cover .nav-links a.active {
  color: var(--violet);
}

#webgl-home-cover .hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(410px, 0.86fr) minmax(540px, 1.14fr);
  align-items: center;
  gap: clamp(24px, 4vw, 78px);
  max-width: 1480px;
  min-height: calc(100vh - 84px);
  margin: 0 auto;
  padding-top: 24px;
}

#webgl-home-cover .hero-copy {
  padding: 22px 0 30px 4.8vw;
}

#webgl-home-cover .hero-copy h1 {
  margin: 0;
  color: #121936;
  font-size: clamp(64px, 6.8vw, 108px);
  line-height: 1.08;
  font-weight: 900;
}

#webgl-home-cover .hero-copy h1 span {
  margin-left: 0.12em;
  color: transparent;
  background: linear-gradient(118deg, #754bea 0%, #935cff 55%, #c47dff 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

#webgl-home-cover .hero-subtitle {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.82;
  font-weight: 500;
}

#webgl-home-cover .hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 34px;
}

#webgl-home-cover .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 780;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

#webgl-home-cover .btn span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

#webgl-home-cover .btn svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#webgl-home-cover .btn:hover {
  transform: translateY(-3px);
}

#webgl-home-cover .btn-primary {
  min-width: 192px;
  color: #fff;
  background: linear-gradient(135deg, #8d60ff 0%, #6f3de2 100%);
  box-shadow: 0 18px 42px rgba(111, 66, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

#webgl-home-cover .btn-primary:hover {
  box-shadow: 0 23px 50px rgba(111, 66, 229, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

#webgl-home-cover .btn-secondary {
  min-width: 184px;
  color: #182042;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(129, 95, 224, 0.19);
  box-shadow: 0 16px 38px rgba(93, 69, 168, 0.08);
  backdrop-filter: blur(18px);
}

#webgl-home-cover .btn-secondary svg {
  color: var(--violet);
}

#webgl-home-cover .webgl-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  perspective: 1200px;
}

#webgl-home-cover .canvas-shell {
  position: relative;
  width: min(760px, 50vw);
  aspect-ratio: 1.08;
  border-radius: 40px;
  overflow: visible;
  transform-style: preserve-3d;
}

#webgl-home-cover #webglHero {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

#webgl-home-cover .scene-vignette {
  position: absolute;
  inset: 6% 0 0;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 54% 48%, rgba(146, 87, 255, 0.18), transparent 36%),
    radial-gradient(circle at 52% 70%, rgba(255, 177, 246, 0.14), transparent 45%);
  filter: blur(16px);
}

#webgl-home-cover .module-card {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 170px;
  height: 96px;
  padding: 12px 16px;
  color: #7146e4;
  border: 1px solid rgba(150, 110, 255, 0.35);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.64), rgba(236,226,255,0.44)),
    rgba(255,255,255,0.58);
  box-shadow:
    0 18px 45px rgba(116,72,255,0.18),
    0 0 28px rgba(166,112,255,0.13),
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(120,80,255,0.12);
  backdrop-filter: blur(18px) saturate(150%);
  transform: translate3d(var(--card-x, 0px), var(--card-y, 0px), 0) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)) rotate(var(--card-rz, 0deg)) scale(1);
  transform-origin: center;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), background 260ms var(--ease);
  will-change: transform;
}

#webgl-home-cover .module-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 42%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0.12) 72%, transparent),
    linear-gradient(112deg, transparent 0 36%, rgba(255,255,255,0.5) 47%, transparent 58% 100%);
  opacity: 0.86;
  pointer-events: none;
  animation: cardSweep 7.5s ease-in-out infinite;
}

#webgl-home-cover .module-card::after {
  content: "";
  position: absolute;
  inset: auto 7px 5px auto;
  width: 58%;
  height: 20%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(120,80,255,0.22), transparent 68%);
  filter: blur(10px);
  opacity: 0.76;
  pointer-events: none;
}

#webgl-home-cover .module-card:hover {
  transform: translate3d(var(--card-x, 0px), calc(var(--card-y, 0px) - 8px), 0) rotateX(calc(var(--card-rx, 0deg) + 4deg)) rotateY(calc(var(--card-ry, 0deg) - 4deg)) rotate(var(--card-rz, 0deg)) scale(1.04);
  border-color: rgba(177, 137, 255, 0.58);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.78), rgba(239,230,255,0.56)),
    rgba(255,255,255,0.66);
  box-shadow:
    0 28px 62px rgba(106, 63, 219, 0.26),
    0 0 38px rgba(152, 96, 255, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(120,80,255,0.16);
}

#webgl-home-cover .module-card strong {
  position: relative;
  z-index: 1;
  color: #7145e5;
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
  text-align: center;
}

#webgl-home-cover .module-card span:last-child {
  position: relative;
  z-index: 1;
  margin-top: 0;
  color: #8566d8;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

#webgl-home-cover .module-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  color: #9b74fb;
  filter: drop-shadow(0 0 8px rgba(140, 92, 255, 0.25));
}

#webgl-home-cover .module-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#webgl-home-cover .ai-icon::before,
#webgl-home-cover .ai-icon::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(140, 85, 255, 0.38);
}

#webgl-home-cover .ai-icon::before {
  width: 7px;
  height: 24px;
}

#webgl-home-cover .ai-icon::after {
  width: 24px;
  height: 7px;
}

#webgl-home-cover .module-pdf { --card-rz: -1.25deg; animation-delay: 0s; }
#webgl-home-cover .module-video { --card-rz: 1.25deg; animation-delay: -1.2s; }
#webgl-home-cover .module-h5 { --card-rz: 1deg; animation-delay: -2.4s; }
#webgl-home-cover .module-ai { --card-rz: -1deg; animation-delay: -3.6s; }

@keyframes cardSweep {
  0%, 70%, 100% { opacity: 0.72; transform: translateX(-12%); }
  80% { opacity: 0.96; transform: translateX(8%); }
  90% { opacity: 0.74; transform: translateX(18%); }
}

@media (max-width: 1180px) {
  #webgl-home-cover .site-header {
    grid-template-columns: auto 1fr;
  }

  #webgl-home-cover .nav-links {
    justify-content: flex-end;
    gap: 30px;
  }

  #webgl-home-cover .hero-layout {
    grid-template-columns: minmax(360px, 0.88fr) minmax(450px, 1.12fr);
  }

  #webgl-home-cover .hero-copy {
    padding-left: 0;
  }

  #webgl-home-cover .canvas-shell {
    width: min(640px, 51vw);
  }

  #webgl-home-cover .module-card {
    width: 154px;
    height: 88px;
    padding: 10px 14px;
  }
}

@media (max-width: 940px) {
  #webgl-home-cover .hero-cover {
    min-height: auto;
    padding: 24px 22px 42px;
  }

  #webgl-home-cover .site-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #webgl-home-cover .nav-links {
    justify-content: flex-start;
    gap: 26px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
  }

  #webgl-home-cover .nav-links::-webkit-scrollbar {
    display: none;
  }

  #webgl-home-cover .hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 24px;
    padding-top: 34px;
  }

  #webgl-home-cover .hero-copy {
    padding: 0;
  }

  #webgl-home-cover .hero-copy h1 {
    font-size: clamp(48px, 13vw, 70px);
  }

  #webgl-home-cover .hero-subtitle {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.75;
  }

  #webgl-home-cover .canvas-shell {
    width: min(700px, 96vw);
  }
}

@media (max-width: 640px) {
  #webgl-home-cover .hero-cover {
    padding: 18px 16px 34px;
  }

  #webgl-home-cover .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  #webgl-home-cover .brand-copy strong {
    font-size: 18px;
  }

  #webgl-home-cover .brand-copy span {
    font-size: 11px;
  }

  #webgl-home-cover .nav-links {
    gap: 22px;
    font-size: 14px;
  }

  #webgl-home-cover .hero-layout {
    gap: 28px;
    padding-top: 28px;
  }

  #webgl-home-cover .hero-copy h1 {
    font-size: clamp(42px, 14vw, 58px);
    line-height: 1.1;
  }

  #webgl-home-cover .hero-subtitle {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.72;
  }

  #webgl-home-cover .hero-actions {
    gap: 12px;
    margin-top: 26px;
  }

  #webgl-home-cover .btn {
    height: 52px;
    padding: 0 24px;
    font-size: 15px;
  }

  #webgl-home-cover .btn-primary,
  #webgl-home-cover .btn-secondary {
    min-width: calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
  }

  #webgl-home-cover .canvas-shell {
    width: min(540px, 112vw);
  }

  #webgl-home-cover .module-card {
    width: 118px;
    height: 78px;
    padding: 9px 10px;
    gap: 4px;
    border-radius: 15px;
  }

  #webgl-home-cover .module-card strong {
    font-size: 18px;
  }

  #webgl-home-cover .module-card span:last-child {
    font-size: 11px;
  }

  #webgl-home-cover .module-icon {
    width: 24px;
    height: 24px;
  }

  #webgl-home-cover .module-icon svg {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 410px) {
  #webgl-home-cover .btn-primary,
  #webgl-home-cover .btn-secondary {
    min-width: 100%;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #webgl-home-cover *,
  #webgl-home-cover *::before,
  #webgl-home-cover *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

