/* ============================================================
   HazeClub landing — fully responsive, mysterious, animated
   ============================================================ */

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #0a0a0f;
  color: #f0f0f5;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport on mobile */
  background: radial-gradient(ellipse at center, #12121a 0%, #0a0a0f 60%, #06060a 100%);
}

/* ==== Background layers ==== */
#stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.85) 100%);
}

/* ==== Stage layout ==== */
.stage {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 5vw, 60px);
}

.parallax {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* ============================================================
   LOGO — SVG H with neon glow, energy rings, clip-path reveal
   ============================================================ */

.logo-wrap {
  --logo-size: clamp(120px, 22vmin, 220px);
  position: relative;
  width: var(--logo-size);
  height: calc(var(--logo-size) * 1.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(32px, 5vmin, 56px);
}

/* Rotating conic-gradient rings behind the H */
.energy-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--logo-size) * 2.2);
  height: calc(var(--logo-size) * 2.2);
  margin-left: calc(var(--logo-size) * -1.1);
  margin-top: calc(var(--logo-size) * -1.1);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(124, 92, 252, 0.5) 60deg,
    transparent 180deg,
    rgba(92, 140, 252, 0.4) 240deg,
    transparent 360deg
  );
  filter: blur(48px);
  opacity: 0;
  animation:
    ring-fade 1.6s ease-out 0.2s forwards,
    ring-rotate 14s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

.energy-ring-2 {
  width: calc(var(--logo-size) * 3);
  height: calc(var(--logo-size) * 3);
  margin-left: calc(var(--logo-size) * -1.5);
  margin-top: calc(var(--logo-size) * -1.5);
  background: conic-gradient(
    from 180deg,
    transparent 0deg,
    rgba(157, 132, 253, 0.3) 120deg,
    transparent 240deg
  );
  filter: blur(64px);
  animation:
    ring-fade 1.8s ease-out 0.4s forwards,
    ring-rotate-reverse 22s linear infinite;
}

@keyframes ring-fade {
  to { opacity: 1; }
}

@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

@keyframes ring-rotate-reverse {
  to { transform: rotate(-360deg); }
}

/* Soft glow disc directly behind the logo */
.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--logo-size) * 1.6);
  height: calc(var(--logo-size) * 1.6);
  margin-left: calc(var(--logo-size) * -0.8);
  margin-top: calc(var(--logo-size) * -0.8);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(124, 92, 252, 0.55) 0%,
    rgba(124, 92, 252, 0.15) 35%,
    transparent 65%
  );
  filter: blur(24px);
  opacity: 0;
  animation:
    glow-fade 1.4s ease-out 0.5s forwards,
    glow-pulse 5s ease-in-out 2s infinite;
  pointer-events: none;
}

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

@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.12); opacity: 0.85; }
}

/* The SVG itself */
.logo-svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  overflow: visible;
  filter:
    drop-shadow(0 0 8px rgba(124, 92, 252, 0.9))
    drop-shadow(0 0 20px rgba(124, 92, 252, 0.6))
    drop-shadow(0 0 40px rgba(124, 92, 252, 0.35));
  animation:
    logo-appear 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards,
    logo-breathe 6s ease-in-out 2.5s infinite;
}

@keyframes logo-appear {
  0% {
    opacity: 0;
    transform: scale(0.82);
    filter:
      blur(14px)
      drop-shadow(0 0 8px rgba(124, 92, 252, 0.9))
      drop-shadow(0 0 20px rgba(124, 92, 252, 0.6))
      drop-shadow(0 0 40px rgba(124, 92, 252, 0.35));
  }
  60% {
    opacity: 1;
    transform: scale(1.04);
    filter:
      blur(0)
      drop-shadow(0 0 12px rgba(196, 165, 255, 1))
      drop-shadow(0 0 28px rgba(124, 92, 252, 0.8))
      drop-shadow(0 0 56px rgba(124, 92, 252, 0.5));
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter:
      blur(0)
      drop-shadow(0 0 8px rgba(124, 92, 252, 0.9))
      drop-shadow(0 0 20px rgba(124, 92, 252, 0.6))
      drop-shadow(0 0 40px rgba(124, 92, 252, 0.35));
  }
}

@keyframes logo-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}

/* Individual bars — reveal with clip-path for a "materializing" effect */
.bar {
  transform-box: fill-box;
}

.b-left {
  clip-path: inset(100% 0 0 0);
  animation: reveal-down 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.b-right {
  clip-path: inset(100% 0 0 0);
  animation: reveal-down 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.b-mid {
  clip-path: inset(0 100% 0 0);
  animation: reveal-right 0.65s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}

@keyframes reveal-down {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes reveal-right {
  to { clip-path: inset(0 0 0 0); }
}

/* Shine overlay — subtle moving highlight */
.shine {
  opacity: 0;
  animation: shine-fade 1s ease 1.6s forwards;
  mix-blend-mode: screen;
}

.shine-rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: shine-shift 6s ease-in-out 2s infinite;
}

@keyframes shine-fade {
  to { opacity: 0.7; }
}

@keyframes shine-shift {
  0%, 100% { transform: translate(-8%, -8%); opacity: 0.6; }
  50%      { transform: translate(8%, 8%);   opacity: 0.3; }
}

/* ============================================================
   TITLE & SUBTITLE
   ============================================================ */

.title {
  display: flex;
  gap: 0.32em;
  font-size: clamp(24px, 5.5vmin, 52px);
  font-weight: 900;
  letter-spacing: clamp(0.15em, 0.22em, 0.25em);
  color: #f0f0f5;
  margin-bottom: clamp(12px, 2vmin, 22px);
  text-align: center;
  flex-wrap: nowrap;
}

.title span {
  display: inline-block;
  animation: letter-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) calc(1.7s + var(--i) * 0.07s) backwards;
  text-shadow:
    0 0 18px rgba(124, 92, 252, 0.5),
    0 0 36px rgba(124, 92, 252, 0.3);
}

@keyframes letter-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.subtitle-wrap {
  height: clamp(18px, 2.4vmin, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in-up 0.9s ease-out 2.6s backwards;
}

.subtitle {
  font-size: clamp(11px, 1.5vmin, 14px);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  color: rgba(240, 240, 245, 0.55);
  transition: opacity 0.6s ease, transform 0.6s ease;
  white-space: nowrap;
  text-align: center;
}

.subtitle.fading {
  opacity: 0;
  transform: translateY(6px);
}

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

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  position: fixed;
  bottom: clamp(20px, 4vmin, 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(9px, 1.1vmin, 11px);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(240, 240, 245, 0.3);
  animation: fade-in-up 1.2s ease-out 3.2s backwards;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.5);
  box-shadow: 0 0 8px rgba(124, 92, 252, 0.8);
  animation: dot-pulse 2s ease-in-out infinite;
}

.footer-text {
  white-space: nowrap;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ============================================================
   RESPONSIVE — landscape phones, tablets, 4K
   ============================================================ */

@media (orientation: landscape) and (max-height: 500px) {
  .logo-wrap {
    --logo-size: clamp(90px, 18vmin, 140px);
    margin-bottom: 20px;
  }
  .title {
    font-size: clamp(20px, 4vmin, 32px);
    margin-bottom: 8px;
  }
  .footer {
    bottom: 14px;
  }
}

@media (min-width: 1600px) {
  .logo-wrap {
    --logo-size: clamp(200px, 16vmin, 280px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .parallax { transform: none !important; }
  .b-left, .b-right, .b-mid { clip-path: inset(0 0 0 0) !important; }
}
