/* Herkunft: Freiwillig – umgesetzt mit Claude Code */

.page-home::before {
  position: fixed;
  inset: 0;
  height: auto;
  background: url("../assets/svg/home-mesh.svg") center 62% / cover no-repeat;
  opacity: 1;
  animation: mesh-drift 26s ease-in-out infinite alternate;
}

.page-home main {
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero--setup {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
}

.hero--setup .hero__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-block: 48px 10vh;
  pointer-events: none;
}

.hero--setup .hero__inner a,
.hero--setup .hero__inner button {
  pointer-events: auto;
}

.hero__content {
  max-width: 470px;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #f9f8fc;
}

.hero__greeting {
  display: block;
  font-size: clamp(3rem, 5.7vw, 5.25rem);
}

.hero__name {
  display: block;
  font-size: clamp(3.75rem, 7.4vw, 6.75rem);
}

.accent-dot {
  color: var(--color-accent-light);
}

.hero__role {
  margin-top: var(--space-5);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-2);
}

.hero__greeting,
.hero__name,
.hero__role {
  animation: rise 800ms var(--ease-out) both;
}

.hero__hint {
  max-width: 34ch;
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-3);
}

.hero__greeting,
.hero__name,
.hero__role,
.hero__hint {
  animation: rise 800ms var(--ease-out) both;
}

.hero__name { animation-delay: 90ms; }
.hero__role { animation-delay: 200ms; }
.hero__hint { animation-delay: 280ms; }

.hero.is-focus .hero__content {
  opacity: 0;
  visibility: hidden;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero:not(.is-focus) .hero__stage {
  cursor: pointer;
}

.hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--color-bg) 0%, rgba(8, 8, 13, 0.78) 22%, rgba(8, 8, 13, 0) 48%),
    linear-gradient(0deg, var(--color-bg) 0%, rgba(8, 8, 13, 0) 16%);
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}

.hero.is-focus .hero__stage::after {
  opacity: 0;
}

.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero.is-loading .hero__poster { opacity: 0.45; }
.hero.is-3d .hero__canvas      { opacity: 1; }
.hero.is-3d .hero__poster      { opacity: 0; }

.hero__loading {
  position: absolute;
  bottom: 92px;
  left: 66%;
  z-index: 3;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-2);
  background: rgba(8, 8, 13, 0.75);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  transform: translateX(-50%);
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.hero.is-pc .hotspot {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hotspot__dot {
  position: absolute;
  inset: 8px;
  background: #f3ecff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(128, 100, 162, 0.55);
  animation: hotspot-pulse 2.8s ease-in-out infinite;
}

.hotspot__label {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text);
  background: rgba(8, 8, 13, 0.88);
  border: 1px solid var(--color-accent-2);
  border-radius: 999px;
  transform: translateY(-50%);
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}

.hotspot[data-component="gpu"] .hotspot__label,
.hotspot[data-component="cpu"] .hotspot__label,
.hotspot[data-component="hdd"] .hotspot__label {
  right: calc(100% + 8px);
  left: auto;
}

.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label,
.hotspot.is-active .hotspot__label {
  background: var(--color-accent);
  border-color: #b18cff;
}

.hero__enter {
  position: absolute;
  bottom: 32px;
  left: 50%;
  z-index: 5;
  padding: 0.7rem 1.2rem;
  font-size: 0.875rem;
  color: #fff;
  background: var(--color-accent);
  border: 1px solid var(--color-accent-2);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.hero__enter:focus {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.hero.is-focus .hero__enter {
  display: none;
}

.focus-ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out) 0.25s, visibility 0.4s 0.25s;
}

.hero.is-focus .focus-ui {
  opacity: 1;
  visibility: visible;
}

.focus-ui__back {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.focus-ui__credits {
  position: absolute;
  bottom: 30px;
  left: var(--gutter);
  max-width: min(720px, 55vw);
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--color-text-4);
  pointer-events: auto;
}

.focus-ui__credits a {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-decoration-color: rgba(184, 155, 224, 0.35);
  text-underline-offset: 2px;
}

.focus-ui__credits a:hover {
  color: var(--color-text);
}

.components {
  margin-top: var(--space-6);
}

.hero.is-loading .components,
.hero.is-3d .components {
  display: none;
}

.focus-ui .components {
  position: absolute;
  bottom: 110px;
  left: var(--gutter);
  margin: 0;
  pointer-events: auto;
}

.components__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin-top: 12px;
}

.component-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: rgba(17, 16, 24, 0.88);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}

.component-link:active {
  transform: scale(0.97);
}

.component-link:hover,
.component-link:focus-visible {
  border-color: var(--color-accent-2);
}

.component-link__name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
}

.component-link__page {
  font-size: 0.8125rem;
  color: var(--color-accent-ink);
}

.info-panel {
  position: fixed;
  top: calc(var(--header-height) + 24px);
  right: var(--gutter);
  z-index: 120;
  width: 380px;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 26px 26px 24px;
  background: rgba(17, 16, 24, 0.95);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform-origin: top right;
  animation: panel-in 220ms var(--ease-out);
}

.info-panel__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-soft);
  background: transparent;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}

.info-panel__close:hover {
  border-color: var(--color-accent-2);
}

.info-panel__close:active {
  transform: scale(0.94);
}

.info-panel__title {
  margin-top: 8px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.info-panel__text {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--color-text-2);
}

.info-panel__page {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--color-text-3);
}

.info-panel__page strong {
  color: var(--color-text);
}

.info-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.info-panel__actions .btn {
  min-height: 44px;
}

.page-home .site-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  margin-top: 0;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.page-home .site-footer__inner {
  min-height: 64px;
  border-top: 0;
}

.page-home:has(.hero.is-focus) .site-footer {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 1023px) {
  .page-home main {
    display: block;
  }

  .page-home .site-footer {
    position: static;
    margin-top: var(--space-6);
  }

  .page-home .site-footer__inner {
    border-top: 1px solid var(--color-line);
  }

  .page-home:has(.hero.is-focus) .site-footer {
    opacity: 1;
    visibility: visible;
  }

  .hero--setup {
    min-height: 0;
  }

  .hero__stage {
    position: relative;
    z-index: 0;
    aspect-ratio: 3 / 2;
  }

  .hero__stage::after {
    background: linear-gradient(0deg, var(--color-bg) 0%, rgba(8, 8, 13, 0) 40%);
  }

  .hero--setup .hero__inner {
    margin-top: -8px;
    padding-top: 0;
  }

  .hero.is-focus .hero__inner {
    display: none;
  }

  .hero__loading {
    display: none;
  }

  .focus-ui {
    position: static;
    display: none;
    padding: var(--space-5) var(--gutter) var(--space-6);
  }

  .hero.is-focus .focus-ui {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
  }

  .focus-ui__back,
  .focus-ui__credits,
  .focus-ui .components {
    position: static;
    max-width: none;
  }

  .focus-ui__back {
    align-self: flex-start;
  }

  .info-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    transform-origin: bottom center;
  }
}

@media (max-width: 560px) {
  .components__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes mesh-drift {
  from { transform: translate3d(0, 0, 0) scale(1.02); }
  to   { transform: translate3d(-1.5%, -1.2%, 0) scale(1.07); }
}

@keyframes hotspot-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

@keyframes panel-in {
  from { opacity: 0; transform: scale(0.97) translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home::before,
  .hotspot__dot,
  .hero__greeting,
  .hero__name,
  .hero__role,
  .hero__hint,
  .info-panel {
    animation: none;
  }
}
