/* ========================================
   Font Declarations
   ======================================== */

/* Albertus Nova Light - Serif */
@font-face {
  font-family: 'Albertus Nova';
  src: url('../fonts/albertus-nova.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   CSS Reset
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #000;
}

img {
  display: block;
  max-width: none;
  border: 0;
  border-style: none;
}

main, section, article, aside, header, footer, nav, figure, figcaption {
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  background-color: transparent;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6, p {
  font-size: inherit;
  font-weight: inherit;
}

/* Theme visibility */
.theme-day .night-only { display: none !important; }
.theme-night .day-only { display: none !important; }

/* Night mode text overrides */
.theme-night .content h1 {
  color: white !important;
}
.theme-night .content button {
  background: white;
  color: #3A400B;
}
.theme-night .content button:hover {
  background: #f0f0f0;
}

/* ========================================
   Scene — Full-viewport layered composition
   ======================================== */

/*
 * The scene fills the entire browser viewport.
 * Overflow is hidden so the square canvas crops
 * cleanly on non-square viewports.
 */
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  scale: 1.1;
}

/*
 * The canvas is a 1 : 1 square sized to whichever
 * viewport dimension is larger (vmax), then centered.
 * This replicates `background-size: cover` behavior
 * for our multi-layer image stack.
 *
 * Original PSD canvas: 2048 × 2048 px
 * All layers exported at the same size.
 */
.canvas {
  position: absolute;
  width: 100vmax;
  height: 100vmax;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/*
 * Every layer is stretched to fill the canvas exactly.
 * Because every source image is 2048 × 2048 and the
 * canvas is always square, no distortion occurs.
 */
.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.layer img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Z-index stacking order (back → front) */
.layer--sky              { z-index: 1; }
.layer--clouds {
  z-index: 3;
  will-change: transform, opacity;
  /* Animasi infinite searah dengan durasi santai */
  animation: driftClouds 20s linear infinite;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.cloud-2 {
  /* Dimulai dari pertengahan siklus animasi agar saling menutupi saat fade-out */
  animation-delay: -10s;
}
.layer--mountain-left    { z-index: 5; }
.layer--ocean            { z-index: 4; overflow: hidden; }

/* Option A: feTurbulence distortion (default) */
.wave-mode-a .layer--ocean {
  will-change: filter, transform;
  transform: translateZ(0); /* Optimasi 3: Memaksa layer ini menggunakan GPU composite */
  backface-visibility: hidden;
}
.wave-mode-a .ocean-shimmer { display: none; }

/* Option B: Layered duplicates with blend modes */
.wave-mode-b .ocean-base { position: relative; z-index: 1; }
.wave-mode-b .ocean-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.wave-mode-b .ocean-shimmer-1 {
  mix-blend-mode: screen;
  opacity: 0.2;
  filter: contrast(150%) brightness(120%);
  z-index: 2;
}
.wave-mode-b .ocean-shimmer-2 {
  mix-blend-mode: multiply;
  opacity: 0.3;
  filter: contrast(120%);
  z-index: 3;
}

/* Hide shimmer clones by default (JS will activate correct mode) */
.ocean-shimmer { display: none; }

/* Reduced motion: disable wave effects */
@media (prefers-reduced-motion: reduce) {
  .layer--ocean { filter: none !important; }
  .ocean-shimmer { display: none !important; }
}
.layer--mountain-right   { z-index: 5; }
.layer--boat             {
  z-index: 6;
  scale: 0.8;
  transform: translate(-1%, 0.8%);
}
.layer--rocks {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vmax;
  z-index: 7;
  pointer-events: none;
}
.layer--rocks img {
  width: 100%;
  height: auto;
  display: block;
}

/* Birds & Raven Styles */
    .bird {
      background-image: url('../images/bird.svg');
      filter: brightness(0) invert(41%) sepia(5%) saturate(302%) hue-rotate(325deg) brightness(97%) contrast(92%);
      background-size: auto 100%;
      width: 66px;
      height: 94px;
      opacity: 0.65;
      will-change: background-position;
      animation-name: fly-cycle;
      animation-timing-function: steps(10);
      animation-iteration-count: infinite;
      transform: scaleX(-1);
    }
.birds-parent {
  width: 100%;
  position: absolute;
  top: 30%;
  z-index: 2; /* Set to 2 to hide birds behind clouds (set to 3 to put birds in front of clouds) */
}
.bird-one { animation-duration: 1s; animation-delay: -0.5s; }
.bird-two { animation-duration: 0.9s; animation-delay: -0.5s; }
.bird-three { animation-duration: 1.25s; animation-delay: -0.5s; }
.bird-four { animation-duration: 1.15s; animation-delay: -0.5s; }
.bird-container {
  position: absolute;
  top: 10%;
  z-index: 2;
  left: auto;
  right: 15%;
  transform: scale(0) translateX(10vw);
  will-change: transform;
  animation-name: fly-right-one;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.bird-container-one { animation-duration: 48s; animation-delay: 0; }
.bird-container-two { animation-duration: 40s; animation-delay: 1s; }
.bird-container-three { animation-duration: 48s; animation-delay: 1s; }
.bird-container-four { animation-duration: 56s; animation-delay: 1s; }

@keyframes driftClouds {
  0%   { transform: translate3d(-4%, 0, 0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate3d(4%, 0, 0); opacity: 0; }
}

.layer--sky img.sky-moon {
  position: absolute !important;
  left: calc(50vmax - 35vw) !important;
  top: calc(50vmax - 40vh) !important;
  width: 9.52% !important;
  height: auto !important;
  -webkit-filter: drop-shadow(0 0 20px rgba(255, 255, 230, 0.75));
  filter: drop-shadow(0 0 20px rgba(255, 255, 230, 0.75));
  will-change: filter;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}


@keyframes twinkle {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.sky-stars {
  animation: twinkle 4s ease-in-out infinite;
}

.firefly {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  display: block;
}

.firefly-3 {
  top: -6vmax;
}

@keyframes fly-cycle {
  100% { background-position: -677px 0; }
}

@keyframes fly-right-one {
  0%   { transform: scale(0.156) translateX(10vw); }
  11%  { transform: translateY(2vh) translateX(-10vw) scale(0.208); }
  23%  { transform: translateY(0vh) translateX(-30vw) scale(0.26); }
  35%  { transform: translateY(4vh) translateX(-50vw) scale(0.312); }
  46%  { transform: translateY(2vh) translateX(-70vw) scale(0.312); }
  58%  { transform: translateY(0vh) translateX(-90vw) scale(0.312); }
  70%  { transform: translateY(0vh) translateX(-110vw) scale(0.312); }
  100% { transform: translateY(0vh) translateX(-110vw) scale(0.312); }
}

div#raven_container {
  position: absolute;
  left: 48.8%;
  top: 25.85%;
  width: 28%;
  z-index: 9;
  pointer-events: none;
  -webkit-transform: translate3d(-50%, -95%, 0);
  transform: translate3d(-50%, -95%, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ========================================
   Content overlay (CTA & Logo)
   ======================================== */
.content {
  z-index: 999;
  padding-inline: 210px !important;
  height: calc(100vh - 60px);
}
.content img {
  position: initial;
  height: 90px;
}
.content h1 {
  color: #3A400B;
  font-size: 24px;
  font-weight: 300;
  margin: 0;
  font-family: 'Albertus Nova', serif;
}
.content button {
  background: #3A400B;
  color: white;
  padding: 8px 20px;
  margin-top: 15px;
  transition: all .3s ease-in-out;
  font-size: 14px;
  line-height: 18px;
  margin-inline: auto;
  border-radius: 4px;
  cursor: pointer;
  font-family: "aktiv-grotesk", sans-serif;
  font-weight: 400;
  outline: 0;
  border: 0;
}
.content button:hover {
  background: #4C540E;
}

/* Modal styling */
.modal-text-container {
  text-align: center;
}

.modal-logo {
  display: block;
  margin: 0 auto 8px auto;
  width: 74px;
  height: auto;
}

#journey .modal-dialog {
  max-width: 96vw;
  height: 100vh !important;
  min-height: 100vh !important;
  margin-block: 0 !important;
}
#journey .modal-content {
  min-height: calc(100vh - 46px);
  background: rgba(21, 23, 8, 0.95);
  border-radius: 10px;
  border: none;
}
#journey .modal-body {
  background: transparent;
  width: 370px;
  margin: 0 auto;
  padding: 12px 0 10px 0;
}
.modal-backdrop.show {
  opacity: 0; /* invisible background so we can see the scene */
}
#journey .modal-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0;
  border: 0;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
}
#journey .modal-header .btn-close-custom {
  color: white;
  opacity: 0.8;
  padding: 20px;
  background-color: transparent;
  border: none;
  transition: opacity 0.2s;
  cursor: pointer;
}
#journey .modal-header .btn-close-custom:hover {
  opacity: 1;
}
#journey p {
  color: white;
  font-size: 18px;
  font-family: "aktiv-grotesk-thin", sans-serif;
  font-weight: 200;
  text-align: left;
  margin-bottom: 30px;
  line-height: 1.5;
}
#journey p.form-status {
  font-size: 16px;
  margin: 10px 0 0 0;
  min-height: 1.5em;
}
#journey p.form-status.is-error {
  color: #f2b8a2;
}
#journey button.sub:disabled {
  opacity: 0.6;
  cursor: default;
}
#journey label {
  color: white;
  font-family: "Barlow", sans-serif;
}
.form-control:focus {
  box-shadow: none !important;
}
#journey input {
  border: none !important;
  border-bottom: 1px solid white !important;
  font-size: 16px;
  font-weight: 300;
  background: transparent !important;
  color: white !important;
  border-radius: 0 !important;
  height: 40px;
  padding: 0 10px;
  margin-bottom: 16px;
  width: 100%;
}
#journey input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  text-transform: capitalize;
}
#journey button.sub {
  background: #D9D9D9;
  color: #180B0B;
  border-radius: 4px;
  padding: 10px;
  width: 70%;
  margin: 40px auto 0 auto;
  display: block;
  transition: all 0.3s;
  cursor: pointer;
  font-family: "aktiv-grotesk", sans-serif;
  font-weight: 400;
  outline: 0;
  border: 0;
}
#journey form {
  margin-top: 62px;
}
#journey button.sub:hover {
  background: white;
}

@media (max-width: 1366px) {
  .content img {
    height: 90px;
  }
}

@media (max-width: 1024px) {
  .content {
    padding-inline: 90px !important;
  }
}

/* Mobile Adjustments: Angkat posisi bebatuan sedikit */
@media (max-width: 768px) {
  .layer--rocks {
    transform: translateX(-50%) translateY(-5%);
  }

  /* Raven: Diperbesar dengan mengubah width agar titik anchor tidak bergeser */
  div#raven_container {
    width: 45% !important;
    left: 49.3% !important; /* Geser dikiiit aja dari base-nya 48.8% */
    top: 26.1% !important;  /* Keep mobile position unchanged */
    transform: translate(-50%, -95%) !important;
  }

  /* Birds: Posisi dinaikkan ke atas */
  .birds-parent {
    top: 15% !important;
  }

  /* Birds: Ukuran diperkecil secara aman tanpa merusak animasi sprite */
  .bird {
    transform: scale(-0.42, 0.42) !important;
  }

  /* Birds Speed: Diperlambat kembali (karena rute terbang di mobile sekarang jauh lebih panjang) */
  .bird-container-one { animation-duration: 56s !important; }
  .bird-container-two { animation-duration: 48s !important; }
  .bird-container-three { animation-duration: 56s !important; }
  .bird-container-four { animation-duration: 64s !important; }

  /* Clouds Speed: Dipercepat 2x lipat */
  .layer--clouds {
    animation-duration: 6s !important;
  }

  /* CTA and Logo mobile positioning */
  .content {
    padding-top: 70px !important;
    padding-bottom: 160px !important;
    height: 100vh;
  }
  .content h1 {
    color: white !important; /* On mobile it sits on dark water, so white text */
    font-size: 20px !important; /* Kurangi font size agar tidak break line */
  }
  .content img {
    width: 55px;
    height: auto;
  }
  #journey .modal-dialog {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
  }
  #journey .modal-content {
    min-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
    background: rgba(21, 23, 8, 0.98); /* slightly higher opacity for full-screen mobile */
  }
  #journey .modal-body {
    width: 100%;
    padding: 60px 25px 35px 25px;
  }
  #journey p {
    font-size: 16px;
    margin-bottom: 22px;
    text-align: left;
    font-family: "aktiv-grotesk-thin", sans-serif;
    font-weight: 200;
  }
  #journey form {
    margin-top: 30px;
  }
  #journey .modal-header .btn-close-custom {
    padding: 20px 25px 0px 25px;
  }
  #journey button.sub {
    margin: 16px auto 0 auto;
    outline: 0;
    border: 0;
  }
  #journey input {
    font-size: 14px !important;
    height: 35px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
  }
  #journey .mb-3 {
    margin-bottom: 1.5rem !important;
  }

  /* Birds Route: Perpanjang jarak terbang di mobile (-110vw tidak cukup untuk keluar layar HP) */
  @keyframes fly-right-one {
    0%   { transform: scale(0.156) translateX(10vw); }
    11%  { transform: translateY(2vh) translateX(-35vw) scale(0.208); }
    23%  { transform: translateY(0vh) translateX(-80vw) scale(0.26); }
    35%  { transform: translateY(4vh) translateX(-125vw) scale(0.312); }
    46%  { transform: translateY(2vh) translateX(-170vw) scale(0.312); }
    58%  { transform: translateY(0vh) translateX(-215vw) scale(0.312); }
    70%  { transform: translateY(0vh) translateX(-260vw) scale(0.312); }
    100% { transform: translateY(0vh) translateX(-260vw) scale(0.312); }
  }
}


.ocean-svg-container {
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
