* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000;
  color: #fff;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* =========================================
   1. GLOBAL TRACKER (GARIS & BINGKAI YANG MELUNCUR)
   ========================================= */
#global-tracker {
  position: absolute;
  top: 0; 
  left: 0; 
  width: 0; /* Diatur oleh JS secara real-time */
  height: 100vh;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#global-tracker.visible {
  opacity: 1;
}

/* Bingkai Kotak dengan Siku Terputus */
.focus-frame {
  position: absolute;
  /* Menempel pada posisi tengah layaknya gambar (45vh) ditambah 4px jarak gap */
  top: calc(50% - 22.5vh - 4px);
  left: -4px;
  width: calc(100% + 8px); /* Lebar tracker + 8px untuk gap luar */
  height: calc(45vh + 8px); /* Tinggi item + 8px untuk gap luar */
  
  /* Garis ditarik dengan background linear-gradient yang berhenti sebelum mencapai ujung (4px) */
  background-image: 
    linear-gradient(to right, transparent 4px, #fff 4px, #fff calc(100% - 4px), transparent calc(100% - 4px)),
    linear-gradient(to right, transparent 4px, #fff 4px, #fff calc(100% - 4px), transparent calc(100% - 4px)),
    linear-gradient(to bottom, transparent 4px, #fff 4px, #fff calc(100% - 4px), transparent calc(100% - 4px)),
    linear-gradient(to bottom, transparent 4px, #fff 4px, #fff calc(100% - 4px), transparent calc(100% - 4px));
    
  background-size: 
    100% 1.5px, 100% 1.5px, 1.5px 100%, 1.5px 100%;
  background-position: top, bottom, left, right;
  background-repeat: no-repeat;
}

/* Antena Atas */
.antenna-top {
  position: absolute;
  /* Jarak 8px dari bingkai atas gambar */
  bottom: calc(50% + 22.5vh + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 10px; /* Jarak "dempetan ada dua" garis */
  height: 100vh;
}

/* Antena Bawah */
.antenna-bottom {
  position: absolute;
  /* Jarak 8px dari bingkai bawah gambar */
  top: calc(50% + 22.5vh + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 100vh;
}

/* Garis Vertikal Ganda */
.line-v-left, .line-v-right {
  position: absolute;
  top: 0; bottom: 0;
  width: 1.5px;
  background-color: #fff;
}
.line-v-left { left: 0; }
.line-v-right { right: 0; }

/* Cabang Tempat Dudukan Teks */
.branch-left, .branch-right {
  position: absolute;
  bottom: 25px; 
  height: 1.5px; 
  background-color: #fff; 
}
.branch-left { right: 100%; width: 30px; }
.branch-right { left: 100%; width: 150px; }

/* Teks dan Logo "S" */
.s-logo {
  position: absolute;
  right: 100%; 
  bottom: 29px; 
  padding-right: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  transform: rotate(-90deg);
  transform-origin: bottom right;
}

.role-text {
  position: absolute;
  left: 100%; 
  bottom: 29px; 
  padding-left: 5px;
  color: #fff;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}


/* =========================================
   2. ACCORDION GALLERY
   ========================================= */
.gallery-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 45vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.accordion {
  display: flex;
  height: 100%;
  width: 100%;
  gap: 8px;
  justify-content: center;
}

.item {
  flex: 0 0 2vw;
  height: 100%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  /* Kurva animasi sangat mulus */
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: grayscale(100%) brightness(0.6);
  position: relative;
}

.item:hover, .item.active {
  flex: 0 0 40vw; 
  filter: grayscale(0%) brightness(1);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  /* Gambar tidak lagi memiliki ::after border, border sudah ada di Global Tracker */
}

/* =========================================
   3. TOMBOL VIEW PROJECT (BRUTALIST STYLE)
   ========================================= */
.view-btn {
  position: absolute;
  left: calc(100% + 5px); /* Sejajar dengan teks role */
  bottom: -4px; /* Tepat di bawah garis cabang horizontal */
  color: #fff;
  text-decoration: none;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.5); /* Transparan gelap */
  backdrop-filter: blur(2px);
  pointer-events: auto; /* Agar bisa diklik meskipun ada di dalam tracker */
  transition: all 0.3s ease;
  white-space: nowrap;
}

.view-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}




@media (max-width: 768px) {
  /* Gallery container: perfectly centered on screen, leaving room for SHOWCASE header */
  .gallery-container {
    position: absolute;
    top: 55%; /* Shifted down slightly to clear the header */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 75vh;
    padding: 0;
    box-sizing: border-box;
  }

  /* Accordion: vertical column */
  .accordion {
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 6px;
  }

  /* Items: thin bars that expand downward on tap/hover */
  .item {
    flex: 0 0 2.5vh;
    width: 100% !important;
    height: auto;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .item:hover, .item.active {
    flex: 0 0 38vh;
    width: 100% !important;
  }

  /* --- Tracker: bergerak vertikal --- */
  #global-tracker {
    position: fixed !important; /* Use fixed so it doesn't expand scroll area and tracks rect.top correctly */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    pointer-events: none !important;
  }

  /* Focus-frame: melebar penuh sesuai lebar layar */
  .focus-frame {
    top: 0 !important;
    left: -4px !important;
    width: calc(100% + 8px) !important;
    height: calc(100% + 8px) !important;
    position: absolute !important;
  }

  /* Antena atas: menembus dari atas item ke atas section (melewati header) */
  .antenna-top {
    top: auto !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 10px !important;
    height: 200vh !important;
  }

  /* Antena bawah: menembus ke bawah section */
  .antenna-bottom {
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 10px !important;
    height: 200vh !important;
  }

  /* Role text: posisi di BAWAH antenna-top = di tepi atas focus-frame.
     Gunakan bottom:0 pada antenna-top agar tepat di perbatasan item */
  .antenna-top .role-text {
    position: absolute !important;
    bottom: 8px !important;       /* 8px di atas tepi atas item */
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 9px !important;
    white-space: nowrap !important;
    background: rgba(0,0,0,0.8) !important;
    padding: 4px 12px !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    text-align: center !important;
    letter-spacing: 1.5px !important;
  }

  /* View btn: posisi di dalam antenna-top, jauh di atas role text */
  .view-btn {
    position: absolute !important;
    bottom: 60px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 9px !important;
    white-space: nowrap !important;
  }

  /* Sembunyikan elemen desktop yang tidak relevan */
  .branch-left, .branch-right, .s-logo { display: none !important; }
}

