/* ============================================
   PREMIUM HOMEPAGE STYLES
   ============================================ */

:root {
  --accent-primary: #a855f7;
  --accent-secondary: #6366f1;
  --accent-tertiary: #ec4899;
  --glass-bg: rgba(15, 15, 25, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --text-primary: #fafafa;
  --text-secondary: rgba(250, 250, 250, 0.7);
  --shadow-glow: rgba(168, 85, 247, 0.4);
}

html,
body {
  height: 100%;
}

#renderCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

body {
  padding-top: 6rem;
  color: var(--text-primary);
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(1200px circle at 12% 10%, rgba(168, 85, 247, 0.22), transparent 55%),
    radial-gradient(1000px circle at 88% 22%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(1100px circle at 55% 92%, rgba(236, 72, 153, 0.14), transparent 60%),
    #000;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.template {
  padding: 3rem 1.5rem;
  text-align: center;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 8s ease-in-out infinite;
}

@keyframes titleShimmer {
  0%, 100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.3));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6));
  }
}

h1 {
  background-size: 200% 200%;
}

h2.lead {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

h2.lead strong {
  color: var(--text-primary);
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  margin: 1.5rem auto 2rem;
  width: 60%;
  opacity: 0.5;
}

/* ============================================
   PREMIUM GLASS CONTAINER
   ============================================ */

.container {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  padding: 48px 56px;
  margin: auto;
  max-width: 720px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  animation: containerFloat 6s ease-in-out infinite;
}

@keyframes containerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--glass-highlight) 20%,
    rgba(255,255,255,0.25) 50%,
    var(--glass-highlight) 80%,
    transparent 100%);
  border-radius: 24px 24px 0 0;
}

.container::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.15) 0%,
    transparent 50%,
    rgba(99, 102, 241, 0.1) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.container:hover::after {
  opacity: 1;
}

/* Text hover effects - subtle and refined */
h1:hover {
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.8));
  transition: filter 0.4s ease;
}

/* ============================================
   NAVBAR - FLOATING GLASS
   ============================================ */

.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 200px;
  max-width: calc(100% - 32px);
  z-index: 100;
  background: rgba(10, 10, 20, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 12px 32px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  animation: none;
  width: 100%;
}

.navbar .container::before,
.navbar .container::after {
  display: none;
}

.navbar .logo {
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: all 0.3s ease;
  position: relative;
}

.navbar .logo::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

.navbar .logo:hover {
  text-shadow: 0 0 20px var(--shadow-glow);
}

.navbar .logo:hover::after {
  width: 100%;
}

/* ============================================
   BUTTONS - PREMIUM GLASS STYLE
   ============================================ */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.2) 0%,
    rgba(99, 102, 241, 0.2) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  margin: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(168, 85, 247, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent);
  transition: left 0.5s ease;
}

.button:hover::before {
  left: 100%;
}

.button i {
  margin-right: 0;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.button:hover {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.4) 0%,
    rgba(99, 102, 241, 0.35) 100%);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(168, 85, 247, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.button:hover i {
  transform: scale(1.15);
}

.button:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* ============================================
   FOOTER - MINIMAL FLOATING
   ============================================ */

footer {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 100;
  background: rgba(10, 10, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 24px;
  text-align: center;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ============================================
   ANIMATION TOGGLE BUTTON
   ============================================ */

.animation-button {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.animation-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   FOCUS STATES - ACCESSIBILITY
   ============================================ */

.button:focus,
.animation-button:focus,
.logo:focus {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.8),
    0 0 0 4px var(--accent-primary);
}

.animation-button:focus {
  outline: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  body {
    padding-top: 5rem;
    padding-bottom: 70px;
  }

  .navbar {
    top: 12px;
    padding: 10px 20px;
  }

  .navbar .logo {
    font-size: 1.1rem;
  }

  .animation-button {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .container {
    padding: 32px 24px;
    margin: 0 16px;
    border-radius: 20px;
  }

  .button {
    padding: 12px 20px;
    font-size: 0.9rem;
    margin: 4px;
    width: calc(100% - 8px);
    justify-content: center;
  }

  hr {
    width: 80%;
  }

  footer {
    bottom: 12px;
    padding: 8px 20px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 8px 16px;
  }

  .navbar .logo {
    font-size: 1rem;
  }

  .animation-button {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .container {
    padding: 24px 20px;
    margin: 0 12px;
  }

  .button {
    padding: 12px 16px;
  }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */

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

  .container {
    animation: none;
  }

  h1 {
    animation: none;
    background: linear-gradient(135deg, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
  }
}
