/* ===== FIXES ===== */

/* 1. Remove Webflow badge (external injection — needs !important) */
.w-webflow-badge { display: none !important; }

/* 2. Hide native scrollbar + clip horizontal overflow */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

/* Clip horizontal overflow on all pages without creating a scroll container
   (clip does not break position:sticky or Lenis, unlike overflow-x:hidden) */
body {
  overflow-x: clip;
}

/* Custom minimal scrollbar */
#custom-scrollbar {
  position: fixed;
  top: 0;
  right: 6px;
  width: 2px;
  height: 100vh;
  z-index: 99999;
  pointer-events: none;
}
#custom-scrollbar-track {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
#custom-scrollbar-thumb {
  width: 100%;
  background: rgba(255,255,255,0.55);
  border-radius: 2px;
  transition: opacity 0.3s ease;
  position: absolute;
  top: 0;
}
.page-wrapper.nf ~ #custom-scrollbar #custom-scrollbar-thumb {
  background: rgba(255,255,255,0.55);
}

/* Scrollbar: dark thumb when scrolled over the light footer */
#custom-scrollbar-thumb.is-dark {
  background: rgba(0, 0, 0, 0.35);
}

/* 3. Fix hero text visibility on About and Works pages
   (Webflow IX2 sets opacity:0 as inline style — must use !important to override) */
.hero [data-w-id],
.hero p[style*="opacity:0"],
.hero h1[style*="opacity:0"],
.hero h2[style*="opacity:0"] {
  opacity: 1 !important;
  transform: none !important;
}

/* 4. Scroll arrow bounce indicator */
.scroll-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: scroll-hint-fade 3s ease 1.5s forwards;
  pointer-events: none;
}
.scroll-hint svg { animation: scroll-bounce 1.2s ease-in-out infinite; opacity: 0.7; }
@keyframes scroll-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }
@keyframes scroll-hint-fade { 0%,80%{opacity:1} 100%{opacity:0} }

/* 5. Project inner images — natural height, not fixed 110vh */
.work-inner-image {
  height: auto;
  overflow: visible;
}
.work-inner-image img {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
}

/* 6. Project pages — portrait gallery images: 90vh → 60vh, desktop only.
   More specific selector (.collection-list-wrapper .image-wrapper) beats
   Webflow's single-class rule without needing !important. */
@media screen and (min-width: 768px) {
  .collection-list-wrapper .image-wrapper {
    height: 60vh;
  }
}

/* 7. Footer: LUIZ RODRIGUES name overflows above the section.
   Webflow already sets overflow:visible on section-footer, so only position
   and absolute child placement need to be added. */
.footer-logo-section {
  position: relative;
  overflow: visible;
}

.footer-logo-section .div-block {
  position: absolute;
  top: -13vw;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  pointer-events: none;
}

.footer-logo-section .div-block > div,
.footer-logo-section .div-block > canvas {
  width: 100%;
  pointer-events: auto;
}

/* 8. Footer nav — 30px padding matching header, nav anchored to bottom */
.section-footer.full {
  justify-content: flex-end;
}

.footer-logo-section {
  flex: 1;
  justify-content: center;
  align-items: center;
}

.footer-cta {
  text-align: center;
}

.footer-nav {
  padding: 0 18px 30px 30px;
  width: 100%;
  box-sizing: border-box;
}

/* 9. All images — rounded corners matching site's 18px default.
   Spinner cards, hover transforms, and nav logos excluded via :not(). */
img:not(.nav-logo-wrapper img):not(.brand img):not(.footer-logo-small img):not(.spinner-card-3 img):not(.spinner-card img):not(.hover-t-01):not(.hover-t-02):not(.hover-t-03):not(#custom-scrollbar *) {
  border-radius: 18px;
}

/* 10. Spinner position — place at 40% from top of sticky-hero on desktop.
   Absolute positioning removes the 80vh height and -25vh margin-top from Webflow
   so the spinner is visible in the hero intro without layout shift on mobile. */
@media screen and (min-width: 992px) {
  .device-hero-wrapper.center {
    position: absolute;
    top: 40%;
    margin: 0;
    padding: 0;
  }
}

/* Spinner square — remove Webflow's max-height:1800px cap.
   Two-class selector beats Webflow's single-class. */
.spinner-wrapper .spinner-container-2 {
  max-height: none;
  max-width: none;
}

/* Spinner centering on mobile — Webflow's margin:auto + inset:0% can drift.
   Explicit left:50% + margin-left:-100vw pins the center to the viewport center.
   right:auto removes the conflicting right:0 from inset so width is unambiguous. */
@media screen and (max-width: 991px) {
  .spinner-wrapper .spinner-container-2 {
    left: 50%;
    right: auto;
    margin-left: -100vw;
    margin-right: 0;
  }
}

/* 11. Fix horizontal scroll on home page.
   .track-spinner is a child of .page-wrapper.nf (overflow:visible) and contains
   .spinner-container-l/r at 180vw width. overflow-x:clip trims the horizontal
   bleed without creating a scroll container, so position:sticky inside still works. */
.track-spinner {
  overflow-x: clip;
}
