@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #000;
  color: #f1c40f;
  overflow-x: hidden;
  position: relative;
}

/* === BACKGROUND PARTICLES === */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #000;
}

/* === HERO SECTION === */
header.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at center, #000 40%, #0a0a0a 100%);
}

/* Glowing rectangular frame */
header.hero::after {
  content: "";
  position: absolute;
  inset: 5%;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 25px;
  box-shadow:
    0 0 25px rgba(255, 215, 0, 0.2),
    inset 0 0 40px rgba(255, 215, 0, 0.15);
  z-index: 2;
  pointer-events: none;
  animation: frameGlow 5s ease-in-out infinite alternate;
}

@keyframes frameGlow {
  0% {
    opacity: 0.6;
    box-shadow:
      0 0 25px rgba(255, 215, 0, 0.2),
      inset 0 0 30px rgba(255, 215, 0, 0.15);
  }
  100% {
    opacity: 1;
    box-shadow:
      0 0 50px rgba(255, 215, 0, 0.4),
      inset 0 0 60px rgba(255, 215, 0, 0.25);
  }
}

/* Subtle moving light aura behind text */
header.hero::before {
  content: "";
  position: absolute;
  width: 160%;
  height: 160%;
  top: -30%;
  left: -30%;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15), transparent 70%);
  filter: blur(80px);
  animation: glowPulse 6s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glowPulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.95));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 0 30px #f1c40f, 0 0 60px #ffd700;
  animation: fadeInHero 2s ease forwards;
}

@keyframes fadeInHero {
  0% { opacity: 0; transform: translateY(50px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: 5.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  animation: glowText 3s ease-in-out infinite alternate;
}

@keyframes glowText {
  0% { text-shadow: 0 0 10px #f1c40f, 0 0 20px #ffd700, 0 0 40px #f1c40f; }
  100% { text-shadow: 0 0 20px #ffd700, 0 0 50px #fff08a, 0 0 80px #ffd700; }
}

.tagline {
  font-size: 1.8rem;
  color: #d1a33f;
  margin-top: 1.2rem;
  text-shadow: 0 0 15px #f1c40f;
  animation: fadeInTagline 2.5s ease forwards;
}

@keyframes fadeInTagline {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* === HERO NAVIGATION === */
.hero-nav {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  z-index: 3;
  animation: fadeInNav 3.5s ease forwards;
}

@keyframes fadeInNav {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-nav a {
  color: #ffd700;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 25px;
  background: rgba(255, 215, 0, 0.05);
  backdrop-filter: blur(3px);
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.hero-nav a:hover {
  color: #000;
  background: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
  transform: translateY(-3px);
}

.hero-nav a.active {
  background: #ffd700;
  color: #000;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  font-weight: 700;
}

/* === FALLING KEY === */
.falling-key {
  position: absolute;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  animation: dropKey 1.5s ease-in-out forwards, fadeOutKey 1s ease-in 1s forwards;
}

.falling-key img {
  width: 200px;
  filter: drop-shadow(0 0 40px #ffd700);
  animation: spinKey 3s ease-in-out forwards;
}

/* Spark when key lands */
.falling-key::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,215,0,0.6), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkGlow 2s ease-in-out 2.8s forwards;
  filter: blur(20px);
}

@keyframes sparkGlow {
  0% { opacity: 0; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.5); }
}

@keyframes dropKey {
  0% { top: -200px; opacity: 0; }
  40% { opacity: 1; transform: translate(-50%, 20px) rotate(180deg); }
  70% { top: 50%; transform: translate(-50%, 0) rotate(360deg); }
  90% { top: 55%; transform: translate(-50%, 0); }
  100% { top: 55%; transform: translate(-50%, 0); }
}

@keyframes spinKey {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}

@keyframes fadeOutKey {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 150px) scale(0.8); }
}

/* === UNIVERSAL SECTION STYLES === */
.section {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 1000px;
  margin: auto;
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 2.8rem;
  color: #ffd700;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px #f1c40f;
}

p, li {
  color: #ddd;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* === IMAGES === */
.feature-img {
  width: 100%;
  border-radius: 16px;
  margin-top: 2rem;
  box-shadow: 0 0 25px rgba(255,215,0,0.4);
  transition: transform 0.4s ease;
}
.feature-img:hover {
  transform: scale(1.05);
}

/* === PHYSICAL CARDS === */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}
.card {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 2rem;
  width: 280px;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 30px rgba(255,215,0,0.4);
}
.card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.highlight-card {
  border: 1px solid #f1c40f;
  box-shadow: 0 0 25px rgba(255,215,0,0.3);
}

/* === DIGITAL KEYS === */
.digital-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  text-align: left;
}
.digital-box .left,
.digital-box .right {
  flex: 1 1 300px;
  background: #111;
  padding: 2rem;
  border-radius: 10px;
}
.digital-box pre {
  background: #222;
  color: #f1c40f;
  padding: 1rem;
  border-radius: 8px;
  animation: flicker 1.5s infinite;
  overflow-x: auto;
}
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.3; }
}

/* === MUSIC === */
.music-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  text-align: left;
}
.music-box .col {
  background: #111;
  padding: 2rem;
  border-radius: 10px;
  flex: 1 1 350px;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.music-box .col:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 25px rgba(255,215,0,0.3);
}

/* === HISTORY === */
.history {
  background: radial-gradient(circle at top, #111 10%, #000 90%);
}
.definitions {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 2em 0;
}
.definitions li {
  margin-bottom: 1em;
  color: #e0d8b0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}
.definitions li.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === PHILOSOPHY === */
.philosophy {
  background: linear-gradient(to bottom, #0a0a0a, #111);
}
.quote-box {
  background: #111;
  border-left: 4px solid #f1c40f;
  margin: 3em auto;
  padding: 2em;
  max-width: 700px;
  border-radius: 8px;
  transition: all 0.5s ease;
}
.quote-box:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(255,215,0,0.3);
}
.quote {
  font-style: italic;
  color: #ffd700;
  font-size: 1.2rem;
}

/* === REFLECTION === */
blockquote {
  font-style: italic;
  color: #ffd700;
  border-left: 3px solid #f1c40f;
  padding-left: 1em;
  margin-top: 2em;
}

/* === FOOTER === */
footer {
  background: #111;
  text-align: center;
  padding: 2em 0;
  color: #999;
  font-size: 0.9rem;
  border-top: 1px solid #222;
}
