:root {
  color-scheme: dark;
  --bg: #132847;
  --bg-soft: #173763;
  --bg-deep: #050c17;
  --paper: #f3efe7;
  --paper-line: rgba(12, 25, 44, 0.18);
  --text: #f3efe7;
  --text-muted: rgba(243, 239, 231, 0.72);
  --ink: #13233f;
  --ink-muted: rgba(19, 35, 63, 0.72);
  --accent: #f3efe7;
  --card-rx: 0deg;
  --card-ry: 0deg;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

body::selection {
  background: rgba(213, 165, 91, 0.36);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

address,
p,
h1 {
  margin: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-140%);
  transition: transform 140ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  isolation: isolate;
}

.stage__ambient,
.stage__grid,
.stage__halo,
.stage__beam {
  position: absolute;
  inset: 0;
}

.stage__ambient {
  pointer-events: none;
  z-index: -1;
  opacity: 0.14;
}

.stage__grid {
  background-image:
    linear-gradient(to right, rgba(243, 239, 231, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243, 239, 231, 0.05) 1px, transparent 1px);
  background-size: clamp(3rem, 4vw, 4.2rem) clamp(3rem, 4vw, 4.2rem);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

.stage__halo {
  transition: transform 220ms ease-out;
}

.stage__halo--left {
  background: radial-gradient(circle at 28% 35%, rgba(213, 165, 91, 0.16), transparent 0 26%);
  transform: translate3d(calc((var(--pointer-x, 50) - 50) * -0.08px), calc((var(--pointer-y, 50) - 50) * -0.05px), 0);
}

.stage__halo--right {
  background: radial-gradient(circle at 68% 54%, rgba(255, 255, 255, 0.1), transparent 0 20%);
  transform: translate3d(calc((var(--pointer-x, 50) - 50) * 0.06px), calc((var(--pointer-y, 50) - 50) * 0.08px), 0);
}

.stage__beam {
  inset: auto auto 8% 50%;
  width: min(70rem, 100vw);
  height: 18rem;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 0 32%),
    radial-gradient(circle at 50% 50%, rgba(213, 165, 91, 0.1), transparent 0 54%);
  filter: blur(28px);
}

.card-scene {
  width: min(calc(100vw - 8rem), 58rem);
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.business-card {
  position: relative;
  width: min(100%, 52rem);
  margin: 0 auto;
  transform-style: preserve-3d;
  transform:
    rotateX(var(--card-rx))
    rotateY(var(--card-ry));
  animation: none;
  transition: transform 220ms ease-out;
  will-change: transform;
}

.business-card.is-flipped {
  --flip: 180deg;
}

.business-card__shadow {
  position: absolute;
  inset: 86% 18% -10% 18%;
  background: radial-gradient(circle at 50% 50%, rgba(2, 5, 10, 0.28), transparent 70%);
  transform: translateZ(-30px) rotateX(90deg) scale(1.01);
  filter: blur(16px);
  opacity: 0.72;
}

.business-card__body {
  position: relative;
  aspect-ratio: 1.58;
  transform-style: preserve-3d;
  transition: transform 820ms cubic-bezier(0.2, 0.9, 0.2, 1);
  transform: rotateY(var(--flip, 0deg));
}

.business-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0;
  box-shadow:
    0 0 0 1px rgba(243, 239, 231, 0.06),
    0 22px 48px rgba(4, 10, 18, 0.24);
}

.business-card__face::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(243, 239, 231, 0.04);
  border-radius: inherit;
  pointer-events: none;
}

.business-card__face--front {
  background: #1d365e;
}

.business-card__face--back {
  background: var(--paper);
  color: var(--ink);
  transform: rotateY(180deg);
}

.front-face,
.back-face {
  position: relative;
  display: grid;
  height: 100%;
  padding: 0;
}

.front-face {
  position: relative;
  container-type: size;
}

.front-face::before,
.front-face::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.front-face::before {
  inset: 0;
  background: none;
}

.front-face::after {
  display: none;
}

.front-face__brand {
  position: absolute;
  inset: 0;
}

.front-face__logo {
  position: absolute;
  top: 42.2%;
  left: 0;
  right: 0;
  margin: 0 auto;
  text-align: center;
  font-size: 9.1cqw;
  line-height: 0.9;
  font-weight: 900;
  transform: translateY(-50%);
  white-space: nowrap;
}

.back-face__logo {
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.92;
  font-weight: 900;
}

.front-face__logo span,
.back-face__logo span {
  color: var(--accent);
}

.front-face__tagline {
  position: absolute;
  top: 58.8%;
  right: 28.8%;
  margin-top: 0;
  font-size: 3.55cqw;
  line-height: 1;
  font-style: italic;
  font-weight: 400;
  color: rgba(243, 239, 231, 0.94);
  width: fit-content;
  margin-left: 0;
  margin-right: 0;
  transform: translateY(-50%);
}

.back-face__tagline {
  margin-top: 0.9rem;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-style: italic;
  color: rgba(243, 239, 231, 0.94);
}

.card-hotspot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(243, 239, 231, 0.26);
  background: rgba(19, 40, 71, 0.3);
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
  opacity: 0.94;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease;
}

.card-hotspot:hover,
.card-hotspot:focus-visible {
  background: rgba(243, 239, 231, 0.12);
  border-color: rgba(243, 239, 231, 0.42);
}

.card-hotspot:focus-visible {
  outline: 1px solid rgba(243, 239, 231, 0.5);
  outline-offset: 0;
}

.card-hotspot--front {
  right: 5%;
  bottom: 6%;
}

.card-hotspot--back {
  right: 5%;
  bottom: 5%;
  color: var(--ink);
  border-color: rgba(19, 35, 63, 0.2);
  background: rgba(255, 255, 255, 0.28);
}

.card-hotspot--back:hover,
.card-hotspot--back:focus-visible {
  background: rgba(19, 35, 63, 0.08);
  border-color: rgba(19, 35, 63, 0.32);
}

.back-face {
  position: relative;
  container-type: size;
}

.back-face__logo {
  font-size: 5.95cqw;
  line-height: 0.92;
  font-weight: 900;
  white-space: nowrap;
}

.back-face__tagline {
  color: var(--bg-soft);
  font-size: 1.95cqw;
  margin-top: 0.7cqw;
}

.back-face__identity {
  position: absolute;
  top: 12.6%;
  right: 7.1%;
  text-align: right;
  width: 38%;
}

.back-face__contact {
  position: absolute;
  left: 7.8%;
  bottom: 15.5%;
  max-width: 35%;
}

.back-face__contact address,
.back-face__contact p {
  font-size: 1.72cqw;
  line-height: 1.28;
  color: #262b35;
}

.back-face__contact p {
  margin-top: 1.45cqw;
}

.back-face__contact a,
.back-face__impressum a {
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.back-face__impressum {
  position: absolute;
  right: 7.8%;
  bottom: 15.5%;
  max-width: 21%;
  text-align: right;
  color: var(--ink-muted);
}

.back-face__impressum p {
  font-size: 0.98cqw;
  line-height: 1.42;
}

.back-face__impressum p:first-child {
  margin-bottom: 0.8cqw;
  font-weight: 700;
  color: var(--ink);
}

@keyframes card-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -0.4rem;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .stage {
    min-height: auto;
    padding-block: 2rem;
  }

  .stage__ambient {
    opacity: 1;
  }

  .business-card {
    width: min(100%, 34rem);
    animation: card-float 8s ease-in-out infinite;
  }

  .business-card__body {
    aspect-ratio: auto;
    min-height: 31rem;
  }

  .front-face__tagline {
    top: 58.9%;
    font-size: 4.2cqw;
    right: 25.5%;
  }

  .back-face__identity {
    top: 12%;
    right: 8%;
    width: 42%;
  }

  .back-face__logo {
    font-size: 6.8cqw;
  }

  .back-face__tagline {
    font-size: 2.25cqw;
  }

  .back-face__contact {
    max-width: 44%;
  }

  .back-face__contact address,
  .back-face__contact p {
    font-size: 2.1cqw;
  }

  .back-face__impressum {
    max-width: 24%;
  }

  .back-face__impressum p {
    font-size: 1.1cqw;
  }
}

@media (max-width: 560px) {
  .business-card__body {
    min-height: 31rem;
  }

  .back-face__top,
  .back-face__actions {
    grid-template-columns: 1fr;
  }

  .back-face__identity,
  .back-face__impressum,
  .back-face__actions {
    justify-self: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .business-card,
  .stage__halo {
    transform: none !important;
  }
}
