.home-hero {
  --hbg: var(--color-brand);
  --accent: #ffc514;
  --ink: #fff;
  --muted: rgba(255,255,255,.95);
  --blue: #b7e1f5;
  --line: rgba(255,255,255,.3);
  background: var(--hbg);
  color: var(--ink);
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 2rem;
  padding: 3rem clamp(1.25rem,6vw,5rem);
  overflow: hidden;
}

.home-hero .copy {
  position: relative;
  z-index: 2;
}

.home-hero .bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.home-hero .bg i {
  position: absolute;
  width: min(var(--s),24vw);
  aspect-ratio: 1;
  left: var(--x);
  top: var(--y);
  border-radius: 24%;
  rotate: var(--r);
  background: var(--c);
  animation: home-hero-drift var(--t) ease-in-out infinite;
}

.home-hero .bg i.l {
  --c: rgba(255,255,255,.10);
}

.home-hero .bg i.m {
  --c: rgba(255,255,255,.30);
}

.home-hero .bg i.s {
  --c: rgba(255,255,255,.50);
}

.home-hero .bg i.t {
  --c: rgba(255,255,255,.65);
}

.home-hero .bg i.y {
  --c: #e3be2a;
}

@keyframes home-hero-drift {
  50% { translate: 0 -16px; rotate: calc(var(--r) + 3deg); }
}

.home-hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem,1.6vw,1.2rem);
  line-height: 1.3;
  margin: 0 0 .6rem;
  color: var(--muted);
  letter-spacing: .02em;
}

.home-hero .rot {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.4rem,6.4vw,5rem);
  line-height: 1.02;
  margin: 0;
}

.home-hero .words {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: .12em;
}

.home-hero .word {
  grid-area: 1/1;
  transform: translateY(70%);
  opacity: 0;
  transition: transform .7s cubic-bezier(.2,.8,.2,1),opacity .5s;
  background: linear-gradient(transparent 62%,var(--accent) 62%,var(--accent) 88%,transparent 88%);
}

.home-hero .word.on {
  transform: none;
  opacity: 1;
}

.home-hero .caps {
  display: grid;
  margin: 1.2rem 0 1.8rem;
  max-width: 34ch;
  min-height: 3.2em;
}

.home-hero .cap {
  grid-area: 1/1;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s .15s,transform .5s .15s;
}

.home-hero .cap.on {
  opacity: 1;
  transform: none;
}

.home-hero .cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

.home-hero .btn,
.home-services-contact .btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .2s;
}

.home-hero .btn:hover,
.home-services-contact .btn:hover {
  transform: translateY(-2px);
}

.home-hero .btn.main,
.home-services-contact .btn.main {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-form-yellow);
  color: #1d2433;
}

.home-hero .btn.alt {
  border: 2px solid var(--ink);
  color: var(--ink);
}

.home-hero .dots {
  display: flex;
  gap: .5rem;
  margin-top: 2rem;
}

.home-hero .dot {
  width: 2.2rem;
  height: .4rem;
  border: 0;
  border-radius: 4px;
  background: var(--line);
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.home-hero .dot[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  animation: home-hero-fill 3.2s linear forwards;
}

.home-hero.is-paused .dot[aria-current="true"]::after {
  animation: none;
  transform: none;
}

@keyframes home-hero-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.home-hero .stage {
  position: relative;
  z-index: 1;
  height: min(60vh,480px);
  min-height: 260px;
}

.home-hero .layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform .25s ease-out;
  pointer-events: none;
}

.home-hero .morph, .home-hero .ghost {
  width: 46%;
  aspect-ratio: 1;
  grid-area: 1/1;
  transition: border-radius 1s ease-in-out, transform 1s ease-in-out;
}

.home-hero .morph {
  background: linear-gradient(140deg,#ffd84d,var(--accent) 55%,#ffb300);
  box-shadow: 0 30px 60px -24px color-mix(in srgb,var(--accent) 70%,transparent);
  animation: home-hero-bob 6s ease-in-out infinite,home-hero-breathe 5s ease-in-out infinite;
}

.home-hero .ghost {
  background: color-mix(in srgb,var(--blue) 30%,transparent);
  translate: -12% 10%;
  transition-delay: .12s;
}

.home-hero[data-step="0"] .morph, .home-hero[data-step="0"] .ghost {
  border-radius: 26%;
  transform: rotate(-4deg) scale(1);
}

.home-hero[data-step="1"] .morph, .home-hero[data-step="1"] .ghost {
  border-radius: 50%;
  transform: rotate(0deg) scale(.94);
}

.home-hero[data-step="2"] .morph, .home-hero[data-step="2"] .ghost {
  border-radius: 84% 16% 73% 27% / 41% 76% 24% 59%;
  transform: rotate(32deg) scale(1.14, .96);
}

.home-hero .pip {
  width: 4.5%;
  aspect-ratio: 1;
  background: var(--ink);
  border-radius: 50%;
  position: absolute;
  bottom: 14%;
  left: 12%;
  animation: home-hero-bob 5s ease-in-out -1s infinite;
}

.home-hero .sq {
  width: 9%;
  aspect-ratio: 1;
  background: var(--blue);
  border-radius: 32%;
  position: absolute;
  bottom: 10%;
  right: 22%;
  rotate: -10deg;
  animation: home-hero-sway 9s ease-in-out infinite;
}

@keyframes home-hero-bob {
  50% { translate: 0 -14px; }
}

@keyframes home-hero-sway {
  50% { rotate: 14deg; }
}

@keyframes home-hero-breathe {
  50% { scale: 1.05; }
}

.home-hero, .home-hero * {
  box-sizing: border-box;
}

.home-hero :is(a, button):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.home-hero .btn:hover {
  text-decoration: none;
}

@media (min-width: 960px) {
  /* Die bestehende transparente Desktop-Navigation liegt über dem Hero. */
  .home-hero { padding-top: calc(80px + 3rem); }
}

@media (min-width: 1200px) {
  .home-hero .copy {
    inset-inline-start: clamp(0px, calc((100vw - 1200px) * .2), 6rem);
  }
}

@media (max-width: 959px) {
  .home-hero { min-height: calc(100vh - 80px); min-height: calc(100svh - 80px); }
}

@media (max-width: 820px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding-bottom: 4rem; }
  .home-hero .stage { order: -1; height: 220px; min-height: 0; }
}

@media (max-width: 640px) {
  .home-hero .bg .hide-on-phone {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero *, .home-hero *::after { animation: none !important; transition: none !important; }
  .home-hero .btn:hover, .home-services-contact .btn:hover { transform: none; }
}

/* Webdesign-Angebot direkt unter dem Hero. */
.home-services {
  --services-heading: #6bc9f4;
  --hero-tip-height: clamp(24px, 3vw, 52px);
  --services-contact-space: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem);
  padding-block-start: max(clamp(3rem, 7vw, 6rem), calc(var(--hero-tip-height) + 1.5rem));
  padding-block-end: var(--services-contact-space);
  background: #0b1929;
  color: #dce8f1;
}

.home-services::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: clamp(96px, 12vw, 224px);
  height: var(--hero-tip-height);
  transform: translateX(-50%);
  background: var(--color-brand);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.home-services h2 {
  max-width: 29ch;
  margin: 0 auto;
  color: var(--services-heading);
  font: 800 clamp(1.55rem, 3vw, 2rem)/1.15 var(--font-heading);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .025em;
  text-wrap: balance;
}

.home-services-process {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .65rem 1.75rem;
  margin: 1.5rem 0 clamp(1.75rem, 4vw, 3rem);
  padding: 0;
  list-style: none;
}

.home-services-process li {
  position: relative;
  padding: .6rem 1rem;
  border-radius: 14px;
  background: #172f44;
  color: var(--services-heading);
  font: 800 .875rem/1.2 var(--font-heading);
  text-transform: uppercase;
  text-align: center;
}

.home-arrow,
.home-services-process li + li::before {
  display: inline-block;
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12m-5.5-5.5L16 10l-5.5 5.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.home-services-process li + li::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.4375rem;
  top: 50%;
  transform: translateY(-50%);
}

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.home-services-card {
  overflow: hidden;
  border: 1px solid #294056;
  border-radius: 28px;
  background: #14263a;
}

.home-services-card > img {
  display: block;
  width: 100%;
  height: auto;
}

.home-services-copy {
  position: relative;
  padding: 3rem clamp(1.25rem, 3vw, 2rem) 1.75rem;
  color: inherit;
}

.home-services-number {
  position: absolute;
  top: 0;
  inset-inline-start: clamp(1.25rem, 3vw, 2rem);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 14px;
  background: var(--color-form-yellow);
  color: var(--color-text);
  font: 800 1.15rem/1 var(--font-heading);
}

.home-services-copy h3 {
  margin: 0 0 .75rem;
  color: var(--services-heading);
  font: 800 clamp(1.35rem, 2.5vw, 1.65rem)/1.2 var(--font-heading);
}

.home-services-copy p {
  margin: 0 0 .75rem;
}

.home-services-copy p:last-child {
  margin-bottom: 0;
}

.home-services-copy strong {
  color: var(--color-white);
}

.home-services-contact {
  display: flex;
  justify-content: center;
  margin-top: var(--services-contact-space);
}

.home-services-contact .btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .home-services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-services-process {
    flex-direction: column;
    gap: 1.75rem;
  }

  .home-services-process li + li::before {
    inset-inline-start: 50%;
    top: -1.4375rem;
    transform: translateX(-50%) rotate(90deg);
  }
}
