/* Version: dynamic-metaball-v2 / updated 2026-05-31 */
:root {
  --bg-0: #070a12;
  --bg-1: #0d1324;
  --panel: rgba(255, 255, 255, 0.085);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7fbff;
  --muted: #aebbd2;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 28px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(125, 211, 252, 0.32), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(167, 139, 250, 0.26), transparent 28rem),
    radial-gradient(circle at 45% 90%, rgba(52, 211, 153, 0.15), transparent 32rem),
    linear-gradient(135deg, var(--bg-0), var(--bg-1));
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.1));
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  isolation: isolate;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  opacity: 0.82;
  z-index: -1;
  mix-blend-mode: screen;
  will-change: transform, border-radius, filter;
}

.hero::before {
  width: 360px;
  height: 320px;
  right: -115px;
  top: -115px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.32), transparent 0 24%, transparent 44%),
    conic-gradient(from 120deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  filter: blur(7px) saturate(1.25);
  animation: metaball-large 8.8s cubic-bezier(.43, .05, .19, .97) infinite alternate;
}

.hero::after {
  width: 220px;
  height: 190px;
  left: 8%;
  bottom: -95px;
  background:
    radial-gradient(circle at 65% 35%, rgba(255, 255, 255, 0.22), transparent 0 24%, transparent 44%),
    linear-gradient(135deg, rgba(125, 211, 252, 0.78), rgba(52, 211, 153, 0.48), rgba(167, 139, 250, 0.56));
  filter: blur(8px) saturate(1.2);
  animation: metaball-small 6.6s ease-in-out infinite alternate;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 0 0 22px;
  color: #dff7ff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 999px;
  background: var(--accent-3);
  box-shadow: 0 0 20px var(--accent-3);
}

h1 {
  max-width: 820px;
  margin: 0;
  padding-bottom: 0.08em;
  font-size: clamp(3.1rem, 9vw, 6.7rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  overflow: visible;
}

.gradient-text {
  display: inline-block;
  padding-right: 0.08em;
  color: transparent;
  background: linear-gradient(90deg, #ffffff, var(--accent), var(--accent-2));
  background-clip: text;
  -webkit-background-clip: text;
}

.hero p {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions a,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-actions a:first-child,
.link-button.primary {
  color: #06111f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 36px rgba(125, 211, 252, 0.25);
}

.hero-actions a:hover,
.link-button:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(255, 255, 255, 0.14);
}

.hero-actions a:first-child:hover,
.link-button.primary:hover {
  background: linear-gradient(135deg, #a5e9ff, #c4b5fd);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 20px;
  margin: 54px 0 20px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  text-align: right;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  grid-column: span 6;
  min-height: 300px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--panel), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 600ms ease, transform 600ms ease, border-color 200ms ease, background 200ms ease;
}

.card:nth-child(1),
.card:nth-child(2) {
  grid-column: span 6;
}

.card:nth-child(n+3) {
  grid-column: span 4;
}

.card.is-visible,
.no-js .card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card:hover {
  border-color: rgba(125, 211, 252, 0.42);
  background: linear-gradient(145deg, var(--panel-strong), rgba(255, 255, 255, 0.055));
}

.card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(125, 211, 252, 0.18), transparent 18rem);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.tag {
  padding: 7px 11px;
  color: #dff7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
}

.card h3 {
  position: relative;
  margin: 26px 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.card p {
  position: relative;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.75;
}

.links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.link-button {
  min-height: 46px;
  padding: 11px 14px;
  font-size: 0.95rem;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.download small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.footer {
  margin-top: 42px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.orb {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.65);
  box-shadow: 0 0 28px rgba(125, 211, 252, 0.8);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: width 150ms ease, height 150ms ease, opacity 200ms ease;
  opacity: 0.7;
}

@keyframes metaball-large {
  0% {
    border-radius: 52% 48% 46% 54% / 48% 42% 58% 52%;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  38% {
    border-radius: 38% 62% 58% 42% / 58% 36% 64% 42%;
    transform: translate3d(-62px, 54px, 0) rotate(128deg) scale(1.12);
  }
  70% {
    border-radius: 62% 38% 42% 58% / 38% 56% 44% 62%;
    transform: translate3d(-132px, 34px, 0) rotate(236deg) scale(0.92);
  }
  100% {
    border-radius: 44% 56% 64% 36% / 54% 64% 36% 46%;
    transform: translate3d(-92px, 112px, 0) rotate(360deg) scale(1.16);
  }
}

@keyframes metaball-small {
  0% {
    border-radius: 60% 40% 54% 46% / 44% 58% 42% 56%;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  45% {
    border-radius: 42% 58% 36% 64% / 62% 40% 60% 38%;
    transform: translate3d(92px, -46px, 0) rotate(-124deg) scale(1.22);
  }
  100% {
    border-radius: 48% 52% 68% 32% / 34% 62% 38% 66%;
    transform: translate3d(168px, -18px, 0) rotate(-260deg) scale(0.9);
  }
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 22px, var(--max-width));
    padding-top: 24px;
  }

  .hero {
    min-height: auto;
    padding: 34px 22px;
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 10px;
    text-align: left;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .card:nth-child(1),
  .card:nth-child(2),
  .card:nth-child(n+3) {
    grid-column: 1;
  }

  .download {
    align-items: stretch;
    flex-direction: column;
  }

  .download .link-button {
    width: 100%;
  }

  .orb {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .card {
    opacity: 1;
    transform: none;
  }
}
