/* ============ GALLERY — cinematic slider, same tokens as the main site ============ */

/* ---- Stage ---- */
.g-stage {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #0f0f0f;
}

.g-slides { position: absolute; inset: 0; z-index: 0; }

.g-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.g-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.g-slide.is-top { z-index: 2; }

.g-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8) contrast(1.06) brightness(.9);
}
/* pelan-pelan "bernapas" setelah masuk, biar frame tidak pernah benar-benar diam */

@keyframes g-breathe { from { scale: 1; } to { scale: 1.07; } }

.g-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.6) 0%, transparent 24%, transparent 48%, rgba(0,0,0,.8) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 48%, rgba(0,0,0,.5) 100%);
}
.g-stage .grain { z-index: 2; pointer-events: none; }

/* ---- Click / tap zones ---- */
.g-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 38%;
  background: transparent;
}
.g-zone-prev { left: 0; }
.g-zone-next { right: 0; }
.g-stage { touch-action: pan-y; }

/* ---- Overlay UI ---- */
.g-top, .g-bottom {
  position: absolute;
  z-index: 5;
  left: 2.1vw;
  right: 2.1vw;
  pointer-events: none;
}
.g-top a, .g-bottom button, .g-bottom a { pointer-events: auto; }

.g-top {
  top: 84px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .11em;
}
.g-top b { font-weight: 400; display: inline-block; }
.g-top a { position: relative; padding-bottom: 3px; }
.g-top a::after { position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: currentColor; content: ''; transition: width .35s ease; }
.g-top a:hover::after { width: 100%; }

.g-bottom { bottom: 28px; }

.g-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4vw;
}

.g-title {
  max-width: 68vw;
  font-size: clamp(44px, 6.6vw, 112px);
  font-weight: 620;
  line-height: .84;
  letter-spacing: -.07em;
}
.g-sub {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .09em;
  color: var(--muted);
}

.g-ctrl { display: flex; gap: 12px; }
.g-btn {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  transition: background .25s, color .25s, scale .35s var(--ease-cinematic);
}
.g-btn:hover { background: var(--paper); color: var(--ink); }
.g-btn:active { scale: .92; }

.g-bar {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.28);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
}

.g-segs { display: flex; gap: 6px; }
.g-seg {
  position: relative;
  flex: 1;
  height: 22px;
}
.g-seg::before, .g-seg::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  content: '';
}
.g-seg::before { height: 1px; background: rgba(255,255,255,.28); }
.g-seg::after {
  height: 2px;
  margin-top: -.5px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: .45;
  transition: transform .9s var(--ease-cinematic), opacity .5s;
}
.g-seg.is-past::after { transform: scaleX(1); }
.g-seg.is-on::after { transform: scaleX(1); opacity: 1; }
.g-seg:hover::before { background: rgba(255,255,255,.7); }

/* ---- Project info ---- */
.g-info { background: var(--ink); padding-bottom: 150px; }

.g-info-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8vw;
  margin-top: 110px;
}

.g-copy { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 560px; }
.g-copy .lead { margin-bottom: 38px; color: var(--paper); font-size: clamp(22px, 2.4vw, 34px); font-weight: 520; line-height: 1.2; letter-spacing: -.04em; }

.g-facts { border-top: 1px solid var(--line); align-self: start; }
.g-facts > div {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.g-facts dt { color: var(--muted); font: 9px var(--font-mono); letter-spacing: .08em; padding-top: 5px; }
.g-facts dd { font-size: 17px; }

/* ---- Next project ---- */
.g-next {
  position: relative;
  display: block;
  padding: 36px 2.1vw 70px;
  background: #fff;
  color: var(--ink);
  overflow: hidden;
}
.g-next-label {
  display: flex;
  justify-content: space-between;
  font: 9px var(--font-mono);
  letter-spacing: .11em;
}
.g-next-title {
  display: block;
  margin-top: 12vh;
  max-width: 85%;
  font-size: clamp(58px, 9.4vw, 152px);
  font-weight: 650;
  line-height: .82;
  letter-spacing: -.075em;
  transition: color .4s ease, translate .6s var(--ease-cinematic);
}
.g-next-arrow {
  position: absolute;
  right: 2.1vw;
  bottom: 70px;
  width: 64px;
  height: 64px;
  padding: 18px;
  border: 1px solid rgba(11,11,11,.6);
  border-radius: 50%;
  transition: background .3s, color .3s, transform .4s var(--ease-cinematic);
}
.g-next:hover .g-next-title { color: var(--blue); translate: 10px 0; }
.g-next:hover .g-next-arrow { background: var(--blue); border-color: var(--blue); color: #fff; }


/* ---- Mobile ---- */
@media (max-width: 800px) {
  .g-stage { min-height: 520px; }
  .g-top { top: 76px; left: 18px; right: 18px; }
  .g-bottom { left: 18px; right: 18px; bottom: 20px; }
  .g-row { flex-direction: column; align-items: flex-start; gap: 22px; }
  .g-ctrl { align-self: flex-end; }
  .g-title { max-width: 100%; font-size: 14.5vw; }
  .g-sub { margin-top: 16px; }
  .g-btn { width: 46px; height: 46px; }
  .g-ctrl { gap: 8px; }
  .g-bar { grid-template-columns: 1fr auto; margin-top: 18px; gap: 12px 16px; }
  .g-segs { grid-column: 1 / -1; grid-row: 2; }
  .g-zone { width: 50%; }
  .g-info { padding-bottom: 100px; }
  .g-info-grid { grid-template-columns: 1fr; gap: 60px; margin-top: 70px; }
  .g-next { padding: 25px 18px 40px; }
  .g-next-title { margin-top: 14vh; max-width: 100%; font-size: 17vw; }
  .g-next-arrow { position: relative; right: auto; bottom: auto; margin-top: 40px; width: 52px; height: 52px; padding: 14px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .g-slide.is-active img { animation: none; }
  .g-next:hover .g-next-title { translate: none; }
}
