/* ============================================================
   Fonts – lokal gehostet (DSGVO-konform)
   ============================================================ */
@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/CourierPrime-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/CourierPrime-Bold.ttf") format("truetype");
}

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --teal-900: #056b6d;
  --teal-700: #0a9296;
  --teal-500: #12b2b3;
  --cyan-400: #29c9c4;
  --blue-400: #4f9fe6;

  --ink: #0d1b26;
  --muted: #5d7079;
  --faint: #9fb0b7;

  --bg-top: #fbfdfd;
  --bg-bottom: #eef6f6;

  --accent-gradient: linear-gradient(100deg, var(--blue-400), var(--teal-500) 55%, var(--cyan-400));

  --shadow-sm: 0 2px 8px rgba(13, 27, 38, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(6, 107, 109, 0.45);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   Fortschrittsbalken (Countdown)
   ============================================================ */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 10;
  background: rgba(18, 178, 179, 0.12);
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 0 4px 4px 0;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px rgba(18, 178, 179, 0.6);
  animation: fill 5s linear forwards;
}

@keyframes fill {
  to { width: 100%; }
}

/* ============================================================
   Hintergrund
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.bg__blob--a {
  width: 46vmax;
  height: 46vmax;
  top: -18vmax;
  right: -12vmax;
  background: radial-gradient(circle at 30% 30%, rgba(41, 201, 196, 0.7), transparent 65%);
  animation: drift-a 18s var(--ease) infinite alternate;
}

.bg__blob--b {
  width: 42vmax;
  height: 42vmax;
  bottom: -16vmax;
  left: -14vmax;
  background: radial-gradient(circle at 60% 40%, rgba(79, 159, 230, 0.55), transparent 65%);
  animation: drift-b 22s var(--ease) infinite alternate;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 27, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 27, 38, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 75%);
}

.bg__watermark {
  position: absolute;
  width: 62vmin;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  animation: spin 60s linear infinite;
}

@keyframes drift-a {
  to { transform: translate(-4vmax, 5vmax) scale(1.1); }
}
@keyframes drift-b {
  to { transform: translate(5vmax, -4vmax) scale(1.08); }
}
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   Bühne & Karte
   ============================================================ */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px;
  display: grid;
  place-items: center;
}

.card {
  width: min(680px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Gestaffelte Einblendung */
.card > * {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s var(--ease) forwards;
}
.emblem { animation-delay: 0.05s; }
.eyebrow { animation-delay: 0.18s; }
.transition { animation-delay: 0.32s; }
.lead { animation-delay: 0.46s; }
.cta { animation-delay: 0.6s; }
.redirect-note { animation-delay: 0.74s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Emblem
   ============================================================ */
.emblem {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 18px 40px -12px rgba(6, 107, 109, 0.5);
  animation: rise 0.8s var(--ease) forwards, float 5.5s ease-in-out 0.9s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ============================================================
   Eyebrow-Chip
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(18, 178, 179, 0.1);
  border: 1px solid rgba(18, 178, 179, 0.22);
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 0 rgba(18, 178, 179, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 178, 179, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(18, 178, 179, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 178, 179, 0); }
}

/* ============================================================
   Übergang: co:de:sign  ->  ennepe.digital
   ============================================================ */
.transition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 34px);
  flex-wrap: wrap;
}

.oldname {
  font-family: "Courier Prime", ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(1.5rem, 5.5vw, 2.6rem);
  color: #7f9498;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
}

.oldname i {
  font-style: normal;
  color: var(--teal-500);
}

.oldname::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: 52%;
  height: 2px;
  background: var(--teal-500);
  opacity: 0.7;
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 0.6s var(--ease) 1.1s forwards;
}

@keyframes strike {
  to { transform: scaleX(1); }
}

.arrow {
  color: var(--teal-500);
  display: inline-flex;
}
.arrow svg {
  width: clamp(30px, 7vw, 42px);
  height: auto;
  transition: transform 0.4s var(--ease);
}

.newlogo {
  width: clamp(180px, 42vw, 280px);
  height: auto;
}

/* Mobil: Logos untereinander -> Pfeil zeigt nach unten */
@media (max-width: 560px) {
  .transition {
    flex-direction: column;
  }
  .arrow svg {
    transform: rotate(90deg);
  }
}

/* ============================================================
   Lead-Text
   ============================================================ */
.lead {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.5;
}
.lead i {
  font-family: "Courier Prime", ui-monospace, monospace;
  font-style: normal;
  color: var(--teal-500);
}
.lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* ============================================================
   Call to Action
   ============================================================ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--accent-gradient);
  background-size: 160% 100%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background-position 0.6s var(--ease);
}

.cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--ease);
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 66px -18px rgba(6, 107, 109, 0.6);
  background-position: 100% 50%;
}
.cta:hover svg {
  transform: translateX(4px);
}

.cta:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
}
.cta:active {
  transform: translateY(-1px);
}

/* ============================================================
   Redirect-Hinweis
   ============================================================ */
.redirect-note {
  font-size: 0.85rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}
#count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--teal-700);
}

/* ============================================================
   Accessibility – reduzierte Bewegung
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card > *,
  .emblem { opacity: 1; transform: none; }
  .oldname::after { transform: scaleX(1); }
  .progress__bar { width: 100%; }
}
