/* === PT. Subaga Survei Persada — Performance & Layout Overrides === */

/* ─── 1. GPU Compositing for GSAP-animated sections ─────────────── */
.hero-section,
.carbon-section,
.enterprise-section,
.survey-section,
.insights-section,
.why-section,
#contact,
footer {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.carbon-image,
.carbon-content,
.enterprise-image,
.enterprise-content,
.survey-bg,
.insights-bg,
.why-bg,
.contact-bg {
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  image-rendering: auto;
}

/* ─── 2. Scroll & overflow hygiene ──────────────────────────────── */
html,
body {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* ─── 3. Layout comfort — section text & buttons ────────────────── */

/* Default (desktop >= 1024 px): give microcopy more breathing room */
.survey-section .survey-microcopy,
.why-section .why-microcopy,
.contact-section .contact-microcopy {
  max-width: 68% !important;
  line-height: 1.6 !important;
}

/* Section headlines — tighten line-height */
.survey-section .survey-headline,
.why-section .why-headline,
.contact-section .contact-headline,
.carbon-section .carbon-content h2,
.enterprise-section .enterprise-content h2 {
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}

/* CTA buttons — more generous padding */
.survey-section .survey-cta,
.why-section .why-cta,
.contact-section .contact-cta {
  padding: 0.625rem 1.75rem !important;
  letter-spacing: 0.03em;
}

/* ─── 4. Tablet (<= 1023 px) ─────────────────────────────────────── */
@media (max-width: 1023px) {
  .survey-section .survey-headline,
  .why-section .why-headline,
  .contact-section .contact-headline {
    font-size: 1.875rem !important;
    line-height: 1.15 !important;
  }

  .survey-section .survey-microcopy,
  .why-section .why-microcopy,
  .contact-section .contact-microcopy {
    max-width: 82% !important;
    font-size: 0.9rem !important;
    line-height: 1.65 !important;
  }

  .survey-section .survey-cta,
  .why-section .why-cta,
  .contact-section .contact-cta {
    padding: 0.625rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
}

/* ─── 5. Mobile (<= 640 px) ──────────────────────────────────────── */
@media (max-width: 640px) {
  /* Hero */
  .hero-section .hero-headline {
    font-size: 1.75rem !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em;
  }

  .hero-section .hero-subheadline {
    font-size: 0.9375rem !important;
    line-height: 1.55 !important;
  }

  /* Section headlines */
  .survey-section .survey-headline,
  .why-section .why-headline,
  .contact-section .contact-headline,
  .carbon-section .carbon-content h2,
  .enterprise-section .enterprise-content h2 {
    font-size: 1.625rem !important;
    line-height: 1.18 !important;
  }

  /* Microcopy — nearly full width on mobile */
  .survey-section .survey-microcopy,
  .why-section .why-microcopy,
  .contact-section .contact-microcopy {
    max-width: 92% !important;
    font-size: 0.8375rem !important;
    line-height: 1.65 !important;
  }

  /* Stats */
  .insights-section .insights-stats span {
    font-size: 2.75rem !important;
  }

  /* CTA buttons */
  .survey-section .survey-cta,
  .why-section .why-cta,
  .contact-section .contact-cta {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.8125rem !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ─── 6. Smoother interactive transitions ───────────────────────── */
a,
button {
  transition: color 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background-color 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

a:hover,
button:hover {
  transform: translateY(-1px);
}

/* ─── 7. Tap highlight removal for mobile ───────────────────────── */
* {
  -webkit-tap-highlight-color: transparent;
}

/* ─── 8. Section navigation arrows ─────────────────────────────── */
#snav {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: all;
}

#snav-up,
#snav-dn {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-height: unset !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(11, 15, 23, 0.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.65) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease !important;
  transform: none !important;
}

#snav-up:hover,
#snav-dn:hover {
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(11, 15, 23, 0.85) !important;
  color: #fff !important;
  transform: none !important;
}

#snav-up:disabled,
#snav-dn:disabled {
  opacity: 0.2 !important;
  cursor: not-allowed !important;
}

#snav-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
}

.snav-dot {
  width: 6px !important;
  height: 6px !important;
  min-height: unset !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  background: transparent !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: block !important;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
  transform: none !important;
}

.snav-dot.active {
  background: #fff !important;
  border-color: #fff !important;
  transform: scale(1.4) !important;
}

.snav-dot:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.75) !important;
  transform: scale(1.2) !important;
}

@media (max-width: 768px) {
  #snav {
    right: 0.6rem;
    gap: 0.375rem;
  }

  #snav-up,
  #snav-dn {
    width: 1.875rem !important;
    height: 1.875rem !important;
  }
}
