:root {
  --bg: #081321;
  --panel: #0f2236;
  --text: #edf3f8;
  --muted: #93a5b8;
  --line: rgba(207, 224, 240, 0.14);
  --blue: #9fc7e8;
  --font: 'Manrope', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --top: calc(60px + env(safe-area-inset-top, 0px));
  --bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Layar pembuka ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  text-align: center;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.18, 1), visibility 0.9s;
}
.loader.done { transform: translateY(-100%); visibility: hidden; }

.loader-text {
  font: 800 clamp(30px, 9vw, 64px) / 1.08 var(--font);
  letter-spacing: -0.02em;
}
.loader-text span {
  display: block;
  animation: lineIn 0.8s var(--ease) both;
}
.loader-text span:nth-child(2) { animation-delay: 0.15s; }

.loader-line { width: 140px; height: 2px; background: #182a3d; overflow: hidden; }
.loader-line i {
  display: block;
  height: 100%;
  background: var(--blue);
  animation: load 1.3s var(--ease) forwards;
}

@keyframes lineIn { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes load { from { width: 0; } to { width: 100%; } }

/* ---------- Bar atas ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top);
  padding: env(safe-area-inset-top, 0px) max(20px, 4vw) 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(8, 19, 33, 0.92);
  border-bottom: 1px solid var(--line);
}

.brand {
  font: 700 12px var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

#nav { display: flex; gap: 6px; }
#nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font: 500 14px var(--body);
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}
#nav a:hover { color: var(--text); }
#nav a.active { color: var(--text); background: var(--panel); }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-btn .bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-btn.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active .bar:nth-child(2) { opacity: 0; }
.menu-btn.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: flex; }
  #nav {
    position: fixed;
    top: var(--top);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px max(20px, 4vw) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0.3s;
  }
  #nav.show { transform: none; opacity: 1; visibility: visible; }
  #nav a { padding: 14px 0; border-radius: 0; font-size: 17px; border-bottom: 1px solid var(--line); background: none !important; }
  #nav a:last-child { border-bottom: 0; }
  #nav a.active { color: var(--blue); }
}

/* ---------- Deck: geser kiri / kanan ---------- */
.deck {
  position: fixed;
  z-index: 1;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--top) + 24px) max(20px, 5vw) calc(var(--bottom) + 16px);
}

.inner {
  width: 100%;
  max-width: 1080px;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h2 {
  margin: 0 0 24px;
  font: 800 clamp(32px, 6vw, 52px) / 1.05 var(--font);
  letter-spacing: -0.03em;
}

/* ---------- Home ---------- */
.hero-grid {
  display: grid;
  gap: 18px;
  grid-template-areas: "name" "photo" "copy";
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
}

.hero-name { grid-area: name; }

.hero-name h1 {
  margin: 0;
  font: 800 clamp(46px, 14vw, 120px) / 1 var(--font);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  /* nama masuk dengan geser dari kiri */
  clip-path: inset(-0.2em 100% -0.3em -0.1em);
  transform: translateX(-28px);
  transition: clip-path 1.4s var(--ease), transform 1.4s var(--ease);
}

.hero-role {
  margin: 10px 0 0;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.slide.in .hero-name h1 {
  clip-path: inset(-0.2em -0.1em -0.3em -0.1em);
  transform: none;
  transition-delay: 0.5s;
}
.slide.in .hero-role {
  opacity: 1;
  transform: none;
  transition-delay: 1s;
}

.hero-photo {
  grid-area: photo;
  margin: 0;
  height: clamp(220px, 40dvh, 420px);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

.hero-copy { grid-area: copy; max-width: 52ch; }
.hero-copy p { margin: 0 0 18px; color: var(--muted); font-size: 17px; }

.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: 700 14px var(--font);
  transition: background 0.25s;
}
.button:hover { background: var(--blue); }

.text-link {
  font: 500 15px var(--body);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
  transition: border-color 0.25s;
}
.text-link:hover { border-color: var(--blue); }

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
    grid-template-areas: "name name" "copy photo";
    column-gap: 56px;
    row-gap: 28px;
    align-items: end;
  }
  .hero-photo { height: min(52dvh, 520px); }
}

/* ---------- About ---------- */
.lead {
  margin: 0 0 32px;
  max-width: 58ch;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.55;
}

.facts { display: flex; flex-wrap: wrap; gap: 28px 56px; margin: 0; }
.facts div { min-width: 140px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 2px 0 0; font: 700 18px var(--font); }

/* ---------- Projects ---------- */
.inner:has(.project-grid),
.inner:has(.timeline) { justify-content: flex-start; }

.project-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.project-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  cursor: pointer;
}
.project-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel);
}
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-meta h3 { margin: 0; font: 700 18px/1.25 var(--font); transition: color 0.25s; }
.project-desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.project-card:hover h3 { color: var(--blue); }

@media (min-width: 700px) {
  .project-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 22px; }
  .project-card { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
}

/* ---------- Journey ---------- */
.timeline { position: relative; max-width: 720px; margin-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 30px 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.timeline time { display: block; color: var(--muted); font-size: 14px; }
.timeline h3 { margin: 2px 0 6px; font: 700 20px/1.3 var(--font); }
.timeline p { margin: 0; color: var(--muted); max-width: 56ch; }

/* ---------- Contact ---------- */
.contact-email {
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
  font: 700 clamp(22px, 5vw, 40px) / 1.2 var(--font);
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 4px;
}
.socials { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; }
.socials a { color: var(--muted); border-bottom: 1px solid var(--line); padding: 2px 0; transition: color 0.25s; }
.socials a:hover { color: var(--text); }
.legal { margin: 48px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Penunjuk slide ---------- */
.pager {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--bottom);
  padding: 0 max(12px, 3vw) env(safe-area-inset-bottom, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg) 40%, transparent);
}
.pager > * { pointer-events: auto; }

.pager-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 24px;
  line-height: 1;
  transition: border-color 0.25s, opacity 0.25s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--blue); }
.pager-btn:disabled { opacity: 0.3; cursor: default; }

.dots { display: flex; align-items: center; gap: 4px; }
.dot { width: 28px; height: 44px; display: grid; place-items: center; }
.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(207, 224, 240, 0.3);
  transition: width 0.35s var(--ease), background 0.25s;
}
.dot[aria-current="true"]::before { width: 24px; background: var(--blue); }

/* ---------- Detail proyek ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(3, 8, 14, 0.82); }

.modal-card {
  position: relative;
  width: min(900px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 10px;
  animation: modalIn 0.35s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 19, 33, 0.75);
  font-size: 24px;
  line-height: 1;
}

.modal-content { display: grid; grid-template-columns: minmax(0, 1fr); }
.modal-img-wrap { background: var(--bg); }
.modal-img-wrap img { width: 100%; height: 100%; max-height: 40dvh; object-fit: cover; }
.modal-body { padding: 22px 22px 26px; }
.modal-body .meta { color: var(--muted); font-size: 14px; }
.modal-body h2 { margin: 4px 0 12px; font-size: clamp(24px, 4vw, 34px); }
.modal-body p { margin: 0 0 20px; color: var(--muted); }

@media (min-width: 800px) {
  .modal-content { grid-template-columns: 1.1fr 1fr; }
  .modal-img-wrap img { max-height: none; min-height: 100%; }
  .modal-body { padding: 36px; align-self: center; }
}

/* ---------- Gerak dikurangi ---------- */
@media (prefers-reduced-motion: no-preference) {
  .deck { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .loader-text span { opacity: 1; }
  *, *::before, *::after { animation-iteration-count: 1 !important; }
  .blob b { animation: none !important; }
}


/* =====================================================
   ANIMASI
   Keadaan awal = tersembunyi. Saat slide sudah berhenti
   di layar, JS memberi class .in -> animasi masuk jalan.
   ===================================================== */

/* ---------- Latar bergerak ---------- */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #2b5f8f; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #1b3a63; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #3a6f8a; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --c1: #2b5f8f; --c2: #1b3a63; --c3: #3a6f8a;
  transition: --c1 1.4s ease, --c2 1.4s ease, --c3 1.4s ease;
}
.bg[data-i="1"] { --c1: #1f7a86; --c2: #1b4a63; --c3: #2f8f8a; }
.bg[data-i="2"] { --c1: #3d56a8; --c2: #243a74; --c3: #2f6fb0; }
.bg[data-i="3"] { --c1: #2f78a8; --c2: #1d4d73; --c3: #4a8fb8; }
.bg[data-i="4"] { --c1: #5a4fb0; --c2: #2c3a80; --c3: #3f6fb5; }

.blob {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  transform: translate3d(calc(var(--sx, 0) * var(--k) * -1px), 0, 0);
  will-change: transform;
}
.blob b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
.b1 { --k: 70;  top: -38vmax;  left: -30vmax; }
.b2 { --k: 130; right: -38vmax; bottom: -40vmax; }
.b3 { --k: 200; width: 55vmax; height: 55vmax; top: 28%; left: 38%; }
.b1 b { background: radial-gradient(circle, var(--c1) 0%, transparent 62%); }
.b2 b { background: radial-gradient(circle, var(--c2) 0%, transparent 62%); animation-duration: 27s; animation-direction: alternate-reverse; }
.b3 b { background: radial-gradient(circle, var(--c3) 0%, transparent 62%); animation-duration: 19s; opacity: 0.35; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(9vmax, 7vmax, 0) scale(1.18); }
}

/* ---------- Transisi pergantian slide (mengikuti jari) ---------- */
.inner {
  transform: translate3d(calc(var(--p, 0) * -30%), 0, 0) scale(calc(1 - var(--a, 0) * 0.07));
  opacity: calc(1 - var(--a, 0) * 0.75);
  will-change: transform, opacity;
}

/* ---------- Judul tiap slide ---------- */
.slide h2 { opacity: 0; transform: translateX(-28px); }
.slide.in h2 {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease), transform 1.2s var(--ease);
  transition-delay: 0.15s;
}

/* ---------- Pesan: kata muncul satu per satu ---------- */
.words .w { display: inline-block; opacity: 0; transform: translateY(0.7em); }
.slide.in .words .w {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 1.05s var(--ease);
  transition-delay: calc(var(--d, 0s) + min(calc(var(--i) * 40ms), 2.7s));
}

/* ---------- Foto muncul ---------- */
.hero-photo { clip-path: inset(100% 0 0 0); }
.hero-photo img { transform: scale(1.3); }
.slide.in .hero-photo {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.65s var(--ease) 0.375s;
}
.slide.in .hero-photo img {
  transform: none;
  transition: transform 2.7s var(--ease) 0.375s;
}

.hero-actions { opacity: 0; transform: translateY(16px); }
.slide.in .hero-actions {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease) 1.8s, transform 1.05s var(--ease) 1.8s;
}

/* ---------- About ---------- */
.facts > div { opacity: 0; transform: translateY(20px); }
.slide.in .facts > div {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease);
}
.slide.in .facts > div:nth-child(1) { transition-delay: 1.35s; }
.slide.in .facts > div:nth-child(2) { transition-delay: 1.575s; }

/* ---------- Projects ---------- */
.project-card { opacity: 0; transform: translateY(40px) scale(0.96); }
.project-image img { transform: scale(1.25); }
.slide.in .project-card {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease), transform 1.35s var(--ease);
  transition-delay: calc(0.3s + var(--i, 0) * 0.15s);
}
.slide.in .project-image img {
  transform: none;
  transition: transform 2.1s var(--ease);
  transition-delay: calc(0.3s + var(--i, 0) * 0.15s);
}
.slide.in .project-card:hover .project-image img {
  transform: scale(1.07);
  transition-duration: 0.9s;
  transition-delay: 0s;
}

/* ---------- Contact ---------- */
.contact-email, .socials, .legal { opacity: 0; transform: translateY(22px); }
.slide.in .contact-email, .slide.in .socials, .slide.in .legal {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease), transform 1.2s var(--ease);
}
.slide.in .contact-email { transition-delay: 0.45s; }
.slide.in .socials { transition-delay: 0.75s; }
.slide.in .legal { transition-delay: 1.05s; }


/* =====================================================
   REVISI: animasi lebih pelan, journey berpeta, modal halus
   ===================================================== */

/* Kata per kata: lebih pelan */
.slide.in .words .w {
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0s) + min(calc(var(--i) * 120ms), 4s));
}

/* Urutan kemunculan di Home / About */
.slide.in .hero-actions { transition-delay: 3.2s, 3.2s; }
.slide.in .facts > div:nth-child(1) { transition-delay: 2.8s; }
.slide.in .facts > div:nth-child(2) { transition-delay: 3s; }

/* ---------- Journey: cahaya biru menyusuri perjalanan ---------- */
.tl-fill {
  position: absolute;
  left: -0.5px;
  top: 0;
  width: 2px;
  height: var(--y, 0px);
  background: linear-gradient(to bottom, rgba(159, 199, 232, 0), var(--blue));
  box-shadow: 0 0 12px rgba(159, 199, 232, 0.55);
  border-radius: 2px;
  pointer-events: none;
}
.tl-head {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e3f2ff;
  box-shadow: 0 0 0 6px rgba(159, 199, 232, 0.18), 0 0 22px 8px rgba(159, 199, 232, 0.7);
  transform: translate(-50%, calc(var(--y, 0px) - 50%));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.timeline.run .tl-head { opacity: 1; animation: glow 1.8s ease-in-out infinite; }
@keyframes glow {
  50% { box-shadow: 0 0 0 11px rgba(159, 199, 232, 0.08), 0 0 32px 12px rgba(159, 199, 232, 0.95); }
}

.timeline-item { opacity: 0; transform: translateX(-30px); }
.timeline-item::before { transform: scale(0); }
.timeline-item.lit {
  opacity: 1;
  transform: none;
  transition: opacity 1.1s var(--ease), transform 1.3s var(--ease);
}
.timeline-item.lit::before {
  transform: none;
  box-shadow: 0 0 14px 4px rgba(159, 199, 232, 0.7);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jw .w { display: inline-block; opacity: 0; transform: translateY(0.7em); }
.timeline-item.lit .jw .w {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(0.45s + min(calc(var(--i) * 120ms), 3.5s));
}

/* ---------- Detail proyek: halus, bukan muncul tiba-tiba ---------- */
.modal {
  display: flex;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
.modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s ease;
}

.modal-card {
  animation: none;
  opacity: 0;
  transform: translateY(56px) scale(0.93);
  transition: transform 0.45s ease, opacity 0.4s ease;
}
.modal.open .modal-card {
  opacity: 1;
  transform: none;
  transition: transform 1.1s var(--ease) 0.05s, opacity 0.7s ease 0.05s;
}

.modal-img-wrap { overflow: hidden; }
.modal-img-wrap img { transform: scale(1.35); transition: transform 0.4s ease; }
.modal.open .modal-img-wrap img { transform: none; transition: transform 2.2s var(--ease) 0.1s; }

.modal-body .meta, .modal-body h2, .modal-body .button {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s, background 0.25s;
}
.modal-body .meta { display: block; }
.modal.open .modal-body .meta,
.modal.open .modal-body h2,
.modal.open .modal-body .button {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease), background 0.25s;
}
.modal.open .modal-body .meta { transition-delay: 0.55s, 0.55s, 0s; }
.modal.open .modal-body h2 { transition-delay: 0.75s, 0.75s, 0s; }
.modal.open .modal-body .button { transition-delay: 2.4s, 2.4s, 0s; }

.modal .words .w { transition: opacity 0.25s; }
.modal.open .words .w {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(1.1s + min(calc(var(--i) * 120ms), 4s));
}

@media (prefers-reduced-motion: reduce) {
  .timeline-item, .timeline-item::before { opacity: 1; transform: none; }
  .tl-head { display: none; }
}


/* =====================================================
   TEKS: huruf memudar masuk berurutan (bukan per kata)
   ===================================================== */
.wd { display: inline-block; white-space: nowrap; }
.words .w, .jw .w { display: inline; opacity: 0; transform: none; }

.slide.in .words .w {
  opacity: 1;
  transition: opacity 0.9s ease;
  transition-delay: calc(var(--d, 0s) + var(--i) * var(--s, 26ms));
}
.timeline-item.lit .jw .w {
  opacity: 1;
  transition: opacity 0.9s ease;
  transition-delay: calc(0.45s + var(--i) * var(--s, 26ms));
}
.modal .words .w { transition: opacity 0.25s; }
.modal.open .words .w {
  opacity: 1;
  transition: opacity 0.9s ease;
  transition-delay: calc(1.1s + var(--i) * var(--s, 26ms));
}

.slide.in .hero-actions { transition-delay: 3.2s, 3.2s; }
.slide.in .facts > div:nth-child(1) { transition-delay: 3.3s; }
.slide.in .facts > div:nth-child(2) { transition-delay: 3.5s; }
.modal.open .modal-body .button { transition-delay: 3.4s, 3.4s, 0s; }
