/* =====================
   ROOT & VARIABLES
===================== */
:root {
    --brown: #574430;
    --teal: #71D0CA;
}

/* =====================
   FONTS
===================== */
.font-londrina {
    font-family: "Londrina Solid", sans-serif;
    font-weight: 400;
}

.font-londrina-bold {
    font-family: "Londrina Solid", sans-serif;
    font-weight: 900;
}

/* =====================
   GLOBAL
===================== */
html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    background-color: var(--teal);
    background-repeat: no-repeat;
    background-position: top;
    background-size: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

a, button, input, textarea, select, [role="button"] {
    cursor: none;
}

button,
nav a,
img {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.95);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* =====================
   NAVIGATION
===================== */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #47A39F;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    padding-bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #47A39F;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* =====================
   MOBILE MENU
===================== */
#mobile-menu {
    opacity: 0;
    transform: translate(-50%, -20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

/* =====================
   FOLLOWER MASCOT
===================== */
#follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 25px;
    height: 25px;
    background: url('assets/images/MASKOT.png') center / contain no-repeat;
    pointer-events: none;
    transform: translate(-25%, -30%);
    z-index: 999999;
    display: none;
}


/* =====================
   ANIMATIONS
===================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes pulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.05); }
}

.countdown-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Floating animation with subtle blinking for timeline elements */
@keyframes timelineFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(-10px) scale(1.02);
        opacity: 0.95;
    }
    50% {
        transform: translateY(0) scale(1.03);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-8px) scale(1.01);
        opacity: 0.95;
    }
}

@keyframes timelineBlink {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.1);
    }
}

@keyframes timelineFloatBlink {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: brightness(1);
    }
    25% {
        transform: translateY(-8px) scale(1.02);
        opacity: 0.9;
        filter: brightness(1.05);
    }
    50% {
        transform: translateY(0) scale(1.03);
        opacity: 0.8;
        filter: brightness(1.1);
    }
    75% {
        transform: translateY(-5px) scale(1.01);
        opacity: 0.9;
        filter: brightness(1.05);
    }
}

.timeline-float {
    animation: timelineFloat 4s ease-in-out infinite;
}

.timeline-blink {
    animation: timelineBlink 3s ease-in-out infinite;
}

.timeline-float-blink {
    animation: timelineFloatBlink 3s ease-in-out infinite;
}

/* Enhanced active timeline element animation */
.timeline-active {
    animation: timelineFloatBlink 2s ease-in-out infinite;
    z-index: 10;
    position: relative;
    filter: brightness(1.2) contrast(1.1);
}

/* =====================
   CLOUD
===================== */
@keyframes slideFromRight {
    from {
        transform: translateX(100vw);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cloud-pink-animation {
    position: absolute;
    top: 9%;
    right: 0;
    height: 500px;
    pointer-events: none;
    animation: slideFromRight 1.2s ease-out forwards;
}

/* =====================
   ISLANDS
===================== */
@keyframes slideFromLeft {
    from { transform: translateX(-100vw); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideFromRightIsland {
    from { transform: translateX(100vw); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.island-left,
.island-right {
    position: absolute;
    width: auto;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.3);
}

.island-left {
    left: 0;
    top: 35%;
    height: 450px;
    transform: translateX(-100vw) scale(0.3);
}

.island-right {
    right: 0;
    top: 60%;
    height: 390px;
    transform: translateX(100vw) scale(0.3);
}

/* =====================
   SPACING UTILITIES
===================== */
.section-spacing {
    margin-top: 3rem;
}

.section-spacing-lg {
    margin-top: 4rem;
}


/* =====================
   PARALLAX ELEMENTS
===================== */
@keyframes rumput-sway {
    0%,100% { transform: scaleX(1); }
    50%     { transform: scaleX(1.05); }
}

.rumput-sway {
    animation: rumput-sway 4s ease-in-out infinite;
    transform-origin: left;
}

@keyframes stone-float {
    0%,100% { transform: translateY(0) scale(1); }
    50%     { transform: translateY(-30px) scale(1.02); }
}

.stone-parallax {
    animation: stone-float 5s ease-in-out infinite;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    #follower {
        display: none !important;
    }
}

@media (min-width: 769px) {
  #follower {
    display: block;
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
    .cloud-pink-animation {
        height: 220px;
        top: 5%;
        animation-duration: 5s;
    }
}

@media (min-width: 640px) {
    .section-spacing { margin-top: 5rem; }
    .section-spacing-lg { margin-top: 8rem; }

    .island-left  { height: 650px; top: 40%; }
    .island-right { height: 550px; top: 55%; }
}

@media (min-width: 1024px) {
    .section-spacing { margin-top: 8rem; }
    .section-spacing-lg { margin-top: 12rem; }

    .island-left  { height: 1000px; top: 40%; }
    .island-right { height: 800px;  top: 33%; }
}

@media (min-width: 1280px) {
    .section-spacing-lg { margin-top: 15rem; }

    .island-left  { height: 1200px; }
    .island-right { height: 900px;  top: 35%; }
}

/* =====================
   JUMPSCARE
===================== */
#sonlis-jumpscare {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

#sonlis-jumpscare img {
  width: 90vw;           /* GEDE */
  max-width: 900px;
  transform: scale(0.6);
  transition: transform 0.15s ease;
  animation: shake 0.15s infinite;
}

#sonlis-jumpscare.active {
  opacity: 1;
  pointer-events: auto;
}

#sonlis-jumpscare.active img {
  transform: scale(1);
}

/* sedikit shake biar kaget */
@keyframes shake {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(6px, -6px) scale(1); }
  50% { transform: translate(-6px, 6px) scale(1); }
  75% { transform: translate(6px, 6px) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}
