html, body {
  overflow-x: hidden;
  width: 100%;
  overscroll-behavior-y: contain;
}

#lanyardCard {
  touch-action: none;
}

/* ================= SKYLINE BERLAPIS (SPIDER-GWEN STYLE) ================= */
/* Gradasi warna ada di dalam gedung (gradient fill SVG), bukan di background halaman */
.city-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
}

.city-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

.city-layer--far {
  height: 16vh;
  min-height: 100px;
  max-height: 190px;
  z-index: -9;
  opacity: 0.55;
}

.city-layer--mid {
  height: 20vh;
  min-height: 130px;
  max-height: 230px;
  z-index: -8;
  opacity: 0.75;
}

.city-layer--near {
  height: 26vh;
  min-height: 170px;
  max-height: 290px;
  z-index: -7;
  opacity: 0.95;
}

@media (max-width: 767px) {
  .city-layer--far { height: 11vh; min-height: 70px; }
  .city-layer--mid { height: 14vh; min-height: 90px; }
  .city-layer--near { height: 18vh; min-height: 120px; }
}

/* 1. Daftarkan font lokal */
@font-face {
  font-family: 'ZeldaFont';
  src: url('Zelda.otf') format('truetype'); /* Sesuaikan nama file .ttf kamu */
  font-weight: normal;
  font-style: normal;
}
 
/* 2. Terapkan ke tulisan HAPPY BIRTHDAY */
.hero-title {
  font-family: 'ZeldaFont', sans-serif !important;
  letter-spacing: 0.05em !important;
}

/* ================= TRANSISI TEKS & FADE STEPS ================= */
.step-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.6s;
  pointer-events: none;
}

.step-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ================= DRIFT WALL ================= */
.drift-wall {
  perspective: 1200px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 50%, transparent 100%);
}

.drift-wall__plane {
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) scale(1.1) rotateX(12deg) rotateY(-10deg);
  will-change: transform;
}

.drift-wall__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 8px;
  will-change: transform;
}

.drift-wall__tile {
  width: 130px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a0018;
  border: 1px solid rgba(236, 30, 121, 0.3);
  opacity: 0.6;
  transition: all 0.4s ease;
  cursor: pointer;
}

.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.7) contrast(1.05);
  transition: all 0.4s ease;
}

.drift-wall__tile:hover {
  opacity: 1;
  transform: translateZ(50px);
  box-shadow: 0 20px 40px rgba(236, 30, 121, 0.4);
  border-color: rgba(236, 30, 121, 0.75);
}

.drift-wall__tile:hover img {
  filter: grayscale(0);
}

@media (min-width: 768px) {
  .drift-wall__tile { width: 180px; height: 120px; }
}

@media (min-width: 1024px) {
  .drift-wall__tile { width: 200px; height: 135px; }
}

/* ================= COMIC HALFTONE (SPIDER-GWEN STYLE) ================= */

/* Lapisan tekstur titik halus di seluruh layar, kesan kertas komik cetak */
.halftone-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1.3px);
  background-size: 5px 5px;
  mix-blend-mode: overlay;
  opacity: 0.16;
}

/* Ledakan titik halftone di belakang judul-judul besar, kesan panel komik */
.comic-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160%;
  height: 260%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(236, 30, 121, 0.9) 1.6px, transparent 2px);
  background-size: 9px 9px;
  -webkit-mask-image: radial-gradient(ellipse 50% 45% at 50% 50%, black 0%, black 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 45% at 50% 50%, black 0%, black 25%, transparent 72%);
  opacity: 0.55;
  animation: burstPulse 4s ease-in-out infinite;
}

@keyframes burstPulse {
  0%, 100% { opacity: 0.45; background-size: 9px 9px; }
  50%      { opacity: 0.65; background-size: 10px 10px; }
}

@media (max-width: 767px) {
  .halftone-overlay { background-size: 4px 4px; opacity: 0.13; }
  .comic-burst { width: 220%; height: 220%; background-size: 7px 7px; }
}

/* Font utama untuk judul/hero */
.font-hero {
  font-family: 'Bebas Neue', 'Rajdhani', Impact, sans-serif;
}

body {
  font-family: 'Rajdhani', sans-serif;
}



/* ================= ANIMASI TEKS HAPPY BIRTHDAY ================= */
/* Satu warna (palette desktop) dipakai di semua ukuran layar */
@keyframes heroShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Efek kelap-kelip: kombinasi glow + kedip brightness, tidak linear supaya kerasa "sparkle" */
@keyframes heroTwinkle {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(236, 30, 121, 0.3)) brightness(1); }
  20%      { filter: drop-shadow(0 0 14px rgba(199, 8, 12, 0.55)) brightness(1.15); }
  40%      { filter: drop-shadow(0 0 5px rgba(108, 1, 2, 0.2)) brightness(0.95); }
  60%      { filter: drop-shadow(0 0 16px rgba(236, 30, 121, 0.65)) brightness(1.2); }
  80%      { filter: drop-shadow(0 0 8px rgba(108, 1, 2, 0.3)) brightness(1); }
}

.animated-hero {
  /* PENTING: pakai background-image (longhand), JANGAN pakai shorthand "background: ...".
     Shorthand "background" me-reset background-clip ke border-box dan bikin teks
     jadi kotak solid alih-alih ke-clip jadi bentuk huruf. */
  background-image: linear-gradient(90deg, #ffffff, #ff9fd6, #ec1e79, #b3006b, #ec1e79, #ff9fd6);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  display: inline-block;
  animation: heroShimmer 5s ease-in-out infinite, heroTwinkle 1.8s ease-in-out infinite;
}

/* Kunci ukuran tombol navigasi agar tidak pernah melar di HP */
#prevBtn, #nextBtn {
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  flex: 0 0 auto !important;
}

#stepIndicator {
  flex: 0 0 auto !important;
}

/* =====================================================================
   OVERRIDE MOBILE (<768px)
   Struktur HTML & class md:/lg:/xl: di atas dipakai apa adanya dari versi
   yang kamu suka untuk layar >=768px. Blok di bawah ini memaksa nilai-nilai
   dari versi yang kamu suka untuk layar <768px, menimpa class sm:/base
   bawaan Tailwind di HTML (pakai !important supaya pasti menang).
   ===================================================================== */
@media (max-width: 767px) {
  .home-wrap { gap: 32px !important; padding: 24px !important; max-width: 1152px !important; }

  .lanyard-wrapper { transform: scale(1) !important; }

  #lanyardCard { width: 175px !important; height: 240px !important; }
  .card-notch { width: 32px !important; height: 12px !important; }
  .card-topbar { top: 12px !important; left: 12px !important; right: 12px !important; }
  .card-brand { font-size: 9px !important; }
  .card-dot { width: 8px !important; height: 8px !important; }
  .card-footer { bottom: 5px !important; left: 12px !important; right: 12px !important; padding: 4px 7px !important; }
  .card-name { font-size: 15px !important; }
  .card-status { font-size: 9px !important; margin-top: 1px !important; }

  .wish-container { max-width: 512px !important; gap: 16px !important; }
  .mission-badge { padding: 4px 14px !important; font-size: 12px !important; }
  .hero-break { display: none !important; }
  /* 2. Terapkan ke tulisan HAPPY BIRTHDAY */
.hero-title {
  font-family: 'ZeldaFont', sans-serif !important;
   font-size: clamp(34px, 10vw, 60px) !important;
    line-height: 1.1 !important;
    padding: 3px 0 !important;
    white-space: nowrap !important;
  }
  .hero-desc { font-size: 14px !important; margin-top: 1px !important; }

  .letter-header-title { font-size: 36px !important; }
  .letter-header-sub { font-size: 12px !important; margin-top: 4px !important; }
  .letter-card { max-width: 672px !important; padding: 32px !important; border-radius: 24px !important; }
  .letter-icon { top: -24px !important; left: -12px !important; width: 56px !important; height: 56px !important; border-radius: 16px !important; font-size: 24px !important; }
  .letter-text { font-size: 14px !important; padding-top: 8px !important; }
  .letter-text > p { margin-top: 16px !important; }
  .letter-text > p:first-child { margin-top: 0 !important; }

  .gallery-header-wrap { top: 40px !important; }
  .gallery-header-sub { font-size: 12px !important; margin-top: 4px !important; }
}


/* ================= SPIDER HANGING YOYO (FULL) ================= */

.spider-hanging {
  position: absolute;
  top: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

/* Posisi Horizontal Lebih ke Tengah */
.spider-left {
  left: 18%;
  animation: spiderSway 3s ease-in-out infinite alternate;
}

.spider-right {
  right: 18%;
  animation: spiderSway 3.5s ease-in-out infinite alternate 1.2s;
}

/* Tali Laba-Laba Panjang */
.spider-thread {
  width: 2px;
  height: 280px;
  background: #ffffff;
  margin-bottom: -7px;
  transform-origin: top center;
}

/* Keterkaitan Animasi Tali & Laba-Laba */
.spider-left .spider-thread {
  animation: threadYoyo 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.spider-right .spider-thread {
  animation: threadYoyo 5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate 1.2s;
}

.spider-left .spider-svg {
  animation: spiderClimbYoyo 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
  filter: none !important;
}

.spider-right .spider-svg {
  animation: spiderClimbYoyo 5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate 1.2s;
  filter: none !important;
}

/* Keyframe Perpanjangan Tali (Molor-Menciut) */
@keyframes threadYoyo {
  0% { transform: scaleY(0.1); }
  60% { transform: scaleY(1.15); }
  70% { transform: scaleY(0.95); }
  75% { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}

/* Keyframe Gerakan Laba-Laba Menyusuri Tali */
@keyframes spiderClimbYoyo {
  0% { transform: translateY(-250px); }
  60% { transform: translateY(40px); }
  70% { transform: translateY(-15px); }
  75% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

/* Animasi Ayunan Tipis */
@keyframes spiderSway {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(4deg); }
}

/* --- ANIMASI GERAKAN KAKI MEMANJAT --- */
@keyframes legMoveAlt {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(0.98); }
}

@keyframes legMoveOpposite {
  0%, 100% { transform: translateY(-3px) scale(0.98); }
  50% { transform: translateY(0) scale(1); }
}

.spider-legs-1 {
  animation: legMoveAlt 0.25s infinite linear;
}

.spider-legs-2 {
  animation: legMoveOpposite 0.25s infinite linear;
}

/* Responsive Tampilan Layar HP */
@media (max-width: 767px) {
  .spider-left { left: 8%; }
  .spider-right { right: 8%; }
  .spider-thread { height: 60x; }
}