/* Page basics */
html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.glow {
    position: absolute;
    width: 780px;
    height: 780px;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: glow-pulse 10s ease-in-out infinite alternate,
               glow-rotate 30s linear infinite;
}

/* Red Glow */
.glow-red {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(120,180,255,1),
        rgba(50,140,255,0.65),
        rgba(0,120,255,0.15),
        transparent 75%
    );
    top: -5%;
    left: -5%;
}

/* Blue Glow */
.glow-blue {
    background: radial-gradient(
        circle at 70% 70%,
        rgba(120,180,255,1),
        rgba(50,140,255,0.65),
        rgba(0,120,255,0.15),
        transparent 75%
    );
    bottom: -5%;
    right: -5%;
    animation-delay: 2.5s;
}

/* Pulse animation */
@keyframes glow-pulse {
    0% { transform: scale(0.85); opacity: 0.45; }
    100% { transform: scale(1.15); opacity: 0.65; }
}

/* Slow rotation */
@keyframes glow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.container {
    position: relative;
    z-index: 0;
}

h1 {
    color: #f5f5f7;
    margin: 0;
    font-weight: 600;
    font-size: clamp(1.5rem, 5vw, 4rem);
    letter-spacing: -0.015em;
    position: relative;
    display: inline-block;
    opacity: 0;
    animation: fade-up-text 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
    isolation: isolate;
}

h1::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #000 0%, #000 65%, transparent 95%);
    transform: translateX(-110%);
    animation: reveal 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s 3;
    z-index: -1;
}

@keyframes reveal {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(110%); }
}

@keyframes fade-up-text {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Laptop: keep glows subtle and still to avoid fighting the headline animation */
@media (max-width: 1440px) {
  .glow {
    width: 560px;
    height: 560px;
    filter: blur(56px);
    opacity: 0.48;
    animation: glow-pulse 12s ease-in-out infinite alternate;
  }
  .glow-red {
    top: -8%;
    left: -10%;
  }
  .glow-blue {
    bottom: -10%;
    right: -10%;
    animation-delay: 1.2s;
  }
}

@media (prefers-reduced-motion: reduce) {
    .glow { animation: none; }
    h1::after { display: none; }
    h1 { animation: fade-up-text 0.3s ease-out 0.15s both; }
}

/* Mobile: simplify to plain background to avoid visual glitches */
@media (max-width: 599px) {
  .welcome-bg {
    display: none;
  }
}