/* =========================================================
   Wibowo Prasetya, Notaris dan PPAT (konsep)
   Tinta dan segel: hijau botol, kertas tua, kuningan
   ========================================================= */

:root {
  --green: #0e2a24;
  --green-2: #163a32;
  --green-3: #1f4a40;
  --paper: #e9ddc4;
  --ink: #17140f;
  --ink-soft: rgba(23, 20, 15, 0.72);
  --cream: #f3ead6;
  --brass: #b8924a;
  --brass-light: #d9b56c;
  --wax: #7a3128;
  --blue-ink: #1b2a55;
  --wash: linear-gradient(rgba(242, 233, 212, 0.55), rgba(242, 233, 212, 0.55));

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad-x: clamp(24px, 5.5vw, 96px);
  --pad-top: clamp(96px, 13vh, 136px);
  --pad-bottom: clamp(32px, 6vh, 72px);
  --ease: cubic-bezier(0.2, 0.75, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 960px) and (min-height: 620px) {
  html { scroll-snap-type: y proximity; }
  main > section { scroll-snap-align: start; }
}

body {
  margin: 0;
  background: var(--green);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }
main > section[data-theme="light"] :focus-visible { outline-color: var(--wax); }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 3.7vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
}

main > section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

main > section[data-theme="dark"] {
  background: var(--green);
  color: var(--cream);
}

main > section[data-theme="light"] {
  background-color: var(--paper);
  background-image: var(--wash), url("../assets/paper.webp");
  background-size: auto, cover;
  background-position: center;
  color: var(--ink);
}

/* ---------- tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn:active { transform: translateY(1px); }
.btn-brass { background: var(--brass-light); color: var(--green); }
.btn-brass:hover { background: #ecca85; }
.btn-ghost { border-color: rgba(243, 234, 214, 0.5); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--brass-light); color: var(--brass-light); }
.btn-ink { background: var(--green); color: var(--cream); }
.btn-ink:hover { background: var(--green-3); }

/* ---------- penanda gulir ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--brass-light);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- navigasi ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
  padding: 0 var(--pad-x);
  transition: background 0.4s, color 0.4s, height 0.4s;
}
.nav[data-theme="dark"] { color: var(--cream); }
.nav[data-theme="light"] { color: var(--ink); }
.nav.scrolled { height: 64px; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.nav.scrolled[data-theme="dark"] { background: rgba(14, 42, 36, 0.8); }
.nav.scrolled[data-theme="light"] { background: rgba(233, 221, 196, 0.84); }

.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { width: 36px; height: 36px; }
.nav-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand strong { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.nav-brand small { font-size: 12.5px; opacity: 0.75; }

.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 34px); font-size: 15.5px; }
.nav-links a:not(.btn) { position: relative; padding: 6px 0; text-decoration: none; opacity: 0.88; }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-cta { min-height: 42px; padding: 0 22px; font-size: 15px; }
.nav[data-theme="light"] .nav-cta { background: var(--green); color: var(--cream); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav.open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 1060px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    background: var(--green);
    color: var(--cream);
    font-family: var(--serif);
    font-size: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0s 0.4s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav.open { color: var(--cream); }
  .nav-links .nav-cta { margin-top: 12px; font-family: var(--sans); font-size: 16px; background: var(--brass-light) !important; color: var(--green) !important; }
}

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -6%;
  z-index: -4;
  background: url("../assets/desk.webp") center / cover no-repeat;
  opacity: 0;
  transform: translate3d(calc(var(--mx, 0) * -28px), calc(var(--my, 0) * -18px), 0) scale(1.08);
  will-change: transform;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(14, 42, 36, 0.96) 0%, rgba(14, 42, 36, 0.74) 46%, rgba(14, 42, 36, 0.4) 100%),
    radial-gradient(ellipse at 72% 50%, rgba(14, 42, 36, 0) 30%, rgba(14, 42, 36, 0.75) 100%);
}

.motes { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 4.9vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(20px, 3.4vh, 36px);
}

@media (min-width: 961px) {
  .hero .line { white-space: nowrap; }
}

.hero .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero .line > span { display: block; }

.hero-lede {
  max-width: 46ch;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.6;
  color: rgba(243, 234, 214, 0.86);
  margin-bottom: clamp(22px, 4vh, 40px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* kondisi awal sebelum animasi diputar */
.js .hero .line > span { transform: translateY(112%); }
.js .hero-lede, .js .hero-actions { opacity: 0; }

.hero.play .line > span { animation: rise 1s var(--ease) forwards; }
.hero.play .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero.play .line:nth-child(2) > span { animation-delay: 0.27s; }
.hero.play .line:nth-child(3) > span { animation-delay: 0.39s; }
.hero.play .hero-lede { animation: fade-up 0.9s 0.85s var(--ease) forwards; }
.hero.play .hero-actions { animation: fade-up 0.9s 1.0s var(--ease) forwards; }
.hero.play .hero-bg { animation: bg-in 2.8s var(--ease) forwards; }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bg-in { from { opacity: 0; filter: blur(10px); } to { opacity: 0.5; filter: blur(0); } }

/* ---- dokumen dan segel ---- */
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.hero-doc {
  position: relative;
  width: min(440px, 100%, 52vh);
  cursor: pointer;
  perspective: 1200px;
  transform: rotateY(calc(var(--mx, 0) * 9deg)) rotateX(calc(var(--my, 0) * -7deg));
  will-change: transform;
}
.hero-doc:focus-visible { outline-offset: 10px; }

.sheet {
  position: relative;
  width: 100%;
  aspect-ratio: 440 / 600;
  background-color: #efe5cf;
  background-image: linear-gradient(rgba(244, 236, 216, 0.4), rgba(244, 236, 216, 0.4)), url("../assets/paper.webp");
  background-size: auto, cover;
  background-position: center;
  border-radius: 3px;
  box-shadow:
    0 50px 90px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    inset 0 0 60px rgba(120, 90, 40, 0.18);
}
.js .sheet { opacity: 0; transform: translateY(70px) rotate(-9deg); }

.hero.play-doc .sheet {
  animation:
    sheet-in 1.2s 0.5s var(--ease) forwards,
    float 8s 1.8s ease-in-out infinite alternate;
}
.hero.play-doc .thump { animation: thump 0.45s 4.4s ease-out; }

@keyframes sheet-in { to { opacity: 1; transform: translateY(0) rotate(-3deg); } }
@keyframes float {
  from { opacity: 1; transform: translateY(0) rotate(-3deg); }
  to   { opacity: 1; transform: translateY(-9px) rotate(-2deg); }
}
@keyframes thump {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(7px) scale(0.992); }
  100% { transform: translateY(0) scale(1); }
}

.sheet-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.doc-title { font: 600 13.5px var(--serif); letter-spacing: 0.16em; fill: #2a241b; }
.doc-sub { font: 500 12px var(--sans); fill: rgba(42, 36, 27, 0.7); }
.doc-cap { font: 500 11.5px var(--sans); fill: rgba(42, 36, 27, 0.62); }

.doc-title, .doc-sub, .doc-cap { opacity: 0; }
.hero.play-doc .doc-title, .hero.play-doc .doc-sub { animation: fade 0.7s 0.8s ease forwards; }
.hero.play-doc .doc-cap { animation: fade 0.7s 2.1s ease forwards; }
@keyframes fade { to { opacity: 1; } }

.doc-rule, .doc-sign-line, .ln, .ink {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
}
.doc-rule { stroke: var(--brass); stroke-width: 1.4; }
.doc-sign-line { stroke: rgba(42, 36, 27, 0.5); stroke-width: 1.2; }
.ln { stroke: rgba(42, 36, 27, 0.5); stroke-width: 2.2; }
.ink { stroke: var(--blue-ink); stroke-width: 2.8; }

.hero.play-doc .doc-rule { animation: draw 0.8s 0.9s ease forwards; }
.hero.play-doc .doc-sign-line { animation: draw 0.6s 2.1s ease forwards; }
.hero.play-doc .ln { animation: draw 0.55s calc(1s + var(--i) * 0.07s) cubic-bezier(0.5, 0, 0.3, 1) forwards; }
.hero.play-doc .ink-1 { animation: draw 1.5s 2.2s cubic-bezier(0.45, 0.05, 0.4, 1) forwards; }
.hero.play-doc .ink-2 { animation: draw 0.5s 3.4s ease-out forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.seal-wrap {
  position: absolute;
  left: 56%;
  top: 62.5%;
  width: 36%;
  aspect-ratio: 1;
}
.seal-wrap img { width: 100%; height: 100%; }
.seal-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: url("../assets/seal.webp") center / contain no-repeat;
  mask: url("../assets/seal.webp") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 238, 200, 0.5) 50%, transparent 62%);
  background-size: 300% 100%;
  background-position: 130% 0;
  opacity: 0;
}
.js .seal-wrap { opacity: 0; transform: scale(2.4) rotate(-18deg); }

.hero.play-doc .seal-wrap { animation: seal-drop 0.8s 3.85s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
.hero.play-doc .seal-wrap::after { opacity: 1; animation: sheen 7s 6s ease-in-out infinite; }

@keyframes seal-drop {
  0%   { opacity: 0; transform: scale(2.4) rotate(-18deg); filter: drop-shadow(0 50px 30px rgba(0, 0, 0, 0.18)); }
  45%  { opacity: 1; }
  78%  { opacity: 1; transform: scale(0.94) rotate(2deg); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45)); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
}
@keyframes sheen {
  0%   { background-position: 130% 0; }
  22%  { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}

.shock {
  position: absolute;
  left: 56%;
  top: 62.5%;
  width: 36%;
  aspect-ratio: 1;
  border: 2px solid var(--brass);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.hero.play-doc .shock { animation: shock 1s 4.4s ease-out; }
@keyframes shock {
  0%   { opacity: 0.85; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(2.3); }
}

.hero-hint { font-size: 14px; color: rgba(243, 234, 214, 0.6); }

.hero-cue {
  position: absolute;
  left: var(--pad-x);
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: rgba(243, 234, 214, 0.72);
  text-decoration: none;
}
.hero-cue i {
  display: block;
  width: 1px;
  height: 46px;
  background: var(--brass-light);
  transform-origin: 50% 0;
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); }
  55%  { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* =========================================================
   2. PROFIL
   ========================================================= */
.profil {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}

.profil-photo { position: relative; overflow: hidden; min-height: 100svh; }
.profil-photo img {
  position: absolute;
  left: 0; top: -6%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.profil-photo::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(217, 181, 108, 0.85);
  pointer-events: none;
}

.profil-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  max-width: 780px;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom) clamp(32px, 5vw, 88px);
}
.profil-body h2 { max-width: 17ch; margin-bottom: 4px; }
.profil-body > p { max-width: 56ch; font-size: 18px; }

.ledger { margin-top: 6px; border-top: 1px solid rgba(23, 20, 15, 0.2); }
.ledger > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(23, 20, 15, 0.2);
  font-size: 16px;
}
.ledger dt { color: var(--ink-soft); }
.ledger dd { font-weight: 500; }

.profil-sign { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.profil-sign svg { width: 150px; height: auto; overflow: visible; }
.profil-sign p { display: flex; flex-direction: column; line-height: 1.35; font-size: 15px; color: var(--ink-soft); }
.profil-sign strong { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); }
.profil.in .ink-1 { animation: draw 1.6s 0.3s cubic-bezier(0.45, 0.05, 0.4, 1) forwards; }
.profil.in .ink-2 { animation: draw 0.5s 1.7s ease-out forwards; }

/* =========================================================
   3. LAYANAN
   ========================================================= */
.layanan { display: flex; flex-direction: column; }

.layanan-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: var(--pad-top) var(--pad-x) 26px;
}
.layanan-head p { max-width: 32ch; color: rgba(243, 234, 214, 0.78); }

.panels { flex: 1; display: flex; min-height: min(560px, 64svh); }

.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid rgba(217, 181, 108, 0.35);
  cursor: pointer;
  transition: flex-grow 0.85s var(--ease);
  outline-offset: -4px;
}
.panel:first-child { border-left: 0; }
.panel.is-open { flex-grow: 5.2; cursor: default; }

.panel-bg {
  position: absolute;
  inset: 0;
  background: var(--img) center / cover no-repeat;
  filter: saturate(0.75);
  transform: scale(1.12);
  transition: transform 1.5s var(--ease);
}
.panel.is-open .panel-bg { transform: scale(1); }

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 42, 36, 0.5) 0%, rgba(14, 42, 36, 0.93) 100%);
  transition: background 0.7s;
}
.panel.is-open::after {
  background: linear-gradient(180deg, rgba(14, 42, 36, 0.2) 0%, rgba(14, 42, 36, 0.92) 78%);
}

.panel-seal .panel-bg { background: radial-gradient(circle at 70% 36%, var(--green-3), var(--green)); filter: none; }
.panel-seal .panel-bg::before {
  content: "";
  position: absolute;
  right: 8%; top: 12%;
  width: min(300px, 56%);
  aspect-ratio: 1;
  background: url("../assets/seal.webp") center / contain no-repeat;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.5));
}
.panel-paper .panel-bg { filter: saturate(0.9); }

.t-v {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.35s;
}
.panel.is-open .t-v { opacity: 0; }

.p-body {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 3vw, 48px);
  bottom: clamp(24px, 5vh, 52px);
  width: min(470px, 38vw);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
}
.panel.is-open .p-body {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.6s 0.3s, transform 0.8s 0.3s var(--ease);
}
.p-body h3 { font-size: clamp(28px, 2.8vw, 44px); margin-bottom: 12px; }
.p-body p { max-width: 46ch; font-size: 16.5px; line-height: 1.6; color: rgba(243, 234, 214, 0.9); }
.p-body ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; }
.p-body li { padding: 5px 14px; border: 1px solid rgba(217, 181, 108, 0.6); border-radius: 999px; font-size: 14.5px; }
.p-link { color: var(--brass-light); font-weight: 600; text-underline-offset: 5px; }

/* =========================================================
   4. ALUR
   ========================================================= */
.alur {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 6vh, 64px);
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
}

.alur-head { position: relative; z-index: 1; display: grid; gap: 12px; max-width: 760px; }
.alur-head p { color: var(--ink-soft); }

.track { position: relative; z-index: 1; }
.track-line { position: absolute; left: 0; top: 0; width: 100%; height: 80px; overflow: visible; }
.track-base { fill: none; stroke: rgba(23, 20, 15, 0.22); stroke-width: 1.5; }
.track-ink {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 3s cubic-bezier(0.45, 0.05, 0.3, 1);
}
.alur.in .track-ink { stroke-dashoffset: 0; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); }
.steps li { position: relative; padding: 72px 8px 0; text-align: center; }

.node {
  position: absolute;
  left: 50%; top: 40px;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid rgba(23, 20, 15, 0.35);
  transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
  transition-delay: calc(0.3s + var(--s) * 0.6s);
}
.alur.in .node {
  background: var(--wax);
  border-color: var(--wax);
  box-shadow: 0 0 0 7px rgba(122, 49, 40, 0.16);
}

.step-no {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1;
  color: var(--green);
  margin-bottom: 8px;
}
.steps h3 { font-size: clamp(18px, 1.5vw, 24px); margin-bottom: 10px; white-space: nowrap; }
.steps p { max-width: 27ch; margin: 0 auto 12px; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.steps small { font-size: 14px; font-weight: 600; color: var(--green); }

.js .alur:not(.in) .steps li > :not(.node) { opacity: 0.3; }
.steps li > :not(.node) { transition: opacity 0.7s; transition-delay: calc(0.3s + var(--s) * 0.6s); }

/* =========================================================
   5. DOKUMEN
   ========================================================= */
.dok { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }

.dok-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: var(--pad-top) clamp(24px, 4vw, 72px) var(--pad-bottom) var(--pad-x);
}
.dok-side > p { max-width: 42ch; color: rgba(243, 234, 214, 0.8); }

.tabs { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid rgba(217, 181, 108, 0.3); }
.tab {
  position: relative;
  padding: 11px 0 11px 22px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(217, 181, 108, 0.3);
  color: rgba(243, 234, 214, 0.6);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.3s, padding 0.45s var(--ease);
}
.tab::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 2px;
  background: var(--brass-light);
  transition: width 0.45s var(--ease);
}
.tab:hover { color: var(--cream); }
.tab[aria-selected="true"] { color: var(--cream); padding-left: 48px; }
.tab[aria-selected="true"]::before { width: 30px; }

.dok-paper {
  display: flex;
  align-items: center;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom) clamp(24px, 4vw, 72px);
  background-color: var(--paper);
  background-image: var(--wash), url("../assets/paper.webp");
  background-size: auto, cover;
  background-position: center;
  color: var(--ink);
}
.dok-card { position: relative; width: 100%; max-width: 640px; }

.dok-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.dok-head h3 { font-size: clamp(26px, 2.6vw, 38px); outline: none; }

.meter { position: relative; flex: none; display: grid; place-items: center; width: 64px; height: 64px; }
.meter svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.meter-bg { fill: none; stroke: rgba(23, 20, 15, 0.15); stroke-width: 5; }
.meter-fg {
  fill: none;
  stroke: var(--wax);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 163.4;
  transition: stroke-dashoffset 0.6s var(--ease);
}
.meter-text { position: relative; font: 600 14px/1 var(--sans); }
.meter svg, .meter-text { transition: opacity 0.3s; }
.meter-seal {
  position: absolute;
  inset: -10px;
  width: 84px; height: 84px;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  transform: scale(2) rotate(-14deg);
}
.dok-card.is-complete .meter svg,
.dok-card.is-complete .meter-text { opacity: 0; }
.dok-card.is-complete .meter-seal { animation: stamp-in 0.7s cubic-bezier(0.6, 0, 0.2, 1.3) forwards; }
@keyframes stamp-in {
  0%   { opacity: 0; transform: scale(2.2) rotate(-14deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.checks li { border-bottom: 1px solid rgba(23, 20, 15, 0.16); }
.check {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px 4px;
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.box {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin-top: 2px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  transition: background 0.3s, border-color 0.3s;
}
.box svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.45s 0.08s var(--ease);
}
.check input:checked + .box { background: var(--green); border-color: var(--green); }
.check input:checked + .box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .box { outline: 2px solid var(--wax); outline-offset: 3px; }

.c-text strong { display: block; font-weight: 600; font-size: 17px; line-height: 1.35; transition: color 0.3s; }
.c-text small { display: block; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.check input:checked ~ .c-text strong { color: rgba(23, 20, 15, 0.5); text-decoration: line-through; text-decoration-color: var(--wax); text-decoration-thickness: 1.5px; }

.dok-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; }
.dok-foot p { max-width: 34ch; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.dok-foot .btn { flex: none; }

/* =========================================================
   6. ARTIKEL
   ========================================================= */
.art { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: stretch; }

.art-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: var(--pad-top) clamp(24px, 3vw, 56px) var(--pad-bottom) var(--pad-x);
}
.art-head p { max-width: 34ch; color: var(--ink-soft); }

.art-list { display: flex; flex-direction: column; padding-top: 64px; border-left: 1px solid rgba(23, 20, 15, 0.2); }
.art-list li { display: flex; flex: 1; border-top: 1px solid rgba(23, 20, 15, 0.2); }
.art-list li:first-child { border-top: 0; }

.art-list a {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad-x) 0 clamp(24px, 3vw, 56px);
  overflow: hidden;
  text-decoration: none;
}
.art-list a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease);
}
.art-list a:hover::before,
.art-list a:focus-visible::before { transform: scaleY(1); }

.art-list a > * { position: relative; transition: color 0.35s, transform 0.5s var(--ease); }
.art-cat { font-size: 15px; color: var(--ink-soft); }
.art-title { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.15; max-width: 22ch; }
.art-time { font-size: 14.5px; color: var(--ink-soft); white-space: nowrap; }

.art-list a:hover .art-title,
.art-list a:focus-visible .art-title { color: var(--cream); transform: translateX(10px); }
.art-list a:hover .art-cat, .art-list a:hover .art-time,
.art-list a:focus-visible .art-cat, .art-list a:focus-visible .art-time { color: var(--brass-light); }

.art-preview {
  position: fixed;
  left: 0; top: 0;
  z-index: 40;
  width: 280px;
  aspect-ratio: 16 / 10;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s, clip-path 0.55s var(--ease);
}
.art-preview.on { opacity: 1; clip-path: inset(0); }
.art-preview img { width: 100%; height: 100%; object-fit: cover; }

@media (hover: none) { .art-preview { display: none; } }

/* =========================================================
   7. TANYA JAWAB
   ========================================================= */
.faq { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }

.faq-seal {
  position: absolute;
  left: -12vw;
  bottom: -17vw;
  width: min(54vw, 780px);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
  animation: sway 14s ease-in-out infinite alternate;
}
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

.faq-head {
  position: relative;
  z-index: 1;
  align-self: start;
  display: grid;
  gap: 16px;
  padding: var(--pad-top) 32px 0 var(--pad-x);
}
.faq-head p { max-width: 36ch; color: rgba(243, 234, 214, 0.8); }

.faq-list { position: relative; z-index: 1; padding: var(--pad-top) var(--pad-x) var(--pad-bottom) 0; }
.faq-item { border-bottom: 1px solid rgba(217, 181, 108, 0.3); }
.faq-item:first-child { border-top: 1px solid rgba(217, 181, 108, 0.3); }

.faq-item button {
  position: relative;
  display: block;
  width: 100%;
  padding: 18px 48px 18px 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.25;
  transition: color 0.3s;
}
.faq-item button:hover { color: var(--brass-light); }
.faq-item button::before, .faq-item button::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 18px; height: 2px;
  margin-top: -1px;
  background: var(--brass-light);
  transition: transform 0.45s var(--ease);
}
.faq-item button::after { transform: rotate(90deg); }
.faq-item.open button::after { transform: rotate(0deg); }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { max-width: 58ch; padding: 0 48px 22px 0; font-size: 16.5px; line-height: 1.65; color: rgba(243, 234, 214, 0.84); }

/* =========================================================
   8. KONTAK
   ========================================================= */
.kontak { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); grid-template-rows: 1fr auto; }

.kontak-form {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: var(--pad-top) clamp(24px, 4vw, 72px) 28px var(--pad-x);
}
.kontak-form > p { max-width: 46ch; color: var(--ink-soft); }

#form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; max-width: 640px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 2px; }
.field:nth-child(n + 3) { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 0 10px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(23, 20, 15, 0.45);
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field textarea { resize: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 1.5px 0 var(--green); }
#form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 14px; }
.form-error { grid-column: 1 / -1; font-size: 14.5px; color: var(--wax); font-weight: 500; }

.sent {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: var(--pad-top) clamp(24px, 4vw, 72px) 28px var(--pad-x);
  background-color: var(--paper);
  background-image: var(--wash), url("../assets/paper.webp");
  background-size: auto, cover;
  background-position: center;
}
.sent img { width: 130px; height: 130px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.3)); animation: stamp-in 0.7s cubic-bezier(0.6, 0, 0.2, 1.3) both; }
.sent h3 { font-size: clamp(28px, 3vw, 44px); }
.sent p { max-width: 40ch; color: var(--ink-soft); margin-bottom: 8px; }

.kontak-info { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--green); color: var(--cream); }
.map { flex: none; width: 100%; height: 40%; min-height: 200px; }
.pin-pulse { transform-origin: 300px 172px; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(3.2); } }

.info-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 26px var(--pad-x) 28px clamp(24px, 3.5vw, 56px);
}
.info-body address { font-style: normal; line-height: 1.55; }
.info-body address strong { display: block; margin-bottom: 6px; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; }
.info-body dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(217, 181, 108, 0.3);
  font-size: 15.5px;
}
.info-body dt { color: rgba(243, 234, 214, 0.7); }
.info-body .btn { align-self: flex-start; }

.foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--pad-x);
  background: var(--green-2);
  color: rgba(243, 234, 214, 0.75);
  font-size: 14px;
  line-height: 1.5;
}
.foot a { color: var(--brass-light); font-weight: 600; white-space: nowrap; }

/* =========================================================
   PANEL INFO KONSEP
   ========================================================= */
.infotab {
  --panel-w: min(340px, 82vw);
  position: fixed;
  right: 0; top: 50%;
  z-index: 55;
  display: flex;
  align-items: center;
  transform: translate(var(--panel-w), -50%);
  transition: transform 0.55s var(--ease);
}
.infotab.open { transform: translate(0, -50%); }

.infotab-btn {
  flex: none;
  padding: 18px 11px;
  background: var(--brass-light);
  color: var(--green);
  border: 0;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  font-size: 14.5px;
  writing-mode: vertical-rl;
  cursor: pointer;
  box-shadow: -4px 6px 20px rgba(0, 0, 0, 0.25);
}

.infotab-panel {
  width: var(--panel-w);
  max-height: 88svh;
  overflow: auto;
  padding: 26px 24px 28px;
  background: var(--green);
  color: var(--cream);
  box-shadow: -10px 14px 40px rgba(0, 0, 0, 0.4);
  visibility: hidden;
  transition: visibility 0s 0.55s;
}
.infotab.open .infotab-panel { visibility: visible; transition-delay: 0s; }

.info-back { display: inline-block; margin-bottom: 18px; color: var(--brass-light); font-weight: 600; text-underline-offset: 5px; }
.infotab-panel h3 { margin: 4px 0 10px; font-size: 20px; }
.infotab-panel ul { margin-bottom: 18px; }
.infotab-panel li { position: relative; padding: 5px 0 5px 26px; font-size: 15px; line-height: 1.45; }
.infotab-panel li::before { content: ""; position: absolute; left: 0; top: 50%; }
.inc li::before {
  width: 13px; height: 7px;
  margin-top: -6px;
  border-left: 2px solid var(--brass-light);
  border-bottom: 2px solid var(--brass-light);
  transform: rotate(-45deg);
}
.exc li { color: rgba(243, 234, 214, 0.72); }
.exc li::before { width: 12px; height: 2px; margin-top: -1px; background: rgba(243, 234, 214, 0.5); }

/* =========================================================
   LAYAR PENDEK (laptop kecil): rapatkan agar tetap satu layar
   ========================================================= */
@media (min-width: 961px) and (max-height: 800px) {
  :root { --pad-top: 84px; --pad-bottom: 24px; }

  .profil-body { gap: 12px; }
  .profil-body h2 { font-size: clamp(30px, 3.2vw, 46px); margin-bottom: 0; }
  .profil-body > p { font-size: 16.5px; line-height: 1.55; }
  .ledger { margin-top: 2px; }
  .ledger > div { padding: 7px 0; font-size: 15px; }
  .profil-sign { margin-top: 0; }
  .profil-sign svg { width: 110px; }

  .kontak-form { gap: 10px; }
  .kontak-form > p { font-size: 16px; line-height: 1.55; }
  #form { margin-top: 4px; }
  .field input, .field select, .field textarea { padding: 6px 0 8px; }
  #form .btn { margin-top: 10px; min-height: 46px; }
  .foot { padding-top: 12px; padding-bottom: 12px; }
}

/* =========================================================
   LAYAR KECIL
   ========================================================= */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-side { margin-top: 8px; }
  .hero-doc { width: min(340px, 78vw); }
  .hero-cue { display: none; }
  .hero-shade { background: linear-gradient(180deg, rgba(14, 42, 36, 0.9), rgba(14, 42, 36, 0.7)); }

  .profil { grid-template-columns: 1fr; }
  .profil-photo { min-height: 46svh; }
  .profil-body { padding: 40px var(--pad-x) 56px; max-width: none; }

  .layanan-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .panels { flex-direction: column; min-height: calc(100svh - 190px); }
  .panel { flex: 0 0 auto; min-height: 66px; border-left: 0; border-top: 1px solid rgba(217, 181, 108, 0.35); transition: flex-grow 0.85s var(--ease), min-height 0.7s var(--ease); }
  .panel:first-child { border-top: 0; }
  .panel.is-open { flex: 1 0 auto; min-height: 380px; }
  .t-v { writing-mode: horizontal-tb; left: 20px; bottom: auto; top: 20px; transform: none; font-size: 22px; }
  .p-body { left: 20px; right: 20px; width: auto; bottom: 22px; }

  .alur { padding-bottom: 56px; }
  .track-line { display: none; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; padding: 0 0 0 0; text-align: left; align-items: start; }
  .steps li .node { display: none; }
  .steps .step-no { grid-row: 1 / span 4; font-size: 44px; margin: 0; }
  .steps p { margin: 0 0 6px; max-width: 46ch; }

  .dok { grid-template-columns: 1fr; }
  .dok-side { padding-bottom: 32px; }
  .dok-paper { padding: 36px var(--pad-x) 56px; }
  .dok-foot { flex-direction: column; align-items: flex-start; }

  .art { grid-template-columns: 1fr; }
  .art-head { padding-bottom: 28px; }
  .art-list { padding-top: 0; border-left: 0; border-top: 1px solid rgba(23, 20, 15, 0.2); }
  .art-list a { grid-template-columns: 1fr; gap: 6px; padding: 22px var(--pad-x); }
  .art-list li { flex: none; }

  .faq { grid-template-columns: 1fr; align-items: start; }
  .faq-list { padding: 24px var(--pad-x) 220px; }
  .faq-seal { width: 70vw; left: -18vw; bottom: -22vw; opacity: 0.3; }

  .kontak { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .kontak-form { padding-bottom: 40px; }
  #form { grid-template-columns: 1fr; }
  .map { height: 200px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 6px; }

  .infotab-btn { padding: 14px 9px; font-size: 13.5px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .ledger > div { grid-template-columns: 1fr; gap: 2px; }
  .info-body dl > div { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Tab info konsep di layar sempit: pindah ke bawah agar tidak menutupi teks */
@media (max-width: 960px) {
  .infotab { top: auto; bottom: 16px; align-items: flex-end; transform: translate(var(--panel-w), 0); }
  .infotab.open { transform: translate(0, 0); }
  .infotab-panel { max-height: 70svh; border-radius: 14px 0 0 0; }
}

/* Tombol kembali ke atas: hanya tampil di HP */
.to-top { display: none; }

@media (max-width: 960px) {
  .to-top {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 45;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brass-light);
    color: var(--green);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.9);
    transition: opacity 0.35s, transform 0.45s var(--ease), visibility 0s 0.45s;
  }
  .to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  .to-top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .to-top:active { transform: scale(0.94); }
  .to-top:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
}
