/* Homepage Fullscreen Slideshow */

/* Intro Overlay */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-black);
  z-index: 666;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease-out;
}

.intro-overlay.fade-out {
  opacity: 0;
}

.intro-text {
  font-family: var(--font-family-sans);
  font-size: 4rem;
  font-weight: 300;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.intro-subtitle {
  font-family: var(--font-family-sans);
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-letter {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.intro-letter.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-letter[data-letter="space"] {
  width: 0.5em;
}

/* Responsive intro text */
@media (max-width: 768px) {
  .intro-text {
    font-size: 2.5rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
  }
  
  .intro-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .intro-text {
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
  }
  
  .intro-subtitle {
    font-size: 0.9rem;
  }
}

.homepage-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: var(--color-black);
  overflow: hidden;
}

.slideshow-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-slide.active {
  opacity: 1;
}

.slideshow-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--color-black);
}

.slideshow-background-image--contain {
  object-fit: contain;
  object-position: center;
}

.slideshow-background-image--cover {
  object-fit: cover;
  object-position: center;
}

/* Slideshow Caption Overlay */
.slideshow-caption {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  max-width: 800px;
  width: 90%;
  pointer-events: none;
}

.caption-content {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 2rem 3rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.caption-title {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.caption-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Slideshow Navigation */
.slideshow-navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  z-index: 10;
  pointer-events: none;
}

.slideshow-nav-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  z-index: 11;
}

.slideshow-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.slideshow-prev {
  left: 2rem;
}

.slideshow-next {
  right: 2rem;
}

/* Slideshow Indicators */
.slideshow-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.slideshow-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slideshow-indicator:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slideshow-indicator.active {
  background: var(--color-white);
  border-color: var(--color-white);
  transform: scale(1.2);
}

/* Slideshow Progress Bar */
.slideshow-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.progress-bar {
  height: 100%;
  background: var(--color-white);
  width: 0%;
  transition: width 0.1s linear;
}

/* Transparent Header Overlay */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: all 2.3s ease;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.8);
}

/* Home Content (hidden when slideshow is active) */
.home-content {
  position: relative;
  z-index: 2;
  margin-top: 100vh;
  background: var(--color-background);
}

/* Responsive Design */
@media (max-width: 768px) {
  .slideshow-background-image--contain {
    object-fit: contain;
    object-position: center;
  }
  
  .slideshow-background-image--cover {
    object-fit: cover;
    object-position: center;
  }
  
  .caption-title {
    font-size: 2rem;
  }
  
  .caption-content {
    padding: 1.5rem 2rem;
  }
  
  .slideshow-nav-btn {
    width: 40px;
    height: 40px;
  }
  
  .slideshow-prev {
    left: 1rem;
  }
  
  .slideshow-next {
    right: 1rem;
  }
  
  .slideshow-caption {
    bottom: 100px;
    width: 95%;
  }
  
  .slideshow-indicators {
    bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .slideshow-background-image--contain {
    object-fit: contain;
    object-position: center;
    width: 100%;
    height: auto;
    max-height: 100vh;
  }
  
  .slideshow-background-image--cover {
    object-fit: cover;
    object-position: center;
  }
  
  .caption-title {
    font-size: 1.75rem;
  }
  
  .caption-content {
    padding: 1rem 1.5rem;
  }
  
  .slideshow-nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .slideshow-caption {
    bottom: 80px;
  }
  
  .slideshow-indicators {
    bottom: 1rem;
  }
}

/* Portrait mobile devices - ensure vertical fitting */
@media (max-width: 480px) and (orientation: portrait) {
  .slideshow-background-image--contain {
    object-fit: contain;
    object-position: center;
    width: 100%;
    height: 100%;
  }
  
  .slideshow-background-image--cover {
    object-fit: cover;
    object-position: center;
  }
}

/* Landscape mobile devices - ensure horizontal fitting */
@media (max-width: 768px) and (orientation: landscape) {
  .slideshow-background-image--contain {
    object-fit: contain;
    object-position: center;
    width: 100%;
    height: 100%;
  }
  
  .slideshow-background-image--cover {
    object-fit: cover;
    object-position: center;
  }
}

/* Legacy home grid styles (kept for compatibility) */
.home-grid {
  display: grid;
  list-style: none;
  grid-gap: 1.5rem;
  line-height: 0;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-flow: dense;
}
.home-grid li {
  position: relative;
  --cols: 1;
  --rows: 1;

  overflow: hidden;
  background: #000;
  line-height: 0;
}
.home-grid li:first-child {
  --cols: 2;
  --rows: 2;
}
.home-grid li:nth-child(5) {
  --cols: 2;
}
.home-grid li:nth-child(6) {
  --rows: 2;
}
.home-grid li:nth-child(7) {
  --cols: 2;
}
.home-grid a {
  display: block;
  height: 10rem;
}
.home-grid img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .3s;
}
.home-grid figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  color: #fff;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  line-height: 1;
  text-align: center;
  background: rgba(0,0,0, .5);
}

@media screen and (min-width: 45em) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .home-grid li {
    grid-column-start: span var(--cols);
    grid-row-start: span var(--rows);
  }
  .home-grid a {
    padding-bottom: 52.65%;
  }
}
