/* Performance + accessibility overrides (do not edit main.css for these) */

/* Skip link */
.skip-to-content {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100000;
  padding: 10px 16px;
  background: #111;
  color: #fff !important;
  border-radius: 6px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
  text-decoration: none !important;
  font-weight: 600;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Restore keyboard focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--tp-theme-primary, #0c5752) !important;
  outline-offset: 2px !important;
}

/* Hide custom cursor on touch / reduced motion */
@media (hover: none), (pointer: coarse) {
  #magic-cursor,
  #ball {
    display: none !important;
  }
  body.tp-magic-cursor {
    cursor: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #magic-cursor,
  #ball,
  #preloader,
  #scroll-indicator {
    display: none !important;
  }
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Improve common low-contrast muted text (do not override platform subtitle colors) */
.it-hero-subtitle,
.tp-section-subtitle {
  opacity: 1;
  color: inherit;
}

/* Ensure main landmark is clear */
main#main-content:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Keep hero heading styles after h4 -> h1 change */
h1.it-hero-title {
  margin: 0;
}

/* Mobile native scroll: keep layout + sticky header working without ScrollSmoother */
html.native-mobile-scroll,
body.native-mobile-scroll {
  height: auto !important;
  overflow-x: hidden;
  overflow-y: auto !important;
}
body.native-mobile-scroll #smooth-wrapper,
body.native-mobile-scroll #smooth-content {
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  transform: none !important;
  will-change: auto !important;
}
body.native-mobile-scroll #header-sticky.header-sticky {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999 !important;
  width: 100%;
}

/*
  Small / mid laptops (< 1400px): hide cramped desktop links, use hamburger.
  Wide desktop (1400px+): original full menu spacing.
*/
@media (max-width: 1399.98px) {
  .tp-header-10-area .tp-header-10-menu {
    display: none !important;
  }
  .tp-header-10-area .tp-header-10-box {
    justify-content: flex-end !important;
  }
}
@media (min-width: 1400px) {
  .tp-header-10-area .tp-header-10-menu {
    display: block !important;
  }
  .tp-header-10-menu > nav > ul > li {
    margin: 0 16px;
  }
}

/* When not sticky (top of page), keep transparent header look */
#header-sticky:not(.header-sticky) {
  background: transparent !important;
  box-shadow: none !important;
}
#header-sticky:not(.header-sticky).tp-header-blur::after {
  display: none;
}

/* Homepage portfolio cards: match original theme 570×400 */
.it-project-thumb {
  aspect-ratio: 570 / 400;
  overflow: hidden;
  border-radius: 16px;
}
.it-project-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}
.it-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 16px;
}

/* Team cards: equal size without stretching (crop with cover) */
.team-area .dgm-team-thumb img {
  width: 100%;
  height: 414px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
@media (max-width: 1199px) {
  .team-area .dgm-team-thumb img {
    height: 360px;
  }
}
@media (max-width: 767px) {
  .team-area .dgm-team-thumb img {
    height: 400px;
  }
}
.team-area .dgm-team-thumb .tp--hover-img {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.team-area .dgm-team-thumb .tp--hover-img canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
