/* Fondasi halaman dan perilaku scroll */
:root {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  --site-header-height: 5.5625rem;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Desktop hero mengisi ruang layar yang tersisa setelah navbar sticky. */
@media (min-width: 1024px) {
  #beranda .hero-content {
    min-height: calc(100vh - var(--site-header-height));
    min-height: calc(100svh - var(--site-header-height));
  }
}

/* Short laptop viewports use tighter spacing so the hero still fits cleanly. */
@media (min-width: 1024px) and (max-height: 850px) {
  #beranda .hero-content {
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(1.5rem, 6vh, 3rem);
  }

  #beranda .hero-copy {
    max-width: 48rem;
  }

  #beranda .hero-title {
    font-size: clamp(2.5rem, 3.8vw, 3.25rem);
    line-height: 1.08;
  }

  #beranda .hero-copy > div:first-child {
    margin-bottom: 1rem;
  }

  #beranda .hero-title + p {
    margin-top: 1rem;
  }

  #beranda .hero-actions {
    margin-top: 1.5rem;
  }

  #beranda .hero-benefits {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
}

/* Wadah logo menjaga logo asli tetap proporsional di navbar dan footer */
.brand-logo {
  display: block;
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 auto;
  border: 2px solid rgba(72, 202, 228, 0.8);
  border-radius: 9999px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.14);
}

/* Pola latar hero mengikuti warna biru dan cyan identitas Kanca */
.hero-grid {
  background-image: linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to right, black, transparent 88%);
}

/* Lapisan parallax bergerak lewat transform agar animasi ringan di GPU. */
.parallax-layer {
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0);
  will-change: transform;
}

/* Orbit bercahaya membuat ilustrasi konektivitas terasa lebih hidup. */
.hero-orbit {
  pointer-events: none;
  opacity: 0.9;
  margin-top: -18rem;
}

.orbit-ring {
  position: absolute;
  inset: 3.5rem;
  border: 1px solid rgba(72, 202, 228, 0.22);
  border-radius: 9999px;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  inset: 1.5rem;
  border: 1px dashed rgba(72, 202, 228, 0.2);
  border-radius: inherit;
  content: "";
}

.orbit-ring::after {
  inset: 4.5rem;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
}

.orbit-ring-outer {
  animation: orbit-spin 32s linear infinite;
}

.orbit-ring-inner {
  inset: 7rem;
  border-color: rgba(0, 180, 216, 0.2);
  animation: orbit-spin 24s linear infinite reverse;
}

.orbit-ring-inner::before {
  inset: 2rem;
}

.orbit-ring-inner::after {
  inset: 4.5rem;
}

.orbit-node {
  position: absolute;
  z-index: 1;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  box-shadow: 0 0 20px currentColor, 0 0 42px currentColor;
  animation: node-pulse 2.8s ease-in-out infinite;
}

.orbit-node-cyan {
  top: 4.2rem;
  left: 10rem;
  color: #00B4D8;
  background: #00B4D8;
}

.orbit-node-gold {
  right: 4.3rem;
  bottom: 10rem;
  width: 0.7rem;
  height: 0.7rem;
  color: #FFB703;
  background: #FFB703;
  animation-delay: 0.8s;
}

.orbit-node-sky {
  bottom: 5.2rem;
  left: 8rem;
  width: 0.6rem;
  height: 0.6rem;
  color: #48CAE4;
  background: #48CAE4;
  animation-delay: 1.4s;
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes node-pulse {
  50% {
    box-shadow: 0 0 10px currentColor, 0 0 24px currentColor;
    scale: 0.8;
  }
}

/* Cahaya dan pantulan pada kartu hero menonjolkan efek kedalaman. */
.hero-glow {
  animation: glow-breathe 4s ease-in-out infinite alternate;
}

@keyframes glow-breathe {
  from {
    opacity: 0.35;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.hero-visual {
  perspective: 1100px;
}

.hero-glass-card {
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 220ms ease-out, box-shadow 220ms ease-out, border-color 220ms ease-out;
}

.hero-visual:hover .hero-glass-card {
  border-color: rgba(72, 202, 228, 0.55);
  box-shadow: 0 30px 90px rgba(0, 20, 70, 0.42);
}

.hero-card-sheen {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.13) 48%, transparent 76%);
  background-size: 220% 100%;
  animation: card-sheen 8s ease-in-out infinite;
}

.hero-glass-card > :not(.hero-card-sheen) {
  position: relative;
  z-index: 1;
}

@keyframes card-sheen {
  0%,
  30% {
    background-position: 140% 0;
  }

  70%,
  100% {
    background-position: -40% 0;
  }
}

.hero-float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  min-width: 13.5rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 0.9rem;
  background: rgba(3, 43, 102, 0.88);
  box-shadow: 0 16px 38px rgba(0, 20, 70, 0.3);
  backdrop-filter: blur(14px);
  animation: chip-float 4s ease-in-out infinite;
}

.hero-float-chip-top {
  top: -2rem;
  right: -2.25rem;
}

.hero-float-chip-bottom {
  bottom: -3rem;
  left: -2.25rem;
  animation-delay: 1.1s;
}

.hero-chip-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.65rem;
  font-weight: 800;
}

.hero-float-chip strong,
.hero-float-chip small {
  display: block;
  white-space: nowrap;
}

.hero-float-chip strong {
  font-size: 0.72rem;
  line-height: 1.2;
}

.hero-float-chip small {
  margin-top: 0.2rem;
  color: rgba(219, 234, 254, 0.76);
  font-size: 0.62rem;
}

@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

/* Animasi masuk hanya diaktifkan setelah JavaScript berhasil dimuat. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 650ms ease, transform 650ms ease;
}

html.has-js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

html.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Aksen interaksi kartu layanan */
.service-card:hover .service-icon {
  transform: translateY(-3px) rotate(-4deg);
}

/* Kartu layanan masuk berurutan agar transisi antar-kolom terasa lebih halus. */
.service-card:nth-child(2).is-visible {
  transition-delay: 80ms;
}

.service-card:nth-child(3).is-visible {
  transition-delay: 160ms;
}

.service-card:nth-child(4).is-visible {
  transition-delay: 240ms;
}

/* Hormati pengaturan aksesibilitas untuk mengurangi gerakan */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html.has-js .reveal,
  html.has-js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .parallax-layer {
    transform: none;
    will-change: auto;
  }

  .hero-glow {
    animation: none;
  }

  .orbit-ring,
  .orbit-node,
  .hero-card-sheen,
  .hero-float-chip {
    animation: none;
  }

  .hero-glass-card {
    transform: none;
    transition: none;
  }
}

@media (max-width: 1199px) {
  .hero-float-chip {
    display: none;
  }
}

/* Pada HP dan tablet, matikan gerak scroll agar urutan konten tidak bergeser. */
@media (max-width: 1023px) {
  .parallax-layer {
    transform: none !important;
    will-change: auto;
  }
}

@media (pointer: coarse) {
  .hero-glass-card {
    transform: none;
  }
}
