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

#lanyardCard {
  touch-action: none;
}

/* 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: #1a0000;
  border: 1px solid rgba(220, 38, 38, 0.25);
  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(220, 38, 38, 0.35);
  border-color: rgba(220, 38, 38, 0.7);
}

.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; }
}

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

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

/* Overlay pola webbing tipis di atas foto kartu */
.card-web-overlay {
  background-image:
    repeating-linear-gradient(45deg, rgba(220,38,38,0.08) 0px, rgba(220,38,38,0.08) 1px, transparent 1px, transparent 14px),
    repeating-linear-gradient(-45deg, rgba(220,38,38,0.08) 0px, rgba(220,38,38,0.08) 1px, transparent 1px, transparent 14px);
}

/* ================= 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(220, 38, 38, 0.25)) 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(220, 38, 38, 0.6)) 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, #440101, #6c0102, #c7080c, #dc2626, #c7080c, #6c0102);
  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; }
}