/* ==========================================================================
   Landing page SI-TPDOC (/)
   Tata letak, tipografi, dan komponen kartu memakai utilitas Tailwind/daisyUI
   di templates/pages/landing.html. Berkas ini hanya menyimpan yang tidak bisa
   (atau tidak efektif) diekspresikan sebagai utilitas:
     - splash overlay + keyframe animasinya (dikendalikan anime.js),
     - latar berlapis .lp-page, .lp-blob, dan .lp-arc,
     - efek pseudo-element (.lp-cta::after, .lp-card::after),
     - animasi float kartu dan penumpukan kartu di desktop,
     - aturan prefers-reduced-motion.
   ========================================================================== */

:root {
  --lp-brand: #f68f1e;
  --lp-card-radius: 20px;
  /* Durasi siklus float kartu, kilau kartu, dan jeda shine CTA. */
  --lp-float-duration: 6s;
  --lp-card-shine-cycle: 8s;
  --lp-shine-cycle: 9s;
}

/* ---------- Splash overlay ----------
   Latar gelap hangat dengan aurora yang bergerak lambat, busur orbit, dan
   bingkai logo kaca. Timeline masuk/keluar dijalankan anime.js
   (static/js/app/splash.js); semua elemen mulai tersembunyi supaya tidak
   berkedip sebelum JS jalan. */

.lp-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 2rem;
  overflow: hidden;
  isolation: isolate;
  perspective: 1100px;
  background: radial-gradient(120% 85% at 50% -8%, #3a2413 0%, #1c1109 52%, #0a0603 100%);
  opacity: 1;
  transition:
    opacity 620ms ease-in,
    transform 620ms cubic-bezier(0.76, 0, 0.24, 1);
  will-change: opacity;
}

/* Splash memudar sambil menjauh sedikit; opacity + transform hanya butuh
   compositing, berbeda dengan clip-path yang memaksa repaint tiap frame. */
.lp-splash.is-leaving {
  opacity: 0;
  transform: scale(1.04);
}

.lp-splash__aurora {
  position: absolute;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(34% 30% at 32% 34%, rgba(246, 143, 30, 0.55) 0%, rgba(246, 143, 30, 0) 68%),
    radial-gradient(30% 28% at 70% 58%, rgba(255, 168, 78, 0.42) 0%, rgba(255, 168, 78, 0) 66%),
    radial-gradient(26% 24% at 50% 84%, rgba(184, 81, 13, 0.5) 0%, rgba(184, 81, 13, 0) 70%);
}

.lp-splash__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.lp-splash__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 24rem;
  height: 24rem;
  margin: -12rem 0 0 -12rem;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(246, 143, 30, 0.55) 0%, rgba(246, 143, 30, 0) 64%);
  opacity: 0;
  will-change: opacity, transform;
}

.lp-splash__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 21rem;
  height: 21rem;
  margin: -10.5rem 0 0 -10.5rem;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 196, 128, 0.75) 38deg,
    rgba(255, 255, 255, 0) 116deg,
    rgba(255, 255, 255, 0) 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
}

.lp-splash__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 15rem;
  height: 15rem;
  margin: -7.5rem 0 0 -7.5rem;
  border: 1px solid rgba(255, 214, 168, 0.4);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
}

.lp-splash__ring--late {
  width: 21rem;
  height: 21rem;
  margin: -10.5rem 0 0 -10.5rem;
  border-color: rgba(255, 255, 255, 0.22);
}

.lp-splash__brand {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 20px;
  padding: 1rem 1.55rem;
  background: linear-gradient(158deg, #ffffff 0%, #fffaf3 58%, #ffeed8 100%);
  box-shadow:
    0 34px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  opacity: 0;
  will-change: opacity, transform;
}

.lp-splash__logo {
  display: block;
  width: min(14.5rem, 60vw);
  height: auto;
}

/* Sapuan cahaya melintasi bingkai; posisinya digeser anime.js. */
.lp-splash__sheen {
  position: absolute;
  top: -45%;
  left: -60%;
  width: 36%;
  height: 190%;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(246, 143, 30, 0.32) 45%,
    rgba(255, 255, 255, 0.9) 58%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: multiply;
  transform: skewX(-16deg);
}

.lp-splash__tagline {
  position: relative;
  z-index: 2;
  color: #ffe9d2;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
}

/* Tagline disembunyikan sampai JS memecahnya menjadi per kata. */
.lp-splash__word {
  opacity: 0;
}

/* Tiap kata punya kotak pemotong; kata di dalamnya naik dari bawah. */
.lp-splash__wordpart {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  vertical-align: bottom;
}

.lp-splash__wordinner {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}

.lp-splash__track {
  position: relative;
  z-index: 2;
  width: min(11rem, 52vw);
  height: 3px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lp-splash__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb457 0%, #fff7ec 100%);
  box-shadow: 0 0 12px rgba(255, 180, 87, 0.9);
}

.lp-splash__progress {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.lp-splash__percent {
  min-width: 2.75rem;
  color: #ffe9d2;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-align: left;
}

/* Sapuan cahaya diagonal melintasi layar sebelum splash memudar. */
.lp-splash__sweep {
  position: absolute;
  inset: -20% -60%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-70%) skewX(-14deg);
  will-change: transform, opacity;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 214, 168, 0.14) 47%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(255, 214, 168, 0.14) 57%,
    rgba(255, 255, 255, 0) 66%
  );
}

/* ---------- Kerangka halaman ---------- */

/* Hero memakai latar berpola; footer sengaja di luar blok ini agar putih.
   Urutan lapisan: dot grid, grid garis, lalu gradien. background-size sejajar.
   Flex kolom setinggi viewport dipasang di <body> lewat utilitas Tailwind. */
.lp-page {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  background-image:
    radial-gradient(rgba(26, 22, 19, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(26, 22, 19, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 22, 19, 0.032) 1px, transparent 1px),
    radial-gradient(
      58% 52% at 24% 46%,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(255, 255, 255, 0) 72%
    ),
    radial-gradient(
      118% 88% at 88% -8%,
      rgba(246, 143, 30, 0.3) 0%,
      rgba(246, 143, 30, 0.09) 40%,
      rgba(246, 143, 30, 0) 70%
    ),
    radial-gradient(
      88% 72% at -6% 104%,
      rgba(253, 224, 186, 0.85) 0%,
      rgba(253, 224, 186, 0) 64%
    ),
    linear-gradient(155deg, #fffdfa 0%, #fff7ec 46%, #fbeadb 100%);
  background-size:
    24px 24px,
    96px 96px,
    96px 96px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  background-repeat: repeat, repeat, repeat, no-repeat, no-repeat, no-repeat,
    no-repeat;
}

/* Bentuk abstrak lembut di latar */
.lp-blob {
  position: absolute;
  z-index: -1;
  border-radius: 9999px;
  filter: blur(90px);
  pointer-events: none;
}

.lp-blob--a {
  top: -8rem;
  right: -6rem;
  width: 34rem;
  height: 34rem;
  background: rgba(246, 143, 30, 0.28);
}

.lp-blob--b {
  bottom: -10rem;
  left: -8rem;
  width: 30rem;
  height: 30rem;
  background: rgba(253, 228, 185, 0.75);
}

.lp-arc {
  position: absolute;
  z-index: -1;
  top: -18rem;
  right: -22rem;
  width: 48rem;
  height: 48rem;
  border-radius: 9999px;
  border: 1px solid rgba(246, 143, 30, 0.22);
  box-shadow:
    0 0 0 60px rgba(246, 143, 30, 0.05),
    0 0 0 140px rgba(246, 143, 30, 0.035);
  pointer-events: none;
}

/* ---------- CTA pill ---------- */

.lp-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  isolation: isolate;
  margin-top: 1.9rem;
  border-radius: 9999px;
  background: #1a1613;
  padding: 1rem 1.9rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 18px 38px -18px rgba(26, 22, 19, 0.65),
    0 0 0 0 rgba(246, 143, 30, 0);
  transition:
    box-shadow 260ms ease,
    background-color 260ms ease;
}

.lp-cta .icon-\[lucide--arrow-right\] {
  font-size: 1.15rem;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sapuan kilau periodik yang tenang: melintas ~2.4s lalu istirahat. */
.lp-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  z-index: -1;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.42) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: lp-cta-sweep var(--lp-shine-cycle) ease-in-out 1.2s infinite;
}

.lp-cta:hover,
.lp-cta:focus-visible {
  background: #241d18;
  box-shadow:
    0 26px 48px -18px rgba(26, 22, 19, 0.7),
    0 0 0 6px rgba(246, 143, 30, 0.22),
    0 0 34px 2px rgba(246, 143, 30, 0.35);
}

.lp-cta:hover .icon-\[lucide--arrow-right\],
.lp-cta:focus-visible .icon-\[lucide--arrow-right\] {
  transform: translateX(4px);
}

.lp-cta:focus-visible {
  outline: 3px solid rgba(246, 143, 30, 0.65);
  outline-offset: 4px;
}

@keyframes lp-cta-sweep {
  0% {
    left: -60%;
  }
  26.7% {
    left: 120%;
  }
  100% {
    left: 120%;
  }
}

/* ---------- Kartu kanan: deck bertumpuk ---------- */

.lp-cards {
  position: relative;
}

.lp-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--lp-card-radius);
  border: 1px solid rgba(26, 22, 19, 0.06);
  background: rgba(255, 255, 255, 0.94);
  padding: 1.6rem 1.5rem 1.35rem;
  box-shadow:
    0 22px 44px -30px rgba(26, 22, 19, 0.5),
    0 2px 6px -2px rgba(26, 22, 19, 0.06);
  backdrop-filter: blur(8px);
  will-change: translate, scale, box-shadow;
  transition:
    scale 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Kilau diagonal lembut, bergerak kiri → kanan tiap siklus. */
.lp-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -80%;
  width: 55%;
  height: 180%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 38%,
    rgba(246, 143, 30, 0.16) 55%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  animation: lp-card-sheen var(--lp-card-shine-cycle) ease-in-out infinite;
}

.lp-float--a::after {
  animation-delay: 0s;
}

.lp-float--b::after {
  animation-delay: 2.6s;
}

@keyframes lp-card-sheen {
  0% {
    left: -80%;
  }
  40% {
    left: 130%;
  }
  100% {
    left: 130%;
  }
}

/* Mengambang pelan; memakai `translate` agar tidak bentrok dengan `scale` saat hover. */
.lp-float {
  animation: lp-float var(--lp-float-duration) ease-in-out infinite;
  will-change: translate, scale;
}

.lp-float--a {
  animation-delay: 0s;
}

.lp-float--b {
  animation-delay: -3s;
}

@keyframes lp-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -10px;
  }
}

/* Desktop: kartu ditumpuk bersilang (kiri-atas + kanan-bawah). */
@media (min-width: 1024px) {
  .lp-cards {
    min-height: 36rem;
  }

  .lp-card {
    position: absolute;
    width: 53%;
  }

  .lp-float--a {
    top: 0;
    left: 0;
    z-index: 1;
    padding-right: 3rem;
  }

  .lp-float--b {
    right: 0;
    bottom: 0;
    z-index: 2;
  }

  /* Hover/fokus: kartu yang tersentuh naik ke depan dengan bayangan tegas. */
  .lp-card:hover,
  .lp-card:focus-within {
    z-index: 5;
    scale: 1.02;
    box-shadow:
      0 34px 62px -26px rgba(26, 22, 19, 0.55),
      0 6px 16px -6px rgba(26, 22, 19, 0.14);
  }
}

/* Mobile/tablet: kartu kembali ke alur normal agar tetap terbaca. */
@media (max-width: 1023.98px) {
  .lp-cards {
    display: grid;
    gap: 1.25rem;
  }

  .lp-card {
    width: 100%;
  }

  .lp-cta {
    display: flex;
    width: fit-content;
    margin-inline: auto;
  }
}

/* ---------- Aksesibilitas ---------- */

@media (prefers-reduced-motion: reduce) {
  .lp-splash {
    display: none;
  }

  .lp-float,
  .lp-card::after,
  .lp-cta::after {
    animation: none !important;
  }

  .lp-card::after,
  .lp-cta::after {
    opacity: 0;
  }

  .lp-card,
  .lp-cta,
  .lp-cta .icon-\[lucide--arrow-right\] {
    transition: none;
  }

  .lp-card:hover,
  .lp-card:focus-within,
  .lp-cta:hover,
  .lp-cta:focus-visible {
    transform: none;
    scale: none;
  }
}
