/* Mobile-first: sleepynoir — cold moonlight, scanlines + vignette, no grain */

:root {
  --bg: #0a0c10;
  --bg-deep: #06080c;
  --text: #e4eef4;
  --text-muted: #8fa3b0;
  --accent: #a8c8dc;
  --accent-soft: rgba(140, 180, 210, 0.22);
  --fog-a: rgba(90, 130, 170, 0.18);
  --fog-b: rgba(60, 100, 140, 0.12);
  --vignette: rgba(4, 8, 18, 0.75);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.42;
}

@media (min-width: 768px) {
  .matrix-canvas {
    opacity: 0.48;
  }
}

.fog {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform;
}

.fog-a {
  width: min(120vw, 720px);
  height: min(120vw, 720px);
  left: -20%;
  top: -15%;
  background: var(--fog-a);
  animation: drift-a 28s var(--ease-out) infinite alternate;
}

.fog-b {
  width: min(100vw, 560px);
  height: min(100vw, 560px);
  right: -25%;
  bottom: -20%;
  background: var(--fog-b);
  animation: drift-b 36s var(--ease-out) infinite alternate;
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(8%, 6%) scale(1.08);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-10%, -5%) scale(1.12);
  }
}

.moon-slot {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(12.5rem, 78vw, 24rem);
  height: clamp(12.5rem, 78vw, 24rem);
  opacity: 0.38;
}

.moon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.moon-group {
  transform-origin: 50% 50%;
  animation: moon-pulse 7.5s ease-in-out infinite;
}

@keyframes moon-pulse {
  0%,
  100% {
    opacity: 0.88;
  }
  47% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  53% {
    opacity: 0.96;
  }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse 75% 70% at 50% 45%,
    transparent 0%,
    transparent 42%,
    var(--vignette) 100%
  );
  opacity: 0.92;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 8, 20, 0.26) 2px,
    rgba(0, 8, 20, 0.26) 3px
  );
  opacity: 0.52;
}

.main {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(1.25rem, 5vw, 3rem);
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  text-align: center;
  max-width: 36rem;
}

.logotype {
  position: relative;
  margin: 0 0 clamp(0.75rem, 3vw, 1.25rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 10vw, 4rem);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  text-shadow: 0 0 40px rgba(168, 200, 220, 0.25),
    0 0 80px rgba(100, 140, 180, 0.12);
}

.subtitle {
  position: relative;
  margin: 0 auto;
  max-width: 28em;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .moon-slot {
    width: clamp(11rem, 50vw, 26rem);
    height: clamp(11rem, 50vw, 26rem);
    opacity: 0.44;
  }

  .scanlines {
    opacity: 0.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fog-a,
  .fog-b {
    animation: none;
  }

  .moon-group {
    animation: none;
    opacity: 0.95;
  }

  .matrix-canvas {
    opacity: 0.36;
  }
}
