/* Soft, organic light clouds sit behind the existing page content. */
.ambient-surface {
  position: relative;
  isolation: isolate;
}

.ambient-surface > * {
  position: relative;
  z-index: 1;
}

.ambient-surface::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -12% -10%;
  pointer-events: none;
  border-radius: 58% 42% 63% 37% / 47% 55% 45% 53%;
  transform-origin: center;
  filter: blur(16px);
  will-change: transform, scale;
  opacity: .58;
  background:
    radial-gradient(ellipse 48% 44% at 26% 38%, rgb(216 244 92 / .18), transparent 72%),
    radial-gradient(ellipse 54% 46% at 72% 62%, rgb(137 153 74 / .14), transparent 76%),
    radial-gradient(ellipse 40% 36% at 50% 84%, rgb(216 244 92 / .08), transparent 78%);
}

@media (prefers-reduced-motion: no-preference) {
  .ambient-surface::before {
    animation:
      ambient-cloud-orbit-a 58s linear infinite,
      ambient-cloud-breathe-a 58s ease-in-out infinite;
  }
}

/* Each soft cloud rotates around a broad, continuous orbit. */
@keyframes ambient-cloud-orbit-a {
  from { transform: rotate(0deg) translateX(17%); }
  to { transform: rotate(360deg) translateX(17%); }
}

@keyframes ambient-cloud-breathe-a {
  0%, 100% { scale: .96 1; }
  50% { scale: 1.08 1.06; }
}

@media (max-width: 680px) {
  .ambient-surface::before { filter: blur(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-surface::before {
    animation: none !important;
    transform: none;
    scale: 1;
    will-change: auto;
  }
}

/* Upper-page art direction: broad, diffused light behind the existing hero. */
.ambient-surface.hero {
  background:
    radial-gradient(ellipse at 78% 46%, rgb(12 93 74 / .26), transparent 54%),
    linear-gradient(118deg, #111916 0%, #111a19 52%, #121916 100%);
}

.ambient-surface.hero::before {
  inset: -30% -14% -28% -12%;
  border-radius: 46% 54% 57% 43% / 52% 41% 59% 48%;
  filter: blur(34px);
  opacity: .82;
  background:
    radial-gradient(ellipse 48% 61% at 76% 50%, rgb(28 137 104 / .50), transparent 72%),
    radial-gradient(ellipse 34% 46% at 57% 76%, rgb(216 244 92 / .26), transparent 73%),
    radial-gradient(ellipse 42% 54% at 22% 15%, rgb(18 91 76 / .46), transparent 77%),
    radial-gradient(ellipse 35% 48% at 92% 12%, rgb(60 151 108 / .28), transparent 74%);
}

.ambient-surface.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -42% -20% -36% 18%;
  border-radius: 61% 39% 47% 53% / 43% 59% 41% 57%;
  pointer-events: none;
  filter: blur(42px);
  opacity: .62;
  background:
    radial-gradient(ellipse 42% 49% at 70% 42%, rgb(23 122 98 / .47), transparent 72%),
    radial-gradient(ellipse 30% 37% at 48% 60%, rgb(193 225 82 / .17), transparent 75%);
}

@media (prefers-reduced-motion: no-preference) {
  .ambient-surface.hero::before {
    animation: hero-light-flow 76s ease-in-out infinite alternate;
  }
  .ambient-surface.hero::after {
    animation: hero-light-drift 92s ease-in-out infinite alternate;
  }
}

@keyframes hero-light-flow {
  0% { transform: translate3d(-3%, -1%, 0) rotate(-4deg) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) rotate(3deg) scale(1.08, 1.04); }
  100% { transform: translate3d(-1%, 1%, 0) rotate(-2deg) scale(1.03, 1.09); }
}

@keyframes hero-light-drift {
  0% { transform: translate3d(3%, 1%, 0) rotate(3deg) scale(1.03, 1); }
  50% { transform: translate3d(-2%, -2%, 0) rotate(-3deg) scale(1, 1.08); }
  100% { transform: translate3d(1%, 1%, 0) rotate(2deg) scale(1.07, 1.02); }
}

.hero .hero-inner {
  min-height: min(760px, calc(100svh - 90px));
  padding-top: clamp(82px, 9vw, 146px);
  padding-bottom: clamp(104px, 12vw, 174px);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(20px, 4vw, 76px);
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(4.2rem, 7.5vw, 8.6rem);
  line-height: .91;
  letter-spacing: -.078em;
  margin-top: 34px;
  margin-bottom: 34px;
}

.hero h1 span { color: #d8f45c; }

.hero .orb {
  display: block;
  width: min(37vw, 490px);
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  transform: none;
  background:
    radial-gradient(circle at 31% 24%, #f1ff9a 0%, #d8f45c 24%, #b2d944 53%, #719b31 78%, #38582a 100%);
  box-shadow:
    inset -34px -42px 78px rgb(16 40 23 / .42),
    inset 15px 14px 36px rgb(255 255 204 / .50),
    0 0 48px rgb(216 244 92 / .35),
    0 0 120px rgb(123 174 52 / .24);
}

.hero .orb::after {
  content: "D";
  color: #111714;
  mix-blend-mode: normal;
  font-size: clamp(11rem, 24vw, 20rem);
  letter-spacing: -.12em;
  padding-right: .12em;
  text-shadow: 0 2px 1px rgb(255 255 255 / .15);
}

.ribbon {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: transparent;
  color: #111714;
  min-height: 94px;
}

.ribbon::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 132%;
  height: 150px;
  left: -16%;
  top: -52px;
  border-radius: 50%;
  background: linear-gradient(110deg, #c9ec52 0%, #d8f45c 48%, #c6e94d 100%);
  box-shadow: 0 -8px 38px rgb(216 244 92 / .20);
}

.ribbon .wrap {
  min-height: 94px;
  padding-top: 20px;
  padding-bottom: 8px;
  align-items: center;
  z-index: 1;
}

#leistungen.section { padding-top: clamp(100px, 12vw, 172px); }

#leistungen .section-top {
  align-items: end;
  gap: clamp(32px, 7vw, 120px);
  margin-bottom: 52px;
}

#leistungen .section-top h2 {
  max-width: 790px;
  font-size: clamp(3.4rem, 6.2vw, 7rem);
  line-height: .96;
  letter-spacing: -.078em;
}

#leistungen .section-top p {
  max-width: 440px;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .hero .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .58fr);
    min-height: 0;
    padding-top: 88px;
    padding-bottom: 128px;
  }
  .hero .orb { width: min(36vw, 340px); }
  .hero h1 { font-size: clamp(4rem, 8vw, 6.5rem); }
  #leistungen .section-top { display: grid; grid-template-columns: 1.15fr .85fr; }
}

@media (max-width: 600px) {
  .hero .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 70px;
    padding-bottom: 108px;
    gap: 28px;
  }
  .hero h1 { font-size: clamp(3.45rem, 15vw, 5.15rem); margin: 25px 0 27px; }
  .hero .orb { width: min(58vw, 230px); justify-self: end; margin-right: 5vw; }
  .ambient-surface.hero::before { filter: blur(22px); }
  .ambient-surface.hero::after { filter: blur(26px); }
  .ribbon { min-height: 116px; }
  .ribbon::before { width: 168%; height: 178px; left: -34%; top: -39px; }
  .ribbon .wrap { min-height: 116px; padding-top: 28px; padding-bottom: 10px; gap: 9px 18px; }
  #leistungen.section { padding-top: 80px; }
  #leistungen .section-top { display: block; margin-bottom: 42px; }
  #leistungen .section-top h2 { font-size: clamp(3rem, 13vw, 4.4rem); }
  #leistungen .section-top p { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-surface.hero::before,
  .ambient-surface.hero::after {
    animation: none !important;
    transform: none;
    will-change: auto;
  }
}

/* The D sphere selected for removal is not part of the hero anymore. */
#start .hero-inner { grid-template-columns: minmax(0, 1fr); }
#start .orb { display: none; }

/* Keep the services introduction on the page's shared ambient background and reserve portfolio space. */
#leistungen.section { background: transparent; }
#leistungen .grid { margin-top: clamp(280px, 34vw, 460px); }

@media (max-width: 600px) {
  #leistungen .grid { margin-top: 250px; }
}
