/* ==========================================================================
   hloo -- Coming Soon
   Design: "Digital Horizon" concept
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --color-void:       #07070A;
  --color-obsidian:   #0E0E14;
  --color-luminance:  #A78BFA;
  --color-horizon:    #38BDF8;
  --color-text:       #F1F0F5;
  --color-mist:       #6B6B80;
  --color-glass:      rgba(161, 139, 250, 0.08);
  --color-aura:       rgba(167, 139, 250, 0.15);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing (8px base) */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}


/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-void);
  overflow: hidden;
  line-height: 1.7;
  /* Body reveal from pure black */
  animation: body-reveal 800ms ease-out forwards;
}

::selection {
  background: rgba(167, 139, 250, 0.3);
  color: var(--color-text);
}


/* --------------------------------------------------------------------------
   Background Layers
   -------------------------------------------------------------------------- */

/* Noise texture overlay -- adds analog warmth to flat dark backgrounds */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Gradient mesh -- creates depth and atmosphere.
   Animated to slowly drift, making the page feel alive. */
.bg-gradient-mesh {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(167, 139, 250, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 25% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(167, 139, 250, 0.02) 0%, transparent 60%);
  animation: mesh-drift 20s var(--ease-in-out-smooth) infinite alternate;
}

@keyframes mesh-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(2%, -1.5%) scale(1.02);
  }
  66% {
    transform: translate(-1.5%, 1%) scale(0.99);
  }
  100% {
    transform: translate(1%, 2%) scale(1.01);
  }
}

/* Particle canvas */
#particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Cursor-reactive radial glow -- dual color for depth */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo);
  background:
    radial-gradient(
      600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
      rgba(167, 139, 250, 0.07),
      transparent 60%
    ),
    radial-gradient(
      400px circle at var(--glow-x2, 50%) var(--glow-y2, 50%),
      rgba(56, 189, 248, 0.04),
      transparent 50%
    );
}

.cursor-glow.active {
  opacity: 1;
}


/* --------------------------------------------------------------------------
   Page Layout
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 10;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: var(--space-lg);
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}


/* --------------------------------------------------------------------------
   Wordmark
   -------------------------------------------------------------------------- */
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-lg);
  position: relative;

  /* White wordmark */
  color: #FFFFFF;

  /* Initial hidden state */
  opacity: 0;
  transform: translateY(30px) scale(0.97);

  /* Reveal animation */
  animation: reveal-up 1000ms var(--ease-out-expo) 400ms forwards;
}

/* Ambient glow behind the wordmark -- separate element so it doesn't
   fight with background-clip: text */
.wordmark::after {
  content: 'hloo';
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: transparent;
  z-index: -1;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.12),
    0 0 80px rgba(255, 255, 255, 0.04);
  animation: wordmark-glow 4s ease-in-out 1600ms infinite alternate;
}


@keyframes wordmark-glow {
  0% {
    text-shadow:
      0 0 40px rgba(255, 255, 255, 0.12),
      0 0 80px rgba(255, 255, 255, 0.04);
  }
  100% {
    text-shadow:
      0 0 60px rgba(255, 255, 255, 0.2),
      0 0 120px rgba(255, 255, 255, 0.08),
      0 0 200px rgba(255, 255, 255, 0.03);
  }
}


/* --------------------------------------------------------------------------
   Tagline
   -------------------------------------------------------------------------- */
.tagline {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 2.5vw, 0.9375rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-mist);
  margin-bottom: var(--space-xl);

  opacity: 0;
  transform: translateY(20px);
  animation:
    reveal-up 800ms var(--ease-out-expo) 900ms forwards,
    tagline-breathe 8s ease-in-out 1800ms infinite alternate;
}

/* Breathing effect using opacity instead of letter-spacing.
   letter-spacing triggers layout reflow on every frame -- a performance
   killer I've seen on hundreds of sites. Opacity is composited on GPU. */
@keyframes tagline-breathe {
  0%   { opacity: 1; }
  100% { opacity: 0.78; }
}




/* --------------------------------------------------------------------------
   Shared Keyframes
   -------------------------------------------------------------------------- */
@keyframes reveal-up {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes body-reveal {
  0%   { background-color: #000000; }
  100% { background-color: var(--color-void); }
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  .wordmark {
    margin-bottom: var(--space-md);
  }

  .tagline {
    margin-bottom: var(--space-lg);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .page {
    padding: var(--space-md);
  }

  .wordmark {
    margin-bottom: var(--space-md);
  }

  .tagline {
    margin-bottom: var(--space-lg);
  }

  /* Reduce ambient animation intensity on mobile */
  .bg-gradient-mesh {
    animation-duration: 30s;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .wordmark {
    font-size: 3.5rem;
  }
}


/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .wordmark {
    opacity: 1;
    transform: none;
    color: #FFFFFF;
    text-shadow:
      0 0 40px rgba(255, 255, 255, 0.12),
      0 0 80px rgba(255, 255, 255, 0.04);
  }

  .wordmark::after {
    display: none;
  }

  .tagline {
    opacity: 1;
    transform: none;
  }

  #particles {
    display: none;
  }

  .bg-gradient-mesh {
    inset: 0;
  }
}
