:root {
  --bg: #0b0b0b;
  --ink: #fffdf6;
  --draw-duration: 3.4s;
  --fill-delay: 2.1s;
  --live-delay: 3.5s;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.logo-wrap {
  width: min(92vw, 720px);
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.logo-fill {
  opacity: 0;
  animation: fill-reveal 1.35s cubic-bezier(0.22, 1, 0.36, 1) var(--fill-delay)
    forwards;
}

.logo-stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.95;
  animation: stroke-draw var(--draw-duration) cubic-bezier(0.42, 0, 0.12, 1)
    forwards;
}

.logo-stroke-glow {
  stroke-width: 3.5;
  opacity: 0.35;
  filter: url(#stroke-glow);
  animation: stroke-draw var(--draw-duration) cubic-bezier(0.42, 0, 0.12, 1)
      forwards,
    glow-fade 0.8s ease var(--live-delay) forwards;
}

.logo.is-live .logo-stroke:not(.logo-stroke-glow) {
  opacity: 0.55;
  stroke-width: 0.75;
  stroke-dasharray: 0.022 0.978;
  stroke-dashoffset: 0;
  animation: stroke-travel 11s linear infinite,
    stroke-pulse 4.5s ease-in-out infinite;
}

.logo.is-live .logo-stroke-glow {
  stroke-width: 2.5;
  opacity: 0;
  animation: stroke-travel 11s linear infinite,
    stroke-glow-pulse 4.5s ease-in-out infinite;
}

.logo.is-live {
  animation: logo-breathe 6s ease-in-out infinite;
}

.logo.is-live .logo-stop-a {
  animation: logo-shimmer-a 4.5s ease-in-out infinite;
}

.logo.is-live .logo-stop-b {
  animation: logo-shimmer-b 4.5s ease-in-out infinite;
}

@keyframes stroke-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-reveal {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes glow-fade {
  to {
    opacity: 0;
  }
}

@keyframes stroke-travel {
  to {
    stroke-dashoffset: -1;
  }
}

@keyframes stroke-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.65;
  }
}

@keyframes stroke-glow-pulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.22;
  }
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    transform: scale(1.018);
    filter: drop-shadow(0 0 24px rgba(255, 253, 246, 0.1));
  }
}

@keyframes logo-shimmer-a {
  0%,
  100% {
    stop-opacity: 0.28;
  }
  50% {
    stop-opacity: 0.5;
  }
}

@keyframes logo-shimmer-b {
  0%,
  100% {
    stop-opacity: 0.7;
  }
  50% {
    stop-opacity: 0.98;
  }
}

body.reduced .logo-fill {
  opacity: 1;
  animation: none;
  filter: none;
}

body.reduced .logo-stroke {
  display: none;
}

body.reduced .logo {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .logo-fill {
    opacity: 1;
    animation: none;
    filter: none;
  }

  .logo-stroke {
    display: none;
  }

  .logo,
  .logo-stop-a,
  .logo-stop-b {
    animation: none !important;
  }
}
