@font-face {
  font-family: 'JustSansOutline';
  src: url('./fonts/just-sans-outline-ExBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Switzer';
  src: url('./fonts/Switzer-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
  user-select: none;
}

html {
  overflow: hidden;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  color: white;
  background: black;
  font-family: 'Switzer', sans-serif;
  text-transform: uppercase;
  overflow: hidden;
}

h2 {
  font-size: clamp(2.3rem, 4.1vw, 4.1rem);
  font-weight: 800;
  font-family: 'JustSansOutline', sans-serif;
  text-align: left;
  letter-spacing: -0.01em;
  width: 90vw;
  max-width: 1200px;
  margin: 0 0 0.5rem 0;
  line-height: 1;
  color: white;
}

.section-heading {
  overflow: hidden;
}

.section-heading .clip-text {
  color: white;
}

.subheading {
  font-size: clamp(0.875rem, 1.6vw, 1.15rem);
  font-family: 'Switzer', sans-serif;
  text-align: left;
  letter-spacing: normal;
  color: white;
  margin: 0;
  font-weight: 300;
  text-transform: none;
  overflow: hidden;
  line-height: 1.2em;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* View More Button */
.view-more-btn {
  margin-top: 1rem;
  padding: 0.75rem 30px;
  background: transparent;
  border: 2px solid white;
  color: white;
  font-family: 'Switzer', sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  pointer-events: auto;
}

.view-more-btn:hover,
.view-more-btn:focus {
  background: white;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.view-more-btn:active {
  transform: translateY(0);
}

header {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px;
  width: 100%;
  z-index: 3;
  height: auto;
  font-family: 'Switzer', sans-serif;
  font-size: clamp(0.66rem, 2vw, 1rem);
  letter-spacing: 0.5em;
}

.logo {
  height: 6rem;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  letter-spacing: 0.2em;
  transition: opacity 0.3s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a:focus {
  opacity: 0.7;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 100%;
}

section {
  height: 100%;
  width: 100%;
  top: 0;
  position: fixed;
  visibility: hidden;
  will-change: transform;
}

.slide-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

section .outer,
section .inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: transform;
}

.section-text {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 10;
  pointer-events: none;
}

section .bg {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  background-size: cover;
  background-position: center;
}

section .bg h2 {
  z-index: 2;
}

section .bg .clip-text {
  display: block;
}

.first .bg {
  background-size: cover;
  background-position: center;
}

.first .slide:nth-child(1) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-1.jpg);
}

.first .slide:nth-child(2) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-2.jpg);
  --focus-x: 65%;
}

.first .slide:nth-child(3) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-3.jpg);
}

.first .slide:nth-child(4) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-4.jpg);
}

.first .slide:nth-child(5) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-5.jpg);
}

.first .slide:nth-child(6) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-6.jpg);
}

.first .slide:nth-child(7) .bg {
  background-image: url(./img/pp/piano-piano-vilnius-italian-restaurant-interior-design-slider-7.jpg);
  --focus-x: 66%;
}

.second .bg {
  background-size: cover;
  background-position: center;
}

.second .slide:nth-child(1) .bg {
  background-image: url(./img/killer-custom/killer-custom-11.jpg);
}

.second .slide:nth-child(2) .bg {
  background-image: url(./img/killer-custom/killer-custom-12.jpg);
}

.second .slide:nth-child(3) .bg {
  background-image: url(./img/killer-custom/killer-custom-1.jpg);
}

.second .slide:nth-child(4) .bg {
  background-image: url(./img/killer-custom/killer-custom-2.jpg);
}

.second .slide:nth-child(5) .bg {
  background-image: url(./img/killer-custom/killer-custom-3.jpg);
}

.second .slide:nth-child(6) .bg {
  background-image: url(./img/killer-custom/killer-custom-4.jpg);
}

.second .slide:nth-child(7) .bg {
  background-image: url(./img/killer-custom/killer-custom-5.jpg);
}

.second .slide:nth-child(8) .bg {
  background-image: url(./img/killer-custom/killer-custom-6.jpg);
}

.second .slide:nth-child(9) .bg {
  background-image: url(./img/killer-custom/killer-custom-7.jpg);
}

.second .slide:nth-child(10) .bg {
  background-image: url(./img/killer-custom/killer-custom-8.jpg);
}

.second .slide:nth-child(11) .bg {
  background-image: url(./img/killer-custom/killer-custom-9.jpg);
}

.second .slide:nth-child(12) .bg {
  background-image: url(./img/killer-custom/killer-custom-10.jpg);
}

.third .bg {
  background-size: cover;
  background-position: center;
}

.third .slide:nth-child(1) .bg {
  background-image: url(./img/sandelis/sandelis-kaunas-nightclub-music-club-interior-design-slide-1.jpg);
}

.third .slide:nth-child(2) .bg {
  background-image: url(./img/sandelis/sandelis-kaunas-nightclub-music-club-interior-design-slide-2.jpg);
}

.third .slide:nth-child(3) .bg {
  background-image: url(./img/sandelis/sandelis-kaunas-nightclub-music-club-interior-design-slide-3.jpg);
}

.third .slide:nth-child(4) .bg {
  background-image: url(./img/sandelis/sandelis-kaunas-nightclub-music-club-interior-design-slide-4.jpg);
}

.lenex .bg {
  background-size: cover;
  background-position: center;
}

.lenex .slide:nth-child(1) .bg {
  background-image: url(./img/lenex/lenex-door-salon-1.jpg);
}

.lenex .slide:nth-child(2) .bg {
  background-image: url(./img/lenex/lenex-door-salon-2.jpg);
}

.lenex .slide:nth-child(3) .bg {
  background-image: url(./img/lenex/lenex-door-salon-3.jpg);
}

.lenex .slide:nth-child(4) .bg {
  background-image: url(./img/lenex/lenex-door-salon-4.jpg);
}

.lenex .slide:nth-child(5) .bg {
  background-image: url(./img/lenex/lenex-door-salon-5.jpg);
}

.lenex .slide:nth-child(6) .bg {
  background-image: url(./img/lenex/lenex-door-salon-6.jpg);
}

.fourth .bg {
  background-size: cover;
  background-position: center;
}

.fourth .slide:nth-child(1) .bg {
  background-image: url(./img/cory/coryhome-navali-firepit-chiminea-product-design-slide-1.jpg);
  --focus-x: 36%;
}

.fourth .slide:nth-child(2) .bg {
  background-image: url(./img/cory/coryhome-ragnar-firepit-chiminea-product-design-slide-2.jpg);
  --focus-x: 26%;
}

.fourth .slide:nth-child(3) .bg {
  background-image: url(./img/cory/navali-inside-main.jpg);
  --focus-x: 12%;
}

.fourth .slide:nth-child(4) .bg {
  background-image: url(./img/cory/ragnar-in-bg.jpg);
  --focus-x: 32%;
}

.fifth .bg {
  background-image: url("https://images.unsplash.com/photo-1617141636403-f511e2d5dc17?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYxODAzMjc4Mw&ixlib=rb-1.2.1&q=75w=1920");
  background-position: 50% 45%;
}

.scroll-arrow {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.scroll-arrow:hover {
  opacity: 1;
}

/* Navigation Arrows */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.nav-arrow:hover,
.nav-arrow:focus {
  opacity: 1;
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.1);
}

.nav-arrow:active {
  transform: translateY(-50%);
}

.nav-arrow-left {
  left: 30px;
}

.nav-arrow-right {
  right: 30px;
}

.nav-arrow svg {
  pointer-events: none;
}

@media (max-width: 768px),
(max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  header {
    padding: 20px;
  }

  .logo {
    height: 5rem;
  }

  .nav-arrow {
    width: 35px;
    height: 35px;
  }

  .nav-arrow-left {
    left: 20px;
  }

  .nav-arrow-right {
    right: 20px;
  }

  .section-text {
    bottom: 20px;
    left: 20px;
  }

  .scroll-arrow {
    bottom: 20px;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  h2 {
    font-size: clamp(1.5rem, 10vh, 2.8rem);
  }

  .subheading {
    font-size: clamp(0.7rem, 4vh, 1rem);
  }

  .view-more-btn {
    padding: 0.4rem 15px;
    font-size: 0.75rem;
    margin-top: 0.4rem;
  }
}

/* Focus styles for keyboard navigation */
section:focus {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/* Loading state */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.5rem;
  z-index: 1000;
}

/* Performance optimization */
.slide,
.outer,
.inner,
.bg {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Transition Overlay - optimized for performance */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Project Detail Page */
.project-detail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
  will-change: opacity;
}

.project-detail.active {
  opacity: 1;
  visibility: visible;
}

.close-project {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 101;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-project:hover,
.close-project:focus {
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.project-content {
  width: 100%;
  min-height: 100vh;
}

.project-hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.project-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 1s ease;
  background: #111;
}

.project-detail.active .project-hero-image {
  transform: scale(1);
}

/* Image loading state */
.project-hero-image:not([src]),
.project-hero-image[src=""] {
  background: linear-gradient(90deg, #111 25%, #222 50%, #111 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.project-info {
  padding: 4rem 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-info>* {
  transform: translateZ(0);
}

.project-title {
  font-family: 'Switzer', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  color: #fff;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.project-description {
  font-family: 'Switzer', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: white;
  line-height: 1.6;
  margin-bottom: 3rem;
  max-width: 800px;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item h3 {
  font-family: 'Switzer', sans-serif;
  font-size: 0.875rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem 0;
}

.detail-item p {
  font-family: 'Switzer', sans-serif;
  font-size: 1.125rem;
  color: #fff;
  margin: 0;
}

.project-gallery h3 {
  font-family: 'Switzer', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
  margin: 0 0 2rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-grid img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px),
(max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  .project-info {
    padding: 2rem 15px;
  }

  .close-project {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-grid img {
    height: 250px;
  }
}

/* --- Mobile Background Position Adjustments --- */
/* Uncomment and adjust the values below to center key subjects on mobile */

@media (max-width: 768px),
(max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {

  /* Move scroll arrow to right side */
  .scroll-arrow {
    left: auto;
    right: 20px;
    transform: none;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {

  /* --- Dynamic Focal Point System --- */
  /* This automatically applies the focal point if you define --focus-x on the slide */
  /* Only active on vertical mobile/tablet screens */
  .bg {
    background-position: var(--focus-x, 50%) center !important;
  }
}