:root {
  --atmosphere-blue: #367dff32;
  --atmosphere-violet: #6654dc1c;
  --atmosphere-ice: #57dfff25;
  --atmosphere-mark: #9bbdff35;
  --atmosphere-grid: #8fadf011;
  --atmosphere-edge: #99dfff68;
  --atmosphere-shadow: #03091560;
  --atmosphere-hero-core: #102447;
  --atmosphere-hero-mid: #0a1224;
  --atmosphere-hero-ice: #39d5fc3b;
  --atmosphere-hero-indigo: #7465ff44;
  --atmosphere-services: #0a1120;
  --atmosphere-tile: 52px;
}

:root[data-theme='light'] {
  --atmosphere-blue: #5397df35;
  --atmosphere-violet: #807ad91c;
  --atmosphere-ice: #77d5ec30;
  --atmosphere-mark: #275a911e;
  --atmosphere-grid: #497fb91c;
  --atmosphere-edge: #5a93bc5c;
  --atmosphere-shadow: #5c92c428;
  --atmosphere-hero-core: #dfeeff;
  --atmosphere-hero-mid: #f0f7ff;
  --atmosphere-hero-ice: #3fbcf13a;
  --atmosphere-hero-indigo: #718bff45;
  --atmosphere-services: #edf5ff;
}

.hero,
[data-theme='light'] .hero {
  background: radial-gradient(ellipse at var(--hero-glow) 53%, var(--atmosphere-hero-core), var(--atmosphere-hero-mid) 48%, var(--ink) 86%);
}

.hero-glow-motion {
  --glow-drift-x: clamp(17px, 4.6vw, 58px);
  --glow-drift-y: clamp(12px, 2.8vw, 35px);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-glow-motion::before,
.hero-glow-motion::after {
  content: '';
  position: absolute;
  width: min(62%, 58rem);
  height: 80%;
}

.hero-glow-motion::before {
  top: 25%;
  left: calc(var(--hero-glow) - 31%);
  opacity: .66;
  background: radial-gradient(ellipse, var(--atmosphere-hero-ice), transparent 71%);
}

.hero-glow-motion::after {
  top: -23%;
  left: calc(var(--hero-glow) - 24%);
  opacity: .68;
  background: radial-gradient(ellipse, var(--atmosphere-hero-indigo), transparent 72%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-glow-motion::before { animation: hero-ice-drift 17s ease-in-out infinite alternate paused; }
  .hero-glow-motion::after { animation: hero-indigo-drift 23s ease-in-out infinite alternate paused; }

  .hero.hero-motion-active .hero-glow-motion::before,
  .hero.hero-motion-active .hero-glow-motion::after { animation-play-state: running; }
}

@keyframes hero-ice-drift {
  from { opacity: .66; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: .96; transform: translate3d(var(--glow-drift-x), calc(0px - var(--glow-drift-y)), 0) scale(1.12); }
}

@keyframes hero-indigo-drift {
  from { opacity: .68; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: .88; transform: translate3d(calc(0px - var(--glow-drift-x)), var(--glow-drift-y), 0) scale(1.1); }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--atmosphere-mark) 1px, transparent 1.5px);
  background-size: var(--atmosphere-tile) var(--atmosphere-tile);
  mask-image: radial-gradient(ellipse 70% 86% at var(--hero-glow) 32%, #000, transparent 72%);
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 5% 2% 8%;
  transform: rotate(-27deg) scaleY(.79);
  border: 1px solid var(--atmosphere-edge);
  border-radius: 50%;
  mask-image: linear-gradient(145deg, transparent 12%, #000a 30%, transparent 49% 70%, #000 91%);
}

.work {
  background:
    radial-gradient(ellipse 45% 33% at 3% 34%, var(--atmosphere-blue), transparent 83%),
    radial-gradient(ellipse 45% 35% at 98% 81%, var(--atmosphere-violet), transparent 84%);
}

.services,
[data-theme='light'] .services {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 53% 86% at 14% 0%, var(--atmosphere-blue), transparent 84%),
    radial-gradient(ellipse 48% 90% at 92% 100%, var(--atmosphere-ice), transparent 80%),
    var(--atmosphere-services);
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--atmosphere-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--atmosphere-grid) 1px, transparent 1px);
  background-size: var(--atmosphere-tile) var(--atmosphere-tile);
  mask-image: radial-gradient(ellipse 77% 96% at 82% 51%, #000 5%, transparent 74%);
}

.services::after {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 5%, var(--atmosphere-edge) 27%, transparent 65%);
}

.approach {
  background: radial-gradient(ellipse 42% 53% at 93% 35%, var(--atmosphere-blue), transparent 88%);
}

.contact {
  background: radial-gradient(ellipse 45% 84% at 49% 42%, var(--atmosphere-violet), transparent 82%);
}

.contact-panel {
  box-shadow: 0 24px 68px -24px var(--atmosphere-shadow), inset 0 1px 0 var(--atmosphere-mark);
}

.contact-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, var(--atmosphere-edge) 46%, transparent 77%) top / 100% 1px no-repeat,
    radial-gradient(ellipse 52% 78% at 75% 0%, var(--atmosphere-ice), transparent 85%);
}

@media (max-width: 610px) {
  :root { --atmosphere-tile: 36px; }
  .hero-glow-motion::before,
  .hero-glow-motion::after { left: 7%; width: 86%; height: 52%; }
  .hero-glow-motion::before { top: 46%; }
  .hero-glow-motion::after { top: 29%; }
  .hero::before { mask-image: radial-gradient(ellipse 92% 55% at 50% 64%, #000, transparent 85%); }
  .hero-visual::before { inset: 10% 4% 11%; }
  .work { background: radial-gradient(ellipse 62% 27% at 0% 22%, var(--atmosphere-blue), transparent 86%); }
  .services::before { mask-image: linear-gradient(138deg, transparent 5%, #000b 42%, transparent 75%); }
}

@media (forced-colors: active) {
  .hero-glow-motion,
  .hero::before,
  .hero-visual::before,
  .services::before,
  .services::after,
  .contact-panel::after { display: none; }
}
