.un-root {
  --un-ink: #0b1f3a;
  --un-ink-soft: rgba(11, 31, 58, 0.58);
  --un-blue: #3a7bd5;
  --un-glow: rgba(90, 150, 230, 0.3);
  --un-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --un-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --un-ease-draw: cubic-bezier(0.45, 0.05, 0.2, 1);
  --un-shadow-x: 0px;
  --un-shadow-y: 12px;
  min-height: 100dvh;
  color: var(--un-ink);
  font-family: var(--font-un-sans), ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(126, 182, 255, 0.4), transparent 58%),
    radial-gradient(900px 520px at 85% 90%, rgba(58, 123, 213, 0.14), transparent 55%),
    radial-gradient(700px 420px at 8% 80%, rgba(180, 210, 255, 0.35), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f3f7fc 42%, #eaf1fa 100%);
  overflow: hidden;
  position: relative;
  /* 4. Entry from darkness */
  filter: brightness(0.97);
  transition: filter 2.8s var(--un-ease);
}

.un-root--dawn {
  filter: brightness(1);
}

.un-root::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 40%, var(--un-glow), transparent 28%),
    radial-gradient(circle at 70% 55%, rgba(126, 182, 255, 0.18), transparent 32%);
  animation: un-drift 22s var(--un-ease-soft) infinite alternate;
  pointer-events: none;
}

.un-root::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 31, 58, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 58, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
  opacity: 0.65;
}

@keyframes un-drift {
  from {
    transform: translate3d(-1.5%, -0.8%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1.5%, 0) scale(1.04);
  }
}

@keyframes un-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes un-draw {
  0% {
    stroke-dashoffset: 440;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes un-split-u {
  0% {
    transform: translateX(-50%) scale(0.985);
    filter: blur(0);
  }
  58% {
    transform: translateX(-50%) scale(1);
    filter: blur(0);
  }
  72% {
    filter: blur(0.35px);
  }
  100% {
    transform: translateX(-110%) scale(1);
    filter: blur(0);
  }
}

@keyframes un-split-n {
  0% {
    transform: translateX(-50%) rotate(180deg) scale(0.985);
    filter: blur(0);
  }
  58% {
    transform: translateX(-50%) rotate(180deg) scale(1);
    filter: blur(0);
  }
  72% {
    filter: blur(0.35px);
  }
  100% {
    transform: translateX(10%) rotate(180deg) scale(1);
    filter: blur(0);
  }
}

@keyframes un-logo-glow {
  0%,
  55% {
    filter: drop-shadow(0 8px 24px rgba(58, 123, 213, 0.1));
  }
  70% {
    filter: drop-shadow(0 18px 48px rgba(58, 123, 213, 0.28));
  }
  100% {
    filter: drop-shadow(0 12px 34px rgba(58, 123, 213, 0.14));
  }
}

@keyframes un-soft-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

@keyframes un-sheen {
  0%,
  100% {
    filter: drop-shadow(0 12px 34px rgba(58, 123, 213, 0.12));
  }
  50% {
    filter: drop-shadow(0 18px 46px rgba(58, 123, 213, 0.22));
  }
}

/* Copy ripple */
@keyframes un-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.6);
    opacity: 0;
  }
}

.un-stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.un-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.55s var(--un-ease-soft);
  animation: un-rise 1.4s var(--un-ease) both;
}

.un-brand {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.95rem, 2.2vw, 1.5rem);
}

.un-logo {
  position: relative;
  width: clamp(11rem, 44vw, 23rem);
  height: clamp(6.5rem, 24vw, 12.5rem);
  margin-inline: auto;
  cursor: default;
  /* 3. Living shadow opposite to tilt */
  filter: drop-shadow(var(--un-shadow-x) var(--un-shadow-y) 28px rgba(58, 123, 213, 0.18));
  transition: filter 0.55s var(--un-ease-soft);
  animation:
    un-logo-glow 3.4s var(--un-ease-soft) both,
    un-sheen 7s ease-in-out 3.6s infinite;
}

.un-glyph {
  position: absolute;
  top: 0;
  left: 50%;
  width: 48%;
  height: auto;
  overflow: visible;
  will-change: transform, filter;
}

.un-u {
  z-index: 1;
  transform: translateX(-50%) scale(0.985);
  animation: un-split-u 2.1s var(--un-ease) 2.05s forwards;
}

.un-n {
  z-index: 2;
  transform: translateX(-50%) rotate(180deg) scale(0.985);
  animation: un-split-n 2.1s var(--un-ease) 2.05s forwards;
}

.un-logo--ready .un-u,
.un-logo--ready .un-n {
  /* Keep final split pose; do not clear in a way that restarts draw */
  animation: none;
  transition:
    transform 1.35s var(--un-ease),
    filter 1.35s var(--un-ease-soft);
}

.un-logo--ready .un-path {
  animation: none;
  stroke-dashoffset: 0;
  opacity: 1;
}

.un-logo--ready .un-u {
  transform: translateX(-110%);
}

.un-logo--ready .un-n {
  transform: translateX(10%) rotate(180deg);
}

.un-logo--ready.un-logo--united .un-u {
  transform: translateX(-50%);
}

.un-logo--ready.un-logo--united .un-n {
  transform: translateX(-50%) rotate(180deg);
}

/* 8. Scroll balance — slight reunite */
.un-logo--ready.un-logo--scroll .un-u {
  transform: translateX(-78%);
}

.un-logo--ready.un-logo--scroll .un-n {
  transform: translateX(-22%) rotate(180deg);
}

.un-path {
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  animation: un-draw 1.85s var(--un-ease-draw) forwards;
}

.un-path-u {
  animation-delay: 0.25s;
}

.un-path-n {
  animation-delay: 0.75s;
}

.un-tld {
  font-family: var(--font-un-sans), ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: lowercase;
  color: var(--un-ink-soft);
  animation: un-rise 1.5s var(--un-ease) 3.85s both;
}

.un-orbit {
  width: min(160px, 34vw);
  height: 1px;
  margin: clamp(1.5rem, 3.5vw, 2.35rem) auto 0;
  background: linear-gradient(90deg, transparent, rgba(58, 123, 213, 0.5), transparent);
  position: relative;
  animation: un-rise 1.5s var(--un-ease) 4.05s both;
}

.un-orbit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--un-blue);
  box-shadow: 0 0 0 7px rgba(126, 182, 255, 0.22);
  transform: translate(-50%, -50%);
  animation: un-soft-pulse 4.5s ease-in-out 4.2s infinite;
}

.un-mail-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1.5rem, 3.2vw, 2.2rem);
  min-height: 3.2rem;
  animation: un-rise 1.55s var(--un-ease) 4.25s both;
}

.un-mail {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.15rem 0.2rem;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font: inherit;
  font-size: clamp(0.95rem, 1.7vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--un-ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.45s var(--un-ease-soft),
    border-color 0.45s var(--un-ease-soft),
    transform 0.45s var(--un-ease-soft);
}

.un-mail-at {
  display: inline-block;
  padding-inline: 0;
  transition: padding 0.55s var(--un-ease);
}

/* 6. Whisper — stretch around @ on hover */
.un-mail:hover .un-mail-at {
  padding-inline: 0.14em;
}

.un-mail:hover {
  color: var(--un-blue);
  border-bottom-color: rgba(58, 123, 213, 0.4);
  transform: translateY(-1px);
}

.un-mail:focus-visible {
  outline: 2px solid rgba(58, 123, 213, 0.45);
  outline-offset: 6px;
  border-radius: 4px;
}

.un-mail--copied {
  color: var(--un-blue);
  border-bottom-color: rgba(58, 123, 213, 0.35);
}

.un-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(58, 123, 213, 0.45);
  pointer-events: none;
  animation: un-ripple 0.9s var(--un-ease-soft) forwards;
}

.un-copied {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: lowercase;
  color: rgba(58, 123, 213, 0.85);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.45s var(--un-ease-soft),
    transform 0.45s var(--un-ease-soft);
  pointer-events: none;
}

.un-copied--show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .un-root {
    filter: none;
    transition: none;
  }

  .un-root::before,
  .un-card,
  .un-path,
  .un-u,
  .un-n,
  .un-tld,
  .un-orbit,
  .un-orbit::before,
  .un-mail-wrap,
  .un-logo,
  .un-ripple {
    animation: none !important;
  }

  .un-card,
  .un-mail-at {
    transition: none;
  }

  .un-path {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .un-u,
  .un-logo--ready .un-u {
    transform: translateX(-110%);
  }

  .un-n,
  .un-logo--ready .un-n {
    transform: translateX(10%) rotate(180deg);
  }
}
