/* =========================================================
   Scroll-Story — Home & Profile (sinematik, digerakkan scroll)
   --p = progres scroll section (0 → 1), diisi oleh js/story.js
   ========================================================= */

.story { position: relative; --p: 0; }
.story__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.story__bar {
  position: absolute; left: 0; bottom: 0; z-index: 20;
  width: 100%; height: 3px; background: rgba(255,255,255,.12);
}
.story__bar span {
  display: block; height: 100%;
  width: calc(var(--p) * 100%);
  background: linear-gradient(90deg, var(--gold), var(--maroon));
}

/* Elemen bertahap: muncul saat .on, keluar saat .past */
.story [data-show] {
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), transform .55s var(--ease), filter .45s var(--ease), visibility 0s linear .45s;
}
.story [data-show].on {
  opacity: 1; visibility: visible;
  transition: opacity .45s var(--ease), transform .55s var(--ease), filter .45s var(--ease), visibility 0s;
}

/* =========================================================
   HOME
   ========================================================= */
.sh { height: 420vh; background: var(--navy-dark); color: var(--white); }

.sh__bg {
  position: absolute; inset: -2%;
  background-size: cover; background-position: center;
  transform: scale(calc(1 + var(--p) * .35));
  filter: saturate(calc(1.1 - var(--p) * .5));
  will-change: transform;
}
.sh__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(13,27,76,.95) 0%, rgba(13,27,76,.85) 45%, rgba(107,15,26,.9) 100%);
  opacity: calc(.12 + var(--p) * 3);
}
.sh__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(5,10,30,.6) 100%);
}

/* Tahap 0 — pill "Scroll untuk memulai" */
.sh__hint {
  position: absolute; z-index: 5; left: 50%;
  top: calc(var(--header-h) + 2.2rem);
  transform: translate(-50%, 0);
}
.sh__hint:not(.on) { transform: translate(-50%, -20px); }
.sh__pill {
  display: inline-block; padding: .85rem 2rem; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: .78rem;
  letter-spacing: .38em; text-transform: uppercase; white-space: nowrap;
  color: var(--white);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  animation: pillGlow 2.6s ease-in-out infinite;
}
@keyframes pillGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.25); }
  50%      { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

/* Scene umum */
.sh__scene {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--header-h) 5% 2rem;
}

/* Tahap 1 — Judul */
.sh__scene--1 { transform: scale(.94); filter: blur(10px); }
.sh__scene--1.on { transform: none; filter: none; }
.sh__scene--1.past { transform: translateY(-80px) scale(1.05); filter: blur(12px); }

.sh__title { display: flex; flex-direction: column; align-items: center; gap: .4rem; perspective: 800px; }
.sh__t1 {
  font-size: clamp(1.2rem, 3.2vw, 2.2rem); font-weight: 700;
  letter-spacing: .35em; text-transform: uppercase; color: rgba(255,255,255,.92);
  margin-right: -.35em;
}
.sh__t2 {
  font-size: clamp(3.4rem, 12vw, 9rem); font-weight: 800; line-height: 1;
  letter-spacing: -.02em; color: var(--gold);
  text-shadow: 0 10px 40px rgba(255,215,0,.35);
}
.sh__title .char {
  display: inline-block; opacity: 0;
  transform: translateY(70%) rotateX(-90deg);
  transform-origin: 50% 100%;
  transition: opacity .5s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i) * 28ms);
}
.sh__t2 .char { transition-delay: calc(.22s + var(--i) * 40ms); }
.sh__scene--1.on .char { opacity: 1; transform: none; }

.sh__sub {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem;
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.4rem); color: rgba(255,255,255,.9);
  opacity: 0; transform: translateY(16px);
  transition: all .6s var(--ease) .55s;
}
.sh__line {
  display: block; width: 0; height: 2px; background: var(--gold);
  transition: width .7s var(--ease) .75s;
}
.sh__rt {
  margin-top: 1.2rem; padding: .35rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255,215,0,.5); color: var(--gold);
  font-weight: 600; font-size: .85rem; letter-spacing: .15em;
  opacity: 0; transition: opacity .6s var(--ease) .85s;
}
.sh__scene--1.on .sh__sub { opacity: 1; transform: none; }
.sh__scene--1.on .sh__line { width: clamp(28px, 6vw, 70px); }
.sh__scene--1.on .sh__rt { opacity: 1; }

/* Tahap 2 — Menguatkan ... */
.sh__lead {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(.95rem, 1.8vw, 1.25rem);
  letter-spacing: .45em; text-transform: uppercase; color: var(--gold);
  margin: 0 -.45em 1.2rem 0;
  opacity: 0; transform: translateY(20px);
  transition: all .55s var(--ease) .05s;
}
.sh__scene--2.on .sh__lead { opacity: 1; transform: none; }

.sh__words { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.sh__words li {
  overflow: hidden; padding: .08em .1em .12em;
  font-family: var(--font-head); font-weight: 800; line-height: 1.08;
  font-size: clamp(2.1rem, 6.4vw, 5rem); letter-spacing: -.02em;
}
.sh__words li span { display: inline-block; transform: translateY(110%); transition: transform .65s var(--ease); }
.sh__words li.on span { transform: none; }
.sh__words em { font-style: italic; font-weight: 600; color: rgba(255,255,255,.72); font-size: .6em; }
.sh__words b { color: var(--gold); }

.sh__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem;
  transform: translateY(20px);
}
.sh__actions.on { transform: none; }

/* Indikator mouse */
.sh__mouse {
  position: absolute; z-index: 5; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid rgba(255,255,255,.7); border-radius: 20px;
}
.sh__mouse span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 4px; background: var(--gold); animation: scrollDot 1.8s infinite;
}

/* =========================================================
   PROFILE
   ========================================================= */
.sp { height: 380vh; background: var(--bg); color: var(--text); }
.sp .story__bar { background: rgba(13,27,76,.08); }

.sp__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(13,27,76,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,76,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  transform: translateY(calc(var(--p) * -96px));
}
.sp__marquee {
  position: absolute; top: 50%; left: 0; display: flex; white-space: nowrap; pointer-events: none;
  font-family: var(--font-head); font-weight: 800; font-size: clamp(4rem, 13vw, 11rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(107,15,26,.1);
  transform: translate(calc(var(--p) * -55%), -50%);
}

/* Logo utama */
.sp__logo {
  --lx: 0px; --ly: 0px; --ls: 1; --lr: 0deg;
  position: absolute; z-index: 3; top: 50%; left: 50%;
  width: clamp(220px, 34vmin, 360px); aspect-ratio: 1;
  opacity: 1;
  transform: translate(-50%, -50%) translate(var(--lx), var(--ly)) scale(var(--ls)) rotate(var(--lr));
  transition: transform .7s var(--ease), opacity .5s var(--ease);
}
.sp__logo img {
  position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 25px 35px rgba(13,27,76,.35));
}
.sp__glow {
  position: absolute; inset: -20%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,.45), transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}
.sp__ring { position: absolute; border-radius: 50%; pointer-events: none; }
.sp__ring--1 { inset: -9%; border: 2px dashed rgba(107,15,26,.35); animation: spin 28s linear infinite; }
.sp__ring--2 { inset: -20%; border: 1px solid rgba(13,27,76,.15); animation: spin 16s linear infinite reverse; }
.sp__ring--2::after {
  content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Status logo per tahap */
.sp[data-stage="1"] .sp__logo { --lx: 0px; --ly: -3vh; --ls: 1; --lr: 0deg; opacity: 1; }
.sp[data-stage="2"] .sp__logo { --lx: -24vw; --ly: 0px; --ls: .88; --lr: 360deg; opacity: 1; }
.sp[data-stage="3"] .sp__logo { --ly: -65vh; --ls: .3; --lr: 720deg; opacity: 0; pointer-events: none; }

/* Tahap 1 — Intro */
.sp__intro {
  position: absolute; z-index: 4; left: 50%; bottom: 8vh;
  transform: translate(-50%, 24px); text-align: center;
}
.sp__intro.on { transform: translate(-50%, 0); }
.sp__intro .eyebrow { margin-bottom: .6rem; }
.sp__intro p { font-family: var(--font-head); font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--maroon); font-weight: 700; }

/* Tahap 2 — Profil */
.sp__about {
  position: absolute; z-index: 4; top: 50%; right: 6vw;
  width: min(580px, 48vw);
  transform: translate(50px, -50%);
}
.sp__about.on { transform: translate(0, -50%); }
.sp__about.past { transform: translate(0, calc(-50% - 50px)); }
.sp__title {
  font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 800; color: var(--navy);
  letter-spacing: -.01em; margin-bottom: 1.2rem;
}
.sp__title span { color: var(--maroon); }
.sp__desc { font-size: clamp(1.02rem, 1.55vw, 1.25rem); line-height: 1.75; color: var(--text); }
.sp__desc .w { opacity: .22; transition: opacity .25s ease, color .25s ease; }
.sp__desc .w.lit { opacity: 1; }
.sp__desc .w.hl.lit { color: var(--maroon); font-weight: 700; }

/* Tahap 3 — Nilai utama */
.sp__values {
  position: absolute; z-index: 4; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 1rem) 5% 2.5rem; text-align: center;
  transform: translateY(30px);
}
.sp__values.on { transform: none; }
.sp__mini {
  width: 76px; margin-bottom: .9rem;
  transform: scale(.5) rotate(-120deg); transition: transform .65s var(--ease) .05s;
  filter: drop-shadow(0 8px 16px rgba(13,27,76,.3));
}
.sp__values.on .sp__mini { transform: none; }
.sp__values .sp__title { margin-bottom: 0; }

.sp__cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
  width: 100%; max-width: 1100px; margin-top: 2rem; perspective: 1000px;
}
.sp__card {
  position: relative; overflow: hidden; text-align: left;
  background: var(--white); border-radius: var(--radius); padding: 2rem 1.7rem;
  box-shadow: var(--shadow);
  transform: translateY(50px) rotateX(18deg);
}
.sp__card.on { transform: none; }
.sp__card:hover { box-shadow: var(--shadow-lg); }
.sp__card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--maroon), var(--gold), var(--navy));
  transform: scaleX(0); transform-origin: left; transition: transform .65s var(--ease) .15s;
}
.sp__card.on::before { transform: scaleX(1); }
.sp__card .pillar__icon { margin: 0 0 1.2rem; }
.sp__card h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: .5rem; }
.sp__card p { color: var(--muted); }
.sp__num {
  position: absolute; top: .8rem; right: 1.2rem;
  font-family: var(--font-head); font-weight: 800; font-size: 3.2rem; line-height: 1;
  color: rgba(13,27,76,.07);
}

/* =========================================================
   Responsif
   ========================================================= */
@media (max-width: 960px) {
  .sh { height: 360vh; }
  .sp { height: 340vh; }

  .sp[data-stage="2"] .sp__logo { --lx: 0px; --ly: -27vh; --ls: .5; }
  .sp__about {
    top: auto; bottom: 6vh; left: 6%; right: 6%; width: auto; text-align: center;
    transform: translateY(40px);
  }
  .sp__about.on { transform: none; }
  .sp__about.past { transform: translateY(-40px); }
  .sp__about .eyebrow { display: none; }

  .sp__cards { grid-template-columns: 1fr; gap: .9rem; margin-top: 1.4rem; max-width: 520px; }
  .sp__card {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem;
    padding: 1rem 1.1rem;
  }
  .sp__card .pillar__icon { width: 52px; height: 52px; border-radius: 14px; margin: 0; }
  .sp__card .pillar__icon svg { width: 24px; height: 24px; }
  .sp__card h3 { font-size: 1.05rem; margin-bottom: .15rem; }
  .sp__card p { font-size: .88rem; line-height: 1.5; }
  .sp__num { font-size: 2.2rem; }
  .sp__mini { width: 56px; margin-bottom: .6rem; }
}

@media (max-width: 600px) {
  .sh__pill { font-size: .68rem; letter-spacing: .28em; padding: .75rem 1.4rem; }
  .sh__sub { gap: .6rem; }
  .sh__mouse { bottom: 1.4rem; }
  .sp__desc { font-size: .98rem; line-height: 1.65; }
  .sp__title { font-size: 1.6rem; margin-bottom: .8rem; }
}

@media (max-height: 640px) and (max-width: 960px) {
  .sp__card p { display: none; }
}
