/* ==========================================================================
   The AyaraHill — Orchestrated Timing System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & Base — Read-Only Presentation
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-user-select: none;
  user-select: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* --------------------------------------------------------------------------
   2. Typography — Material Symbols
   -------------------------------------------------------------------------- */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* --------------------------------------------------------------------------
   3. Layout Helpers
   -------------------------------------------------------------------------- */
.hero-gradient {
  background: linear-gradient(to bottom,
      rgba(13, 40, 24, 0.7),
      rgba(27, 67, 50, 0.5),
      rgba(13, 40, 24, 0.8));
}

.glass-panel {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   4. Animations — Core Keyframes
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes backdropFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   5. Hero CTA 3D Button
   -------------------------------------------------------------------------- */
.hero-cta-spotlight {
  perspective: 800px;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition:
    transform 400ms ease,
    box-shadow 400ms ease,
    background-color 400ms ease;
}

.hero-cta-spotlight:hover {
  box-shadow: 0 8px 30px -4px rgba(192, 104, 32, 0.4);
}

/* --------------------------------------------------------------------------
   6. 3D Tilt Card System
   -------------------------------------------------------------------------- */
.tilt-card {
  perspective: 800px;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition:
    transform 400ms ease,
    box-shadow 400ms ease,
    border-color 400ms ease,
    background-color 400ms ease,
    color 400ms ease;
}

.tilt-card:hover {
  box-shadow:
    0 20px 40px -10px rgba(27, 67, 50, 0.15),
    0 8px 16px -8px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   7. Scroll Sweep-in — Entry Animation
   -------------------------------------------------------------------------- */
.scroll-intro-card {
  opacity: 0;
  transform: rotateX(6deg) translateY(24px) scale(0.98);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-intro-card.in-view {
  opacity: 1;
  transform: rotateX(0) translateY(0) scale(1);
}

.scroll-intro-card.in-view.ready {
  transition:
    transform 400ms ease,
    box-shadow 400ms ease,
    border-color 400ms ease,
    background-color 400ms ease,
    color 400ms ease;
}

/* --------------------------------------------------------------------------
   8. Aspect Ratio Anti-flicker
   -------------------------------------------------------------------------- */
.unit-img-container {
  transform: translateZ(0);
  -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

/* --------------------------------------------------------------------------
   9. WhatsApp Expanding Pill
   -------------------------------------------------------------------------- */
.wa-expand-pill {
  width: 2.75rem;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  transition:
    width 400ms ease,
    padding 400ms ease,
    box-shadow 400ms ease,
    background-color 400ms ease;
  overflow: hidden;
}

.wa-expand-pill:hover {
  width: 11rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-shadow:
    0 12px 28px -4px rgba(37, 211, 102, 0.5),
    0 0 0 12px rgba(37, 211, 102, 0);
}

.wa-pill-text {
  opacity: 0;
  max-width: 0;
  margin-left: 0;
  transition:
    opacity 400ms ease 100ms,
    max-width 400ms ease 100ms,
    margin-left 400ms ease 100ms;
}

.wa-expand-pill:hover .wa-pill-text {
  opacity: 1;
  max-width: 6rem;
  margin-left: 0.5rem;
}

.hypnotic-pulse {
  animation: hypnoticHeartbeat 3s ease-in-out infinite;
}

@keyframes hypnoticHeartbeat {

  0%,
  100% {
    box-shadow:
      0 8px 20px -4px rgba(37, 211, 102, 0.4),
      0 0 0 0 rgba(37, 211, 102, 0.3);
  }

  50% {
    box-shadow:
      0 12px 28px -4px rgba(37, 211, 102, 0.5),
      0 0 0 12px rgba(37, 211, 102, 0);
  }
}

/* --------------------------------------------------------------------------
   10. Modal — Syarat & Ketentuan
   -------------------------------------------------------------------------- */
.modal-snk {
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
  width: auto;
  overflow: visible;
}

.modal-snk::backdrop {
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.6);
  animation: backdropFadeIn 200ms ease-out;
}

.modal-snk[open] {
  animation: modalFadeIn 200ms ease-out;
}

.modal-snk.closing {
  animation: modalFadeOut 200ms ease-out;
}

.modal-snk.closing::backdrop {
  animation: backdropFadeOut 200ms ease-out;
}

.modal-snk-content {
  margin: auto;
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.4),
    0 8px 16px -8px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   11. Denah Floor Plan Crossfade
   -------------------------------------------------------------------------- */
.unit-house-img {
  transition: opacity 400ms ease, transform 400ms ease;
}

.unit-house-img.denah-hidden {
  opacity: 0;
}

.unit-denah-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.unit-denah-img.denah-visible {
  opacity: 1;
}

.denah-peek {
  position: absolute;
  bottom: 5%;
  right: 3%;
  width: 55%;
  background: white;
  border-radius: 10px;
  padding: 4px;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
  transform: translateY(20px) translateX(8px) rotate(-3deg) scale(0.8);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
  box-shadow:
    0 6px 20px rgba(27, 67, 50, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.group:hover .denah-peek {
  opacity: 1;
  transform: translateY(0) translateX(0) rotate(0) scale(1);
}

.group.denah-active .denah-peek {
  opacity: 0 !important;
  transform: translateY(20px) translateX(8px) rotate(-3deg) scale(0.8) !important;
}

.denah-label {
  display: block;
  text-align: center;
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1B4332;
  padding: 2px 0 0 0;
}

/* --------------------------------------------------------------------------
   12. Navigation Brand + Links
   -------------------------------------------------------------------------- */
#nav-brand {
  transition: color 400ms ease;
}

.nav-link {
  position: relative;
  color: inherit;
  transition: color 400ms ease;
}

#main-nav.at-top .nav-link {
  color: rgba(255, 255, 255, 0.5);
}

#main-nav.at-top .nav-link:hover {
  color: #fff;
}

#main-nav.scrolled .nav-link {
  color: #94a3b8;
}

#main-nav.scrolled .nav-link:hover {
  color: #1B4332;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 400ms ease, left 400ms ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

#main-nav.scrolled .nav-link.active {
  color: #1B4332;
}

#main-nav.scrolled .nav-link.active::after {
  width: 100%;
  left: 0;
  background: #c06820;
}

/* --------------------------------------------------------------------------
   13. Preloader Overlay
   -------------------------------------------------------------------------- */
#preloader {
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo {
  opacity: 0;
  transition: opacity 300ms ease-out 200ms;
}

.preloader-logo.loaded {
  opacity: 0.6;
}

.reveal-item {
  opacity: 0;
  transition: opacity 300ms ease-out 300ms;
}

.reveal-item.revealed {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   14. Autumn Leaf Particle Animation
   -------------------------------------------------------------------------- */
.leaf-particle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation:
    leafFall var(--fall-dur, 16s) linear infinite,
    leafSway var(--sway-dur, 6s) ease-in-out infinite alternate,
    leafFade var(--fall-dur, 16s) linear infinite;
}

@keyframes leafFall {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(calc(100vh + 40px)) rotate(540deg);
  }
}

@keyframes leafSway {
  0% {
    margin-left: calc(var(--sway-amp, 25px) * -1);
  }

  100% {
    margin-left: var(--sway-amp, 25px);
  }
}

@keyframes leafFade {
  0% {
    opacity: 0;
  }

  5% {
    opacity: 0.5;
  }

  80% {
    opacity: 0.5;
  }

  100% {
    opacity: 0;
  }
}