:root {
  --initial-y-offset: 600px;
  --initial-scale: 0.6;

  /* Animation durations */
  --fade-duration: 0.1s;
  --y-duration: 0.2s;
  --scale-duration: 0.33s;

  /* Transition easing */
  --fade-ease: ease-out;
  --y-ease: ease-out;
  --scale-ease: ease-out;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px 20px 6px 20px;
  height: 60px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.6s ease;
  z-index: 100;
}

.main-nav.fade-in {
  opacity: 1;
}

.main-nav.fade-out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
}

.nav-center {
  position: absolute;
  left: 50%;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 6px;
  border-radius: 10px;
  width: 278px;
  height: 49px;
  box-sizing: border-box;
  box-shadow: 0 20px 120px 0 rgba(0, 0, 0, 0.1);
  isolation: isolate;
  -webkit-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
}

.nav-right {
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.logo {
  height: 49px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
}

.logo-light {
  color: #999;
}

.logo-dark {
  color: #333;
}

.logo-short {
  display: none;
}

.contact-short {
  display: none;
}

.nav-link {
  width: 125px;
  height: 37px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: color 0.2s ease;
}

.nav-right .nav-link {
  height: 49px;
  width: auto;
  min-width: 49px;
}

.nav-btn {
  width: 125px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0179D0;
  border-radius: 10px;
  color: #333;
  box-sizing: border-box;
  transition: color 0.2s ease;
}

.nav-btn:hover {
  color: #0179D0;
}

.nav-center .nav-link:hover {
  color: #0179D0;
}

/* Main content container */
.main-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0px;
  background: transparent;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  isolation: isolate;
  padding-top: 60px;
}
.main-content::-webkit-scrollbar { display: none; }

/* Filter bar wrapper */
.filter-bar-wrapper {
  width: 100%;
  padding: calc(100vh / 11) 60px 10px 40px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  box-sizing: border-box;
  flex-shrink: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}
.filter-bar-wrapper::-webkit-scrollbar { display: none; }

.filter-bar-wrapper.fade-out {
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Filter bar */
.filter-bar {
  margin-bottom: 0px;
  margin-left: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 100%;
}

.filter-pill {
  background-color: white;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: 24px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.11);
}

.filter-pill:hover {
  color: #0179D0;
}

.filter-pill.active {
  background-color: white;
  border-color: #0179D0;
  color: #333;
}

.filter-pill.active:hover {
  color: #0179D0;
}

/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height - adjusts for browser chrome */
  background: rgb(245, 245, 245);
  color: white;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: always;
}

/* Home screen */
.home-screen {
  position: fixed;
  inset: 0;
  background: rgb(245, 245, 245);
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(100vh / 4);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.home-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

spline-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  opacity: 1;
  --spline-rotate-start: -20deg;
  --spline-scale-start: 1.15;
  transform: rotateY(0deg) scale(1);
}

body.initial-spline-fade spline-viewer {
  opacity: 0;
  animation: splineInitialFade 1s ease-out forwards;
  animation-delay: 3s;
}

spline-viewer.spline-enter {
  transform: rotateY(var(--spline-rotate-start)) scale(var(--spline-scale-start));
  animation: rotateZoomIn 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes rotateZoomIn {
  from {
    transform: rotateY(var(--spline-rotate-start)) scale(var(--spline-scale-start));
  }
  to {
    transform: rotateY(0deg) scale(1);
  }
}

@keyframes splineInitialFade {
  to {
    opacity: 1;
  }
}

.home-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.home-title {
  font-size: 45px;
  font-weight: 300;
  color: #333;
  margin: 0;
  line-height: 1.2;
}

.home-description {
  font-size: 17px;
  font-weight: 500;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

.home-image {
  width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 20px 20px 100px 100px;
  margin-top: 24px;
}

/* Home content fade-in animations */
.home-title,
.home-description,
.home-image {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-title.fade-in,
.home-description.fade-in,
.home-image.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Carousel wrapper */
.carousel-wrapper {
  width: 100%;
  padding: 25px 40px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  box-sizing: border-box;
  flex-shrink: 0;
}
.carousel-wrapper::-webkit-scrollbar { display: none; }

/* Carousel */
.carousel {
  display: flex;
  align-items: flex-start;
  width: max-content;
  min-width: 100%;
  transform: translateY(0);
  opacity: 1;
  transition: transform var(--scale-duration) var(--y-ease), opacity var(--scale-duration) var(--y-ease);
}

.carousel.slide-up {
  transform: translateY(-28px);
  opacity: 0;
}

.card {
  flex: 0 0 min(290px, max(260px, calc(100vh * 0.35)));
  height: min(590px, max(453px, calc(100vh * 0.6)));
  margin: 0 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: scale(1.075); }
.card:active { transform: scale(1.04); }

.card-coming-soon {
  cursor: default !important;
}

.card-coming-soon:hover,
.card-coming-soon:active {
  transform: none !important;
}

/* Card filtering animations */
.card.filtering-out {
  opacity: 0;
  transition: none;
}

.card.filtering-in {
  animation: cardSlideIn 0.2s ease-out;
  opacity: 1;
}

@keyframes cardSlideIn {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.card-content {
  position: absolute;
  inset: 0;
  padding: min(32px, max(24px, calc(100vh * 0.032)));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.card-title {
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.card-description {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 16px 0;
  line-height: 1.4;
  opacity: 0.95;
  height: min(85px, max(75px, calc(100vh * 0.085)));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.card-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  align-self: center;
}

/* Detail screen */
.detail-screen {  
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-radius: 6px;
  margin: 6px;
  isolation: isolate;
  overflow-y: auto;
  scrollbar-width: none;

  /* Start state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--initial-y-offset)) scale(var(--initial-scale));
  pointer-events: none;

  /* Animate all properties with keyframes */
  animation-fill-mode: forwards;
}
.detail-screen::-webkit-scrollbar { display: none; }

.detail-screen.show {
  pointer-events: auto;
  visibility: visible;
  animation-name: detailIn;
  animation-duration: var(--scale-duration);
  animation-timing-function: ease-out;
  background-size: 255px 211px, auto 100%, 100% 100%;
  background-position: center, center, center;
  background-repeat: repeat, repeat-x, no-repeat;
  background-blend-mode: overlay, overlay, normal;
}

.detail-screen.show.slide-from-right {
  animation-name: detailInFromRight;
}

.detail-screen.show.slide-from-left {
  animation-name: detailInFromLeft;
}

.detail-screen.hide {
  visibility: visible;
  animation-name: detailOut;
  animation-duration: 0.15s;
  animation-timing-function: ease-in;
}

.detail-screen.hide.slide-to-left {
  animation-name: detailOutToLeft;
}

.detail-screen.hide.slide-to-right {
  animation-name: detailOutToRight;
}

.detail-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  -webkit-transform: translateX(-50%) translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: #de000092;
  background: rgba(230, 230, 230, 0.701);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 6px 6px;
  border-radius: 10px;
  box-shadow: 0 0 100px 0 rgba(0, 0, 0, 0.3);
  isolation: isolate;
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detail-nav.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.detail-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.detail-nav-btn img {
  width: 13px;
  height: 13px;
  display: block;
  transition: opacity 0.2s ease;
}

.detail-nav-btn .icon-default {
  opacity: 0.5;
}

.detail-nav-btn .icon-hover {
  opacity: 0;
  position: absolute;
}

.detail-nav-btn:hover {
  background: rgba(255, 255, 255, 0.76);
}

.detail-nav-btn:hover .icon-default {
  opacity: 0;
}

.detail-nav-btn:hover .icon-hover {
  opacity: 1;
}

.detail-nav-btn:active {
  background: rgba(255, 255, 255, 0.9);
}

.detail-nav-btn:active .icon-hover {
  opacity: 0.5;
}

.detail-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1550px;
  padding: 120px 40px 80px 40px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.detail-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-top: 200px;
  margin-bottom: 120px;
}

.detail-title {
  font-size: 45px;
  font-weight: 300;
  color: white;
  margin: 0 0 12px 0;
}

.detail-description {
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  line-height: 1.6;
  max-width: 600px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.detail-tag {
  padding: 12px 32px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.11);
}

.detail-tag:hover {
  color: #0179D0;
}

/* Section image */
.section-image {
  width: 100%;
  max-width: 1550px;
  height: auto;
  margin-top: 24px;
  border-radius: 8px;
  display: block;
  padding: 2px;
  background: rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
  cursor: zoom-in;
  transition: background 0.2s ease-out, transform 0.1s ease-out;
}

.section-image:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.025);
}

.section-image:active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.02);
}

.images-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
  margin-top: 24px;
  justify-content: center;
}

.section-image-wrapper {
  flex: 1 1 460px;
  min-width: 460px;
  max-width: 666px;
  display: flex;
  flex-direction: column;
}

.section-image-small {
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  transition: background 0.2s ease-out, transform 0.1s ease-out;
  padding: 2px;
  background: rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}

.section-image-small img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.section-image-small:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.section-image-small:active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.02);
}

.images-no-hover .section-image-small {
  cursor: default;
  transition: none;
}

.images-no-hover .section-image-small:hover,
.images-no-hover .section-image-small:active {
  transform: none;
}

.section-image-title {
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  margin-top: 20px;
  line-height: 1.2;
  text-align: left;
}



/* ------------------------------------------------------------------------------------------------
Keyframes to sequence opacity, Y, scale 
------------------------------------------------------------------------------------------------ */
@keyframes detailIn {
  0% {
    opacity: 0;
    transform: translateY(var(--initial-y-offset)) scale(var(--initial-scale));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes detailInFromRight {
  0% {
    opacity: 0;
    transform: translateY(var(--initial-y-offset)) scale(var(--initial-scale));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes detailInFromLeft {
  0% {
    opacity: 0;
    transform: translateY(var(--initial-y-offset)) scale(var(--initial-scale));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes detailOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(200px) scale(1);
  }
}

@keyframes detailOutToLeft {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(200px) scale(1);
  }
}

@keyframes detailOutToRight {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(200px) scale(1);
  }
}



/* ------------------------------------------------------------------------------------------------
Image modal
------------------------------------------------------------------------------------------------ */

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.285);
  backdrop-filter: blur(95px);
  -webkit-backdrop-filter: blur(95px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 200;
  padding: 40px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
  overflow-y: auto;
  overflow-x: hidden;
}

.image-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-modal-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.image-modal-wrapper {
  width: 100%;
  max-width: 1550px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 120px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-modal-title {
  font-size: 45px;
  font-weight: 300;
  color: #333;
  margin: 100px 0 50px 0;
  text-align: center;
  padding: 0 40px;
}

.image-modal-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0 0 8px 8px;
  cursor: zoom-out;
}

/* Responsive navigation for narrow screens */
@media (max-width: 600px) {
  .logo-full {
    display: none;
  }
  
  .logo-short {
    display: inline;
  }
  
  .contact-full {
    display: none;
  }
  
  .contact-short {
    display: inline;
  }
}

