/* ============================================================================
   namu.club - McBling Tree Lounge CSS
   Y2K Frosted Glass Aesthetic with Chrome Shimmer Typography
   ============================================================================ */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito", sans-serif;
  background: linear-gradient(135deg, rgba(240, 240, 248, 1) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(240, 245, 255, 0.95) 100%);
  background-attachment: fixed;
  color: #2a2040;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============================================================================
   Mountain Backdrop - Fixed Ambient Layer
   ============================================================================ */

#mountain-backdrop {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.mountain-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

#mountain-layer-1 {
  animation: mountain-drift-1 20s ease-in-out infinite;
}

#mountain-layer-2 {
  animation: mountain-drift-2 25s ease-in-out infinite;
}

#mountain-layer-3 {
  animation: mountain-drift-3 30s ease-in-out infinite;
}

@keyframes mountain-drift-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes mountain-drift-2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes mountain-drift-3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ============================================================================
   Sparkle Particles - CSS Animated Twinkling
   ============================================================================ */

#sparkle-container {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
  contain: layout paint;
}

.sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  will-change: opacity;
}

.sparkle-rose {
  background: #e8a0b0;
}

.sparkle-champagne {
  background: #ffd4a8;
}

.sparkle-white {
  background: #ffffff;
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.sparkle {
  animation: sparkle-twinkle linear infinite;
}

/* ============================================================================
   Welcome Section - Frosted Hero Panel
   ============================================================================ */

#welcome {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.welcome-panel {
  max-width: 70vw;
  width: 100%;
  max-height: 60vh;
  backdrop-filter: blur(20px) saturate(1.6);
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(200, 200, 220, 0.6);
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: panel-float 6s ease-in-out infinite;
}

@keyframes panel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Chrome Text Effect - Display Font */
.chrome-text {
  font-family: "Righteous", sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 5rem);
  background: linear-gradient(135deg, #b8b8d0, #ffffff, #e8e8f0, #ffffff, #b8b8d0);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: chrome-shift 4s ease-in-out infinite;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

@keyframes chrome-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.welcome-panel h1 {
  margin-bottom: 1.5rem;
}

/* Shimmer Divider */
.shimmer-divider {
  width: 60px;
  height: 2px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, rgba(232, 160, 176, 0.3), #e8a0b0, rgba(232, 160, 176, 0.3));
  animation: shimmer-slide 3s ease-in-out infinite;
}

@keyframes shimmer-slide {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  50% { transform: scaleX(1.1); opacity: 1; }
}

.welcome-subtitle {
  font-family: "Nunito", sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: #6b5b8d;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.welcome-tagline {
  font-family: "Nunito", sans-serif;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: #8b7a9d;
  font-style: italic;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

/* ============================================================================
   Sparkle Ticker - Marquee Section
   ============================================================================ */

#sparkle-ticker {
  position: relative;
  z-index: 3;
  width: 100vw;
  height: 6vh;
  background: linear-gradient(90deg, rgba(255, 200, 255, 0.1), rgba(200, 255, 255, 0.1), rgba(255, 255, 200, 0.1));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(200, 200, 220, 0.3);
  border-bottom: 1px solid rgba(200, 200, 220, 0.3);
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 2rem 0;
  animation: ticker-shimmer 6s ease-in-out infinite;
}

@keyframes ticker-shimmer {
  0%, 100% { background: linear-gradient(90deg, rgba(255, 200, 255, 0.1), rgba(200, 255, 255, 0.1), rgba(255, 255, 200, 0.1)); }
  50% { background: linear-gradient(90deg, rgba(200, 255, 255, 0.15), rgba(255, 255, 200, 0.15), rgba(255, 200, 255, 0.15)); }
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 25s linear infinite;
  will-change: transform;
}

.ticker-content {
  font-family: "Righteous", sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: #2a2040;
  white-space: nowrap;
  padding: 0 2rem;
  letter-spacing: 0.12em;
  display: flex;
  gap: 0.5rem;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================================
   Tree Profile Cards - Staggered Frosted Glass Panels
   ============================================================================ */

#tree-profiles {
  position: relative;
  z-index: 3;
  margin: 2rem 0;
  padding: 0 2rem;
  min-height: 200vh;
}

.tree-card {
  max-width: 500px;
  margin-bottom: 15vh;
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(200, 200, 220, 0.6);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease-out;
  will-change: transform;
}

.tree-card:hover {
  backdrop-filter: blur(30px);
  border-color: rgba(200, 200, 220, 0.9);
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}

/* Tree Photo - Vintage Treatment */
.tree-photo {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(2px);
  border: 2px solid rgba(200, 200, 220, 0.6);
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f5f0e8, #ede5d9);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: sepia(0.3) contrast(1.1) brightness(1.05);
}

.photo-placeholder svg {
  width: 100%;
  height: 100%;
  filter: sepia(0.3) contrast(1.1) brightness(1.05);
}

/* Tree Info - Text Content */
.tree-info {
  text-align: left;
}

.tree-name {
  font-family: "Righteous", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin-bottom: 0.3rem;
  letter-spacing: 0.06em;
}

.tree-botanical {
  font-family: "Nunito", sans-serif;
  font-style: italic;
  color: #6b5b8d;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.tree-bio {
  font-family: "Nunito", sans-serif;
  color: #2a2040;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  line-height: 1.75;
  opacity: 0.95;
}

/* ============================================================================
   Closing Section - Final Frosted Panel
   ============================================================================ */

#closing {
  position: relative;
  z-index: 3;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.closing-panel {
  max-width: 600px;
  width: 100%;
  backdrop-filter: blur(20px) saturate(1.6);
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(200, 200, 220, 0.6);
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.closing-sparkles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 24px;
  overflow: hidden;
}

.closing-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: dot-pulse 2s ease-in-out infinite;
}

.closing-dot:nth-child(odd) {
  background: #e8a0b0;
}

.closing-dot:nth-child(even) {
  background: #ffd4a8;
}

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

.closing-heading {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.closing-sub {
  font-family: "Nunito", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  color: #6b5b8d;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

/* ============================================================================
   Responsive Design - Mobile Adaptations
   ============================================================================ */

@media (max-width: 768px) {
  #welcome {
    min-height: 70vh;
  }

  .welcome-panel {
    max-width: 90vw;
    padding: 2rem 1.5rem;
  }

  #sparkle-ticker {
    height: 5vh;
    margin: 1rem 0;
  }

  .ticker-content {
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    padding: 0 1.5rem;
  }

  #tree-profiles {
    padding: 0 1rem;
  }

  .tree-card {
    max-width: 90vw;
    margin-left: 5% !important;
    margin-bottom: 12vh;
    padding: 1.5rem;
  }

  .tree-card:hover {
    transform: translateY(-5px);
  }

  .tree-name {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  }

  .tree-bio {
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  }

  #closing {
    min-height: 60vh;
  }

  .closing-panel {
    max-width: 90vw;
    padding: 2rem 1.5rem;
  }

  .closing-heading {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  }

  /* Reduce sparkle count on mobile */
  .sparkle:nth-child(n+16) {
    display: none;
  }
}

@media (max-width: 480px) {
  .chrome-text {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }

  .welcome-subtitle {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
  }

  .tree-card {
    margin-bottom: 10vh;
  }

  .tree-bio {
    line-height: 1.6;
  }

  #sparkle-ticker {
    height: 4vh;
  }

  .ticker-content {
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    padding: 0 1rem;
  }
}

/* ============================================================================
   Accessibility and Performance
   ============================================================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .panel-float {
    animation: none;
  }

  .chrome-shift {
    animation: none;
  }

  .shimmer-slide {
    animation: none;
  }

  .ticker-scroll {
    animation: none;
  }

  .mountain-drift-1,
  .mountain-drift-2,
  .mountain-drift-3 {
    animation: none;
  }

  .ticker-shimmer {
    animation: none;
  }

  .dot-pulse {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .tree-card {
    border-width: 3px;
    border-color: rgba(200, 200, 220, 0.8);
  }

  .welcome-panel {
    border-width: 3px;
  }

  .closing-panel {
    border-width: 3px;
  }
}

/* Dark mode fallback (for browsers that don't support backdrop-filter) */
@supports not (backdrop-filter: blur(1px)) {
  .welcome-panel,
  .tree-card,
  .closing-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: none;
  }

  #sparkle-ticker {
    background: rgba(255, 255, 255, 0.6);
  }
}

/* Print styles */
@media print {
  #sparkle-container,
  #mountain-backdrop,
  #sparkle-ticker {
    display: none;
  }

  .tree-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
