* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter";
  background: #000;
  color: #fff;
  position: relative;
  top: 0;
  left: 0;
}

/* Disable scrolling during loading animation */
body.loading {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

p {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.5;
}

p#logo {
  opacity: 1;
}

/* Hide mobile logo section on desktop */
.mobile-logo-section {
  display: none;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  z-index: 60;
}

.nav-links {
  display: flex;
  gap: 2em;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100vw;
  padding: 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 80; /* above canvas/overlay */
}

.slider-wrapper {
  position: fixed;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0);
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0) 75%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

/* Loader styles from Codegrid example */
* {
  box-sizing: border-box;
}

html, body {
  width: 100vw;
  height: 100vh;
  font-family: "Neue Montreal", Inter;
  overflow: hidden;
}

.container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: none;
}

.pre-loader {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 10;
  overflow: hidden;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loader-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  width: 400px;
  z-index: 12;
  color: #fff;
  overflow: hidden;
}

.count {
  flex: 2;
  text-align: right;
  line-height: 1;
  padding: 0 1em;
}

.copy {
  flex: 6;
  font-family: "PP Editorial Old", Inter;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1;
}

.ml16 {
  overflow: hidden;
}

.ml16 .letter {
  display: inline-block;
  line-height: 1em;
}

.loader-bg {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 7;
  overflow: hidden;
}

.loader-2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

.loader-2 video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
}

.site-content {
  position: relative;
  z-index: 1;
}

/* Remove duplicate generic nav rule above. Use the fixed nav at top left (defined earlier).
   Keep .site-info on the left and .nav-links pushed to the right. */

.site-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: flex-start;
  opacity: 0; /* Hidden by default, will be animated in by GSAP */
}

.site-info #logo {
  font-weight: 700;
  font-size: 1.05rem;
  font-family: "Inter";
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 2em;
  z-index: 2;
}

.nav-links a {
  opacity: 0; /* Hidden by default, will be animated in by GSAP */
  font-family: "Inter";
  font-size: 13px;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: #fff;
  font-family: "Inter";
  font-size: 13px;
  font-weight: 400;
}

nav > div.site-info {
  flex: 0 0 auto;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 2em;
}


.header {
  display: flex;
  padding: 1em;
}

.header h1 {
  flex: 1;
  position: relative;
  font-size: 20vw;
  font-family: "PP Editorial Old", Inter;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  justify-content: center;
  align-items: center;
}


footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding: 2em;
}

footer > div {
  flex: 1;
}

.footer-copy p {
  width: 50%;
}

.footer-nav {
  display: flex;
  gap: 2em;
  justify-content: flex-end;
}

.img {
  width: 225px;
  height: 150px;
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
}

.img:nth-child(1) {
  background: url(./assets/nav-2.avif) no-repeat 50% 50%;
  background-size: cover;
}

.img:nth-child(2) {
  background: url(./assets/nav-1.avif) no-repeat 50% 50%;
  background-size: cover;
}

/* Fallbacks if avif/gif are missing: use available jpgs */
.img:nth-child(1) {
  background-image: url(./assets/nav-2.avif), url(./assets/img6.jpg);
}
.img:nth-child(2) {
  background-image: url(./assets/nav-1.avif), url(./assets/img7.jpg);
}

/* Mobile Responsive Styles */
@media(max-width: 900px) {
  /* Mobile Logo Section */
  .mobile-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    gap: 2em;
  }

  .spinning-logo {
    width: 200px;
    height: 200px;
    perspective: 1000px;
    cursor: grab;
    transition: none;
    touch-action: none;
    user-select: none;
    position: relative;
    margin-right: -15px;
  }

  .spinning-logo canvas {
    width: 100% !important;
    height: 100% !important;
  }

  .spinning-logo.dragging {
    cursor: grabbing;
  }

  .spinning-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.5),
      0 0 0 10px rgba(255, 255, 255, 0.05),
      inset 0 0 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
  }

  .spinning-logo .fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    opacity: 0;
  }

  @keyframes spin3d {
    0% {
      transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
      transform: rotateY(90deg) rotateX(5deg);
    }
    50% {
      transform: rotateY(180deg) rotateX(0deg);
    }
    75% {
      transform: rotateY(270deg) rotateX(-5deg);
    }
    100% {
      transform: rotateY(360deg) rotateX(0deg);
    }
  }

  .mobile-cta-button {
    padding: 1em 2.5em;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: 
      0 5px 20px rgba(0, 0, 0, 0.2),
      0 0 20px rgba(255, 255, 255, 0.3),
      0 0 40px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
  }

  /* Navbar adjustments */
  nav {
    padding: 1em 1.5em;
  }
  
  .nav-links {
    gap: 1.2em;
    font-size: 14px;
  }
  
  .site-info #logo {
    font-size: 1rem;
  }
  
  /* Footer adjustments */
  footer {
    display: none;
  }

  .footer-copy p {
    width: 100%;
  }

  .footer-nav {
    width: 100%;
    justify-content: space-between;
  }
  
  /* Loader content adjustments */
  .loader-content {
    width: 300px;
    font-size: 24px;
  }
  
  .copy {
    font-size: 24px;
  }
  
  /* Ensure canvas is visible and properly sized on mobile */
  .slider-wrapper {
    position: fixed;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: auto !important;
    z-index: 0;
  }
  
  canvas {
    width: 100vw !important;
    height: 100vh !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  /* Ensure overlay doesn't block canvas */
  .overlay {
    pointer-events: none !important;
  }
}
