/*
 * Stylesheet for the celebratory one‑page website dedicated to the 95th
 * anniversary of Tyumen State University (ТюмГУ). The design aims to be
 * festive, airy and readable. It includes responsive layouts for the
 * hero section with animated balloons and fireworks, as well as a
 * memory album grid. All animations are kept smooth and non‑intrusive.
 */

/* Reset default margins and set base typography */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
  color: #222;
  background: #fdfdff;
  overflow-x: hidden;
}

/* Hero section occupies the full viewport height */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Container for floating balloons */
.balloon-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* Balloon element styling (individual balloons will be created via JS) */
.balloon {
  position: absolute;
  width: 70px;
  height: 90px;
  border-radius: 50% 50% 45% 45%;
  background: var(--balloon-color, #ffcccc);
  box-shadow: inset -8px -8px 12px rgba(0, 0, 0, 0.15);
  opacity: 0.85;
  animation: rise var(--duration) linear infinite;
}

/* Balloon string */
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
}

/* Keyframes controlling the vertical movement of balloons */
@keyframes rise {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-120vh) translateX(0);
    opacity: 0;
  }
}

/* Fireworks container covers the hero section */
.fireworks-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* Each firework is a small element with multiple coloured sparks via box-shadow */
.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  animation: explode 2.5s ease-out infinite;
  animation-delay: var(--delay, 0s);
  /* Use custom properties for random placement */
  left: var(--x);
  top: var(--y);
  /* Vibrant colour palette using box-shadow to create sparks in a circle */
  box-shadow:
    0 -40px 0 2px #ff9aa2,
    28px -28px 0 2px #ffdac1,
    40px 0 0 2px #e2f0cb,
    28px 28px 0 2px #b5ead7,
    0 40px 0 2px #c7ceea,
    -28px 28px 0 2px #ffc2d1,
    -40px 0 0 2px #f6eac2,
    -28px -28px 0 2px #cce5ff;
}

/* Keyframes for fireworks explosion */
@keyframes explode {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  70% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Central content styling */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem;
  color: #222;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  font-weight: 700;
}

.hero-content h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(3rem, 7vw + 0.5rem, 6rem);
  font-weight: 800;
  color: #2d77ff;
  letter-spacing: 0.05em;
}

/* Inline logo inside the main heading */
.logo-inline {
  height: 5.4rem;
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* Footer at the bottom of the hero section */
.hero-footer {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  font-size: 0.9rem;
  color: #555;
}

.footer-logo {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.1));
}

/* Audio button styling */
.audio-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #ffafcc;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
  z-index: 3;
}

.audio-btn:hover {
  background: #ff8fa3;
  transform: scale(1.05);
}

/* Album section styling */
.album-section {
  padding: 4rem 1rem 6rem;
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
  color: #333;
  text-align: center;
}

.album-title {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  margin-bottom: 2rem;
  font-weight: 700;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

.caption {
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #444;
  flex-grow: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .audio-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  .footer-logo {
    width: 60px;
  }
  .caption {
    font-size: 0.85rem;
  }
}