:root {
  --color-accent: #E6007E;
  --color-mid: #798089;
  --color-light: #D6D7DB;
  --color-dark: #0A0B0C;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important;
}
html, body {
  background-color: var(--color-dark);
  color: var(--color-light);
  font-family: 'effra', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.36em;
  overflow: hidden;
  width: 100%;
  height: 100%;
}


::selection {
  background-color: var(--color-accent);
  color: #fff;
}

/* Typography Utilities */
.text-accent { color: var(--color-accent); }
.text-light { color: var(--color-light); }
.text-mid { color: var(--color-mid); }
.text-white { color: #fff; }

/* Preloader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.loader-percentage {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(60px, 10vw, 160px);
  font-weight: 500;
  color: var(--color-light);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.loader-date {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--color-accent);
  font-size: 10px;
}

.loader-date.left {
  left: 10vw;
}

.loader-date.right {
  right: 10vw;
}

.date-digit {
  line-height: 1;
}

.loader-cross {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-cross img {
  width: 100%;
  height: 100%;
}

.loader-cross.top {
  top: 15vh;
}

.loader-cross.bottom {
  bottom: 15vh;
}

/* Global UI Overlay */
.global-ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 100;
}

.global-ui a {
  position: relative;
  pointer-events: auto;
  text-decoration: none;
  color: var(--color-light);
  transition: color 0.3s ease;
}
.global-ui a:hover {
  color: #fff;
}

.magnetic-text {
  display: inline-block; /* Required for GSAP transforms */
  pointer-events: auto; /* Ensure it's clickable */
}

/* Info Toggle Roll Animation */
#info-toggle {
  cursor: pointer;
  pointer-events: auto;
}
.info-text-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 1.2em; /* constrain height to hide rolled text */
  width: 56px;
}
.info-text-wrapper > span {
  display: block;
  line-height: 1.2em;
  will-change: transform;
  text-align: center;
}
.close-text {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

.ui-top-left {
  position: absolute;
  top: 40px;
  left: 40px;
}

.ui-top-middle {
  position: absolute;
  top: 40px;
  left: 15vw;
}

.ui-top-right {
  position: absolute;
  top: 40px;
  right: 40px;
}

.ui-bottom-left {
  position: absolute;
  bottom: 35px;
  left: 40px;
  z-index: 1000;
  line-height: 1.2;
}

.ui-bottom-center {
  position: absolute;
  bottom: 35px;
  left: 35vw;
  z-index: 1000;
}

.ui-bottom-right {
  position: absolute;
  bottom: 35px;
  right: 40px;
  z-index: 1000;
}

.mobile-thank-you {
  display: none;
}
.mobile-pagination {
  display: none;
}

/* Modal Software Text Overlay */
.modal-layout-wrapper {
  position: relative;
  display: flex;
}

.modal-software-text {
  position: absolute;
  right: 100%;
  top: 0;
  padding-right: 40px;
  text-align: left;
  line-height: 1.6;
  white-space: nowrap;
}

.reveal-mask {
  overflow: hidden;
  position: relative;
}

video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* Base scroll elements from Codepen */
.scroll-wrapper {
  position: fixed;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  top: 0;
  overflow-x: auto; /* Allows Lenis to hook into native scroll */
  overflow-y: hidden;
  touch-action: none; /* Prevents native mobile pull-to-refresh and allows Lenis to capture vertical swipes */
}

/* Hide scrollbar on the wrapper for a clean look */
.scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.scroll-content {
  display: flex;
  height: 100%;
  padding: 0 35vw;
  align-items: center;
  width: max-content;
}

.gallery {
  display: flex;
  gap: 4vw;
  align-items: center;
  height: 100%;
}

.gallery_image {
  aspect-ratio: 1; /* Request: 1:1 aspect ratio */
  cursor: pointer;
  height: 45vh;
  min-height: 300px;
  overflow: visible;
}

.gallery_image.is-wiping {
  clip-path: inset(var(--wipe, 0%) 0 0 0 round 12px);
}

.image_container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  will-change: transform;
  transform-origin: center bottom;
  
  transition: box-shadow 0.4s ease;
}

.gallery_image:hover .image_container,
.gallery_image.is-active .image_container {
  
}

/* Detail Section overlays */
.section_content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.section_content.is-hidden {
  z-index: 0;
  pointer-events: none;
}

.content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content_wrapper {
  /* Strictly maintain 9:16 aspect ratio while fitting within 90vw and 80vh */
  width: 90vw;
  max-width: calc(80vh * 9 / 16);
  aspect-ratio: 9 / 16;
  height: auto;
  cursor: pointer;
  position: relative;
  border-radius: 20px;
}

.is-hidden {
  visibility: hidden;
}

/* Video interactions */
/* Video interactions */
video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Hide default play button on iOS Safari */
video::-webkit-media-controls {
    display: none !important;
    opacity: 0 !important;
}
video::-webkit-media-controls-enclosure {
    display: none !important;
}
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}
video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
}
video::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none;
}
video.vid-01 {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.content_wrapper video.vid-01 {
  opacity: 1;
}

.mobile-plus {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 28px;
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  opacity: 0;
  /* Fast transition out when hiding */
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(10px);
  z-index: 5;
  pointer-events: none;
  background-color: rgba(214, 215, 219, 0.05); /* Light color 5% */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
}
.mobile-plus img {
  width: 8px;
  height: 8px;
  object-fit: contain;
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
  .scroll-content {
    /* (100vw - 80vw) / 2 = 10vw to perfectly center the first item */
    padding: 0 10vw; 
  }
  
  .gallery {
    gap: 4vw; /* Keep the tight gap */
  }

  .gallery_image {
    width: 80vw; /* Fills most of the screen */
    height: auto; /* Aspect ratio 1:1 automatically makes height 80vw */
    min-height: auto; /* Remove desktop min-height */
  }

  /* Display the plus icon on mobile only */
  .mobile-plus {
    display: flex;
  }
  
  .gallery_image.is-active .mobile-plus {
    opacity: 1;
    transform: translateY(0);
    /* Delayed and slower transition in when appearing */
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
  }

  /* Restore native cursor and hide custom cursor on mobile touch devices */
  * {
    cursor: auto !important;
  }
  .cursor {
    display: none !important;
  }

  /* Adjust Global UI padding and hide modal text on small screens */
  .ui-top-left { top: 20px; left: 20px; }
  .ui-top-middle { top: 20px; left: 28vw; transform: none; }
  .ui-top-right { top: 20px; right: 20px; }
  .ui-bottom-left { bottom: 20px; left: 20px; }
  .ui-bottom-center { display: none; }
  .modal-software-text { display: none; }

  /* Info Overlay Mobile Layout */
  .info-overlay-content {
    flex-direction: column;
    padding: 0 10vw;
    gap: 40px;
    align-items: flex-start;
  }
  .info-links-list {
    text-align: left;
    align-items: flex-start;
    padding-right: 0;
  }

  /* Increase hit area for global UI links and INFO toggle on mobile */
  .global-ui a, #info-toggle {
    padding: 20px;
    margin: -20px;
  }
}

/* Info Overlay Layout */
.info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none; /* Let interactions pass until needed */
}
.info-overlay:not(.is-hidden) {
  pointer-events: auto;
}
.info-large-text {
  position: absolute;
  bottom: -4vw; /* bleed off the bottom */
  left: 0;
  width: 100vw;
  text-align: center;
  font-size: 22.5vw;
  font-family: 'Clash Display', sans-serif;
  font-weight: 500;
  color: var(--color-accent);
  line-height: 0.7;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  pointer-events: none;
  z-index: 0;
  display: flex;
  justify-content: center;
  white-space: nowrap;
}
.info-large-text .char {
  display: inline-block;
  will-change: transform, opacity;
}
.info-overlay-content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  padding: 0 15vw;
  margin-bottom: 12vh;
}
.info-credits {
  flex: 1;
  max-width: 540px;
}
.info-credits p {
  color: #61666C;
  margin-bottom: 16px;
  line-height: 1.35;
  text-transform: none;
  font-weight: normal;
  letter-spacing: -0.02em;
  font-size: clamp(16px, 2vw, 18px);
  font-family: 'effra', sans-serif;
}
.credits-title {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.36em;
  margin-bottom: 20px;
  font-weight: 600;
}
.info-credits p:last-child {
  margin-bottom: 0;
}
.info-links-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
  padding-top: calc(32px + 12px); /* 32px title offset + 12px top padding */
  padding-bottom: 12px; /* 12px bottom padding */
}
.info-links-list a {
  text-decoration: none;
  color: var(--color-light);
  font-size: 10px;
  letter-spacing: 0.36em;
  transition: color 0.3s ease;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.info-links-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.info-links-list a:hover {
  color: #fff;
}
.info-links-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Custom Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 8px;
  z-index: 9999;
}

.cursor--inner {
  width: 6px;
  height: 6px;
  background-color: var(--color-light);
  border-radius: 2px;
}

.cursor--outer {
  width: 50px;
  height: 50px;
  border: 1px solid var(--color-light);
  background-color: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Hidden by default, only the inner dot is visible initially */
  opacity: 0;
  transition: border-color 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, border-radius 0.3s ease;
}

.cursor--outer::before,
.cursor--outer::after {
  content: '';
  position: absolute;
  background-color: var(--color-light);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Horizontal line */
.cursor--outer::before {
  width: 14px;
  height: 1px;
}

/* Vertical line */
.cursor--outer::after {
  width: 1px;
  height: 14px;
}

/* State: Plus or Minus Background styling */
.cursor--outer.state-plus,
.cursor--outer.state-minus {
  border-color: transparent;
  background-color: rgba(214, 215, 219, 0.05); /* Light color 5% */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* State: Hovering over a gallery item (shows circle with plus) */
.cursor--outer.state-plus {
  background-image: url('assets/svg/Expand.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}
.cursor--outer.state-plus::before,
.cursor--outer.state-plus::after {
  display: none;
}

/* State: Item is active/fullscreen (shows circle with minus) */
.cursor--outer.state-minus::before {
  opacity: 1;
  transform: none;
}
.cursor--outer.state-minus::after {
  opacity: 0;
  transform: scaleY(0); /* Collapses beautifully into the center */
}

/* State: Magnetic Link Hover */
.cursor--outer.state-magnetic {
  background-image: none !important;
}
.cursor--outer.state-magnetic::before,
.cursor--outer.state-magnetic::after {
  opacity: 0 !important;
}

/* Cat Easter Egg Preview */
.cat-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  pointer-events: none;
  z-index: 200; /* Above the overlay */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.5);
  will-change: transform, opacity;
}
.cat-preview img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: block;
}

/* Projects Easter Egg Preview */
.projects-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 432px;
  height: 270px;
  pointer-events: none;
  z-index: 200; /* Above the overlay */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.5);
  will-change: transform, opacity;
}
.projects-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: block;
}

/* Easter Egg Shimmer Effect */
.projects-hover-trigger .magnetic-text,
.cat-hover-trigger .magnetic-text,
.info-text {
  background: linear-gradient(120deg, #61666C 0%, #61666C 40%, var(--color-light) 50%, #61666C 60%, #61666C 100%);
  background-size: 250% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
}

.cat-hover-trigger .magnetic-text {
  animation-delay: 2s;
}

@keyframes shine {
  0% {
    background-position: 150% center;
  }
  100% {
    background-position: -150% center;
  }
}

/* Mobile Adjustments for Scaling Gaps & Carousel Mode */
@media (max-width: 768px) {
  html, body {
    font-size: 8px; /* Reduced text size for mobile */
  }

  .ui-bottom-right {
    bottom: 20px;
    right: 20px;
  }

  .mobile-pagination {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  
  .mobile-thank-you {
    display: block;
  }

  .mobile-pagination .dots-wrapper {
    position: relative;
    display: flex;
    gap: 4px;
    align-items: center;
  }
  
  .mobile-pagination .dot {
    width: 20px;
    height: 2px;
    background-color: #3D4145;
    border-radius: 2px;
  }

  .mobile-pagination .active-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background-color: var(--color-accent);
    border-radius: 2px;
    pointer-events: none;
    /* Transformation logic handled by GSAP */
  }

  .scroll-wrapper {
    overflow-x: hidden !important; /* Disable native scroll so we can hijack swipe */
  }
  .gallery {
    gap: 2vw; /* Reduced gap slightly for mobile */
  }
  .gallery_image {
    margin: 0; 
  }

  /* Info Overlay Mobile Layout */
  .info-large-text {
    display: none;
  }
  .info-overlay-content {
    flex-direction: column;
    padding: 0 5vw;
    align-items: center; /* Centers the max-width blocks horizontally */
    margin-bottom: 0;
  }
  .info-credits {
    margin-bottom: 5vh;
    max-width: 540px;
    width: 100%;
  }
  .info-credits p {
    margin-bottom: 12px;
  }
  .info-links-list {
    flex-direction: row;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    width: 100%;
    max-width: 540px;
  }
  .info-links-list > div {
    flex: 1;
    text-align: center;
  }
  .info-links-list > div:first-child {
    text-align: left;
  }
  .info-links-list > div:last-child {
    text-align: right;
  }
  .credits-title,
  .info-links-list a {
    font-size: 8px;
  }
}
