/* root stylesd*/
:root {
  --primary-gradient: linear-gradient(135deg, #6b73ff, #000dff);
  --secondary-gradient: linear-gradient(135deg, #34d399, #059669);
  --text-light: #f7f7f7;
  --text-dark: #444;
  --text-medium: #666;
  --accent-color: #34d399;
  --accent-dark: #059669;
  --num-images: 3;
  --primary-color: #34d399;
  --background-light: #f7f7f7;
}

/* basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--text-light);
  color: var(--text-dark);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* Layout */
section {
  padding: 4rem 0;
  text-align: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hero Section */
.hero {
  background: var(--primary-gradient);
  color: var(--text-light);
  padding: 4rem 20px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Content Sections */
.content,
.additional-content {
  max-width: 800px;
  margin: 0 auto;
}

.content-title,
.additional-content h2 {
  font-size: 2rem;
  color: var(--text-dark);
}

.content-description,
.additional-content p {
  color: var(--text-medium);
  max-width: 65ch;
  margin: 1rem auto;
}

/* Gallery */
.gallery {
  position: relative;
  padding: 2rem 0;
  background-color: var(--background-light);
}

/* Title */
.gallery-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

/* Scroll Container */
.gallery__scrollcontainer {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
  scroll-timeline: --gallery-scroll inline;
}

/* Gallery Entry */
.gallery__entry {
  flex: 0 0 auto;
  width: 600px;
  height: 400px;
  scroll-snap-align: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gallery__entry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Progress Bar */
.gallery__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 8px;
  width: 100%;
  background-color: var(--primary-color);
  transform-origin: left;
  transform: scaleX(calc(1 / var(--num-images)));
  animation: grow-progress linear both;
  animation-timeline: --gallery-scroll;
}

/* progress bar animation */
@keyframes grow-progress {
  to {
    transform: scaleX(1);
  }
}

/* Footer */
footer {
  background-color: #222;
  color: var(--text-light);
  padding: 2rem;
  text-align: center;
}

footer ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--text-light);
  text-decoration: underline;
}

/* Keyframe Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes rotate-in {
  from {
    transform: rotateY(90deg);
    opacity: 0;
  }

  to {
    transform: rotateY(0);
    opacity: 1;
  }
}

/* Scroll-driven animations: https://www.smashingmagazine.com/2024/12/introduction-css-scroll-driven-animations/ */

/* Scroll-linked Animations */
@supports (animation-timeline: scroll()) {
  .hero-title {
    animation: fade-in linear both;
    animation-timeline: scroll();
    animation-range: 0 200px;
  }

  .hero-subtitle {
    animation: slide-up linear both;
    animation-timeline: scroll();
    animation-range: 100px 300px;
  }

  .content-title {
    animation: slide-up linear both;
    animation-timeline: scroll();
    animation-range: entry 10% cover 30%;
  }

  .content-description {
    animation: fade-in linear both;
    animation-timeline: scroll();
    animation-range: entry 20% cover 40%;
  }
}