:root {
  --bg: #000000;
  --text: #f0f0f0;
  --deon-amber: #FBCB57;
}

html {
  height: 100%;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  background: radial-gradient(circle at center, #000000 0%, #060606 60%, #111111 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.neural-sphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  width: 100%;
  max-width: 42rem;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.logo-container, .subtitle {
  pointer-events: auto;
}

.brand {
  margin: 0;
  padding: 0;
  line-height: 0;
  display: block;
}

.logo-container {
  position: relative;
  display: block;
  width: 420px;
  max-width: min(calc(100vw - 3rem), calc((100vh - 6rem) * 3.8579));
  max-width: min(calc(100vw - 3rem), calc((100dvh - 6rem) * 3.8579));
  margin: 0 auto;
}

@media (min-width: 768px) {
  .logo-container {
    width: 510px;
  }
}

.logo-base {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
}

.letter {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #b0b0b0 0%, #ffffff 45%, #ffffff 55%, #b0b0b0 100%);
  background-size: 250% 100%;
  background-position: 100% 50%;
  -webkit-mask-image: url('../images/deon-logo.png');
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: url('../images/deon-logo.png');
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  will-change: transform, background-position;
  animation-play-state: paused !important;
}

body[data-motion="active"] .letter {
  animation-play-state: running !important;
}

.letter-d {
  clip-path: inset(0 78% 0 0);
  animation: float-d 6s ease-in-out infinite, sheen 8s ease-in-out infinite;
}
.letter-e {
  clip-path: inset(0 55% 0 22%);
  animation: float-e 7s ease-in-out infinite, sheen 8.5s ease-in-out infinite 1s;
}
.letter-o {
  clip-path: inset(0 24% 0 45%);
  animation: float-o 5.5s ease-in-out infinite, sheen 7.5s ease-in-out infinite 2s;
}
.letter-n {
  clip-path: inset(0 0 0 76%);
  animation: float-n 6.5s ease-in-out infinite, sheen 9s ease-in-out infinite 3s;
}

@keyframes float-d {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2px, -3px) rotate(-0.5deg); }
}
@keyframes float-e {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1px, 2px) rotate(0.3deg); }
}
@keyframes float-o {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2px, -1px) scale(1.02); }
}
@keyframes float-n {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-1px, 3px) rotate(-0.2deg); }
}

@keyframes sheen {
  0%, 70% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.subtitle {
  margin: 1.5rem 0 0 0;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  color: var(--text);
  font-weight: 400;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  /* Keep the wordmark static even when JavaScript is unavailable. */
  .letter {
    animation: none !important;
    transform: none !important;
  }
}
