/* =========================================================
   cloudnetz – 404
   404-Seite inklusive Animationen und responsivem Layout
   Aus style-v38.css modularisiert.
   ========================================================= */

/* =========================================================
   cloudnetz 404
   ========================================================= */
.error-hero {
  min-height: calc(100vh - 260px);
  display: grid;
  align-items: center;
}

.error-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .8fr);
  align-items: center;
  gap: 64px;
  width: 100%;
}

.error-copy {
  max-width: 720px;
}

.error-code {
  margin: 12px 0 -16px;
  color: var(--accent-soft);
  font-size: clamp(5.8rem, 13vw, 10rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.07em;
  user-select: none;
}

.error-copy h1 {
  position: relative;
  z-index: 2;
}

.error-copy > p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.error-visual {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr 104px;
  align-items: center;
  min-height: 260px;
}

.error-node {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.error-node-source {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  color: var(--accent);
  background: var(--surface);
}

.error-node-cloud {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  color: #00131d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 42px color-mix(in srgb, var(--accent) 16%, transparent);
}

.error-line {
  position: relative;
  height: 1px;
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 45%, var(--border)) 0 18px,
      transparent 18px 31px
    );
}

.error-line-broken::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 12px;
  left: 52%;
  top: -5px;
  background: var(--bg);
  transform: rotate(-8deg);
}

.error-lost-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  left: 43%;
  top: 42%;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 16px var(--accent);
  animation: lostStream 2.8s ease-in-out infinite;
}

@keyframes lostStream {
  0%   { transform: translateX(-20px); opacity: 0; }
  25%  { opacity: 1; }
  62%  { transform: translateX(28px); opacity: 1; }
  78%  { transform: translate(38px, 16px); opacity: .7; }
  100% { transform: translate(48px, 34px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .error-lost-dot {
    animation: none;
    opacity: .65;
  }
}

@media (max-width: 820px) {
  .error-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .error-visual {
    max-width: 420px;
    width: 100%;
    min-height: 170px;
    margin: 0 auto;
  }

  .error-code {
    font-size: clamp(5rem, 25vw, 8rem);
  }
}

@media (max-width: 520px) {
  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .error-actions .btn {
    text-align: center;
  }
}


/* =========================================================
   404 – dezente zusätzliche Animationen
   ========================================================= */
.error-code {
  animation: errorCodeGlow 5.5s ease-in-out infinite;
}

.error-node-cloud {
  animation: errorCloudPulse 4s ease-in-out infinite;
}

.error-node-source {
  animation: errorSourceFloat 4.8s ease-in-out infinite;
}

.error-visual::before,
.error-visual::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 65%, transparent);
  opacity: .5;
}

.error-visual::before {
  left: 12%;
  top: 18%;
  animation: errorOrbitDotA 7s ease-in-out infinite;
}

.error-visual::after {
  right: 7%;
  bottom: 18%;
  animation: errorOrbitDotB 8.5s ease-in-out infinite;
}

@keyframes errorCodeGlow {
  0%, 100% {
    text-shadow: 0 0 0 transparent;
    opacity: .82;
  }
  50% {
    text-shadow: 0 0 34px color-mix(in srgb, var(--accent) 16%, transparent);
    opacity: 1;
  }
}

@keyframes errorCloudPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 42px color-mix(in srgb, var(--accent) 16%, transparent);
  }
  50% {
    transform: scale(1.025);
    box-shadow:
      0 0 58px color-mix(in srgb, var(--accent) 25%, transparent);
  }
}

@keyframes errorSourceFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@keyframes errorOrbitDotA {
  0%, 100% { transform: translate(0, 0); opacity: .25; }
  50%      { transform: translate(20px, -14px); opacity: .7; }
}

@keyframes errorOrbitDotB {
  0%, 100% { transform: translate(0, 0); opacity: .2; }
  50%      { transform: translate(-18px, 12px); opacity: .65; }
}

@media (prefers-reduced-motion: reduce) {
  .error-code,
  .error-node-cloud,
  .error-node-source,
  .error-visual::before,
  .error-visual::after {
    animation: none !important;
  }
}




/* =========================================================
   Final cloudnetz 404
   ========================================================= */

.error404-hero {
  min-height: calc(100vh - 86px);
  display: grid;
  align-items: center;
  padding: clamp(72px, 8vw, 120px) 0 90px;
}

.error404-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(560px, 1.32fr);
  gap: clamp(50px, 7vw, 110px);
  align-items: center;
  width: 100%;
}

.error404-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.error404-number {
  margin: 10px 0 -16px;
  color: color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: clamp(6.5rem, 11vw, 10.5rem);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.08em;
  user-select: none;
  animation: error404Glow 5.5s ease-in-out infinite;
}

.error404-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 5.4vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.error404-copy > p {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.error404-accent {
  width: 54px;
  height: 3px;
  margin-top: 25px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.error404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.error404-stream {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 104px minmax(120px, 1fr) 160px minmax(150px, 1fr) 110px;
  align-items: center;
  min-height: 340px;
}

.error404-node {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--border));
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow:
    0 16px 42px rgba(0,0,0,.12),
    0 0 26px color-mix(in srgb, var(--accent) 9%, transparent);
}

.error404-source,
.error404-target {
  width: 88px;
  height: 88px;
  border-radius: 24px;
}

.error404-source small,
.error404-target small {
  position: absolute;
  top: calc(100% + 14px);
  width: 130px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

.error404-node-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.error404-dots {
  color: var(--accent);
  font-size: 1.4rem;
  letter-spacing: .12em;
}

.error404-cn-wrap {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.error404-cn-ring {
  position: absolute;
  width: 156px;
  height: 156px;
  top: -18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  animation: error404Ring 18s linear infinite;
}

.error404-cn {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  color: #00131d;
  background:
    radial-gradient(circle at 36% 30%, rgba(255,255,255,.35), transparent 26%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 54%, transparent),
    0 0 36px color-mix(in srgb, var(--accent) 34%, transparent),
    0 0 86px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: error404CenterPulse 4.5s ease-in-out infinite;
}

.error404-cn > span {
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: .04em;
}

.error404-cn-wrap strong {
  color: var(--text);
  font-size: .95rem;
}

.error404-cn-wrap strong span {
  color: var(--accent);
}

.error404-track {
  position: relative;
  height: 1px;
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 52%, var(--border)) 0 15px,
      transparent 15px 27px
    );
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 12%, transparent);
}

.error404-track-right {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 50%, var(--border)) 0 46%,
      transparent 46% 58%,
      color-mix(in srgb, var(--accent) 22%, var(--border)) 58% 100%
    );
}

.error404-packet,
.error404-lost-packet {
  position: absolute;
  z-index: 4;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 16px var(--accent);
}

.error404-packet-a {
  left: 0;
  animation: error404Packet 2.8s linear infinite;
}

.error404-packet-b {
  left: 0;
  animation: error404Packet 2.8s linear 1.25s infinite;
}

.error404-break {
  position: absolute;
  z-index: 7;
  left: 48%;
  top: -17px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 300;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateX(-50%);
}

.error404-lost-packet {
  left: 0;
  animation: error404LostPacket 3.4s ease-in-out infinite;
}

@keyframes error404Packet {
  0%   { left: 0; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0; }
}

@keyframes error404LostPacket {
  0%   { left: 0; transform: translate(0,0); opacity: 0; }
  12%  { opacity: 1; }
  50%  { left: 46%; transform: translate(0,0); opacity: 1; }
  65%  { left: 49%; transform: translate(12px,12px); opacity: .9; }
  100% { left: 55%; transform: translate(32px,58px); opacity: 0; }
}

@keyframes error404Glow {
  0%,100% {
    text-shadow: 0 0 0 transparent;
    opacity: .78;
  }
  50% {
    text-shadow: 0 0 42px color-mix(in srgb, var(--accent) 18%, transparent);
    opacity: 1;
  }
}

@keyframes error404CenterPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.035); }
}

@keyframes error404Ring {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .error404-number,
  .error404-cn,
  .error404-cn-ring,
  .error404-packet,
  .error404-lost-packet {
    animation: none !important;
  }
}

@media (max-width: 1080px) {
  .error404-layout {
    grid-template-columns: 1fr;
  }

  .error404-stream {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .error404-hero {
    padding-top: 54px;
  }

  .error404-stream {
    grid-template-columns: 72px 1fr 104px 1fr 76px;
    min-height: 250px;
  }

  .error404-source,
  .error404-target {
    width: 64px;
    height: 64px;
    border-radius: 19px;
  }

  .error404-source small,
  .error404-target small {
    width: 96px;
    font-size: .68rem;
  }

  .error404-cn {
    width: 92px;
    height: 92px;
  }

  .error404-cn-ring {
    width: 118px;
    height: 118px;
    top: -13px;
  }
}

@media (max-width: 520px) {
  .error404-actions {
    flex-direction: column;
  }

  .error404-actions .btn {
    text-align: center;
  }

  .error404-stream {
    grid-template-columns: 54px 1fr 76px 1fr 54px;
  }

  .error404-source,
  .error404-target {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .error404-cn {
    width: 72px;
    height: 72px;
  }

  .error404-cn-ring {
    width: 94px;
    height: 94px;
    top: -11px;
  }
}




/* =========================================================
   404 vertikales Layout
   Text oben, Stream-Grafik darunter
   ========================================================= */
.error404-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 54px;
  align-items: start;
  justify-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.error404-copy {
  max-width: 760px;
  text-align: center;
}

.error404-copy > p {
  margin-left: auto;
  margin-right: auto;
}

.error404-accent {
  margin-left: auto;
  margin-right: auto;
}

.error404-actions {
  justify-content: center;
}

.error404-stream {
  width: 100%;
  max-width: 980px;
  grid-template-columns: 104px minmax(110px, 1fr) 160px minmax(140px, 1fr) 110px;
  min-height: 250px;
}

.error404-source small,
.error404-target small {
  width: 140px;
}

@media (max-width: 820px) {
  .error404-layout {
    gap: 38px;
  }

  .error404-stream {
    max-width: 620px;
    grid-template-columns: 72px minmax(70px, 1fr) 104px minmax(80px, 1fr) 76px;
    min-height: 210px;
  }
}

@media (max-width: 560px) {
  .error404-copy {
    text-align: left;
  }

  .error404-copy > p {
    margin-left: 0;
    margin-right: 0;
  }

  .error404-accent {
    margin-left: 0;
  }

  .error404-actions {
    justify-content: flex-start;
  }

  .error404-stream {
    grid-template-columns: 50px minmax(42px, 1fr) 72px minmax(46px, 1fr) 52px;
    min-height: 170px;
  }

  .error404-source,
  .error404-target {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .error404-cn {
    width: 70px;
    height: 70px;
  }

  .error404-cn-ring {
    width: 90px;
    height: 90px;
    top: -10px;
  }

  .error404-source small,
  .error404-target small {
    width: 88px;
    font-size: .64rem;
  }
}
