/* Halaman depan CAIRN. Kanvas 3D tetap di belakang (z 0); hero & bab cerita transparan,
   bagian sesudahnya (.solid) berlatar pekat sehingga menutup kanvas. */

.stage { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; touch-action: pan-y; }
.stage-shade {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 72% 46%, rgba(7, 7, 7, 0) 30%, rgba(7, 7, 7, 0.55) 78%, rgba(7, 7, 7, 0.9) 100%),
    linear-gradient(90deg, rgba(7, 7, 7, 0.85) 0%, rgba(7, 7, 7, 0.35) 40%, rgba(7, 7, 7, 0) 62%);
}
main { position: relative; z-index: 2; }
.solid { position: relative; background: var(--bg); z-index: 3; }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 40px) 0 28px; }
.hero .contours { opacity: 0.045; mask-image: radial-gradient(70% 70% at 30% 45%, #000 30%, transparent 85%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 640px) 1fr; align-items: center; gap: 40px; }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.live-pill { color: var(--ink-2); }
.live-pill .sep { color: var(--ink-4); }
.live-pill:hover { border-color: rgba(237, 234, 227, 0.32); color: var(--ink); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-side { align-self: end; justify-self: start; grid-column: 1; }

.proof-strip {
  margin: 44px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.45); backdrop-filter: blur(8px);
}
.proof-strip > div { padding: 16px 18px 15px; border-left: 1px solid var(--line); min-width: 0; }
.proof-strip > div:first-child { border-left: 0; padding-left: 0; }
.proof-strip dt { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.proof-strip dd { margin: 8px 0 0; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proof-strip dd a { font-size: 14px; color: var(--accent); border-bottom: 1px solid rgba(200, 227, 154, 0.35); }

.scroll-cue { position: absolute; left: 50%; bottom: 14px; width: 22px; height: 34px; border: 1px solid var(--line-2); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; border-radius: 2px; background: var(--ink-2); transform: translateX(-50%); animation: turun 2s ease-in-out infinite; }
@keyframes turun { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 11px); } 100% { opacity: 0; } }

/* ---------------- bab cerita ---------------- */
.story { position: relative; }
.chapter { position: relative; height: 150vh; }
.chapter-card {
  position: sticky; top: calc(var(--nav-h) + 12vh);
  width: min(100%, 470px); padding: 26px 26px 24px; display: grid; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(10, 10, 9, 0.66); backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0.25; transform: translateY(14px); transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 0.84, 0.28, 1);
}
.chapter.is-active .chapter-card { opacity: 1; transform: none; }
.chapter-card p { margin: 0; color: var(--ink-2); }
.chapter-card .eyebrow b { color: var(--accent); }
.facts { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts li span { color: var(--ink-3); }
.facts li b { font-weight: 500; color: var(--ink); text-align: right; }
.story-end { height: 70vh; }

/* ---------------- bagian live ---------------- */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.sec-head .h2 { margin-top: 16px; }
/* ---------------- kepercayaan ---------------- */
.powers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.power-col { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.power-col ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.power-col li { display: grid; gap: 4px; padding: 16px 0 16px 26px; border-top: 1px solid var(--line); position: relative; }
.power-col li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.power-col.cannot li::before { border: 0; background: var(--accent); width: 9px; height: 9px; }
.power-col li b { font-weight: 500; color: var(--ink); }
.power-col li span { font-size: 14.5px; color: var(--ink-3); }
.power-col.cannot h3 { color: var(--accent); }
.limits { margin-top: 14px; padding: 26px; display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 26px 40px; align-items: start; }
.limits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.limits li { color: var(--ink-3); font-size: 15px; }
.limits li b { color: var(--ink); font-weight: 500; }
.limits .btn { grid-column: 2; justify-self: start; }

/* ---------------- kalkulator ---------------- */
.create-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.calc { padding: 26px; display: grid; gap: 20px; }
.calc label { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 14.5px; color: var(--ink-2); }
.calc output { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.calc input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 22px; }
.calc-out { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calc-out > div { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc-out dt { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.calc-out dd { margin: 8px 0 0; font-size: 20px; letter-spacing: -0.02em; }

.final { position: relative; padding: 140px 0 150px; text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.final .display { margin-bottom: 34px; }
.final .contours { opacity: 0.06; mask-image: radial-gradient(60% 70% at 50% 50%, #000 20%, transparent 80%); }

/* ---------------- layar sempit ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .proof-strip > div:nth-child(-n+2) { border-top: 0; }
  .proof-strip > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .proof-strip > div:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .coin-grid, .powers, .create-grid, .limits { grid-template-columns: 1fr; }
  .limits .btn { grid-column: 1; }
}
@media (max-width: 760px) {
  .stage-shade {
    background:
      linear-gradient(180deg, rgba(7, 7, 7, 0) 0%, rgba(7, 7, 7, 0) 48%, rgba(7, 7, 7, 0.8) 62%, rgba(7, 7, 7, 0.96) 76%);
  }
  .hero { justify-content: flex-end; padding-top: calc(var(--nav-h) + 46vh); }
  .hero .display { font-size: clamp(40px, 11.5vw, 56px); }
  .hero-copy { gap: 20px; }
  .scroll-cue { display: none; }
  .chapter { height: 135vh; }
  /* kartu menempel di dasar layar sejak bab dimulai (bukan muncul belakangan) */
  .chapter > .wrap { position: sticky; top: 0; height: 100svh; display: flex; align-items: flex-end; padding-bottom: 14px; }
  .chapter-card { position: relative; top: auto; width: 100%; padding: 20px; }
  .story-end { height: 50vh; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .calc-out { grid-template-columns: 1fr; }
}

/* ---------------- animasi masuk hero ---------------- */
.hero-copy > *, .hero-side, .proof-strip { opacity: 0; transform: translateY(18px); animation: masuk 1.1s cubic-bezier(0.16, 0.84, 0.28, 1) forwards; }
.hero-copy > :nth-child(1) { animation-delay: 0.35s; }
.hero-copy > :nth-child(2) { animation-delay: 0.5s; }
.hero-copy > :nth-child(3) { animation-delay: 0.7s; }
.hero-copy > :nth-child(4) { animation-delay: 0.85s; }
.hero-side { animation-delay: 1.05s; }
.proof-strip { animation-delay: 1.25s; }
.display .baris { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.display .baris > span { display: inline-block; transform: translateY(105%); animation: barisNaik 1.15s cubic-bezier(0.16, 0.84, 0.28, 1) forwards; }
.display .baris:nth-child(2) > span { animation-delay: 0.14s; }
@keyframes masuk { to { opacity: 1; transform: none; } }
@keyframes barisNaik { to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-side, .proof-strip, .display .baris > span { opacity: 1; transform: none; animation: none; }
}

/* kursor tangan saat di atas bola bumi; teks tak ikut terseleksi saat menyeret */
html.over-globe .hero, html.over-globe .story { cursor: grab; }
html.is-dragging-globe, html.is-dragging-globe * { cursor: grabbing !important; user-select: none !important; }
.hero, .story { touch-action: pan-y; }

/* ---------------- panel kaca hologram ---------------- */
.holo-hud { position: fixed; inset: 0; z-index: 2; pointer-events: none; transition: opacity 0.4s; }
.holo-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.holo-lines polyline { fill: none; stroke: rgba(207, 216, 255, 0.5); stroke-width: 1; stroke-dasharray: 3 4; animation: alir 1.6s linear infinite; }
.holo-lines circle { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
@keyframes alir { to { stroke-dashoffset: -14; } }
.holo-card, .holo-tag {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  background: linear-gradient(140deg, rgba(220, 226, 255, 0.11), rgba(220, 226, 255, 0.025) 60%);
  border: 1px solid rgba(207, 216, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 30px rgba(160, 175, 255, 0.05), 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35);
  color: var(--ink); will-change: transform; opacity: 0; transition: opacity 0.8s;
}
.holo-hud.is-ready .holo-card, .holo-hud.is-ready .holo-tag { opacity: 1; }
.holo-card { width: 236px; padding: 14px 16px 15px; border-radius: 16px; display: grid; gap: 10px; }
.holo-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%); }
.holo-k { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(207, 216, 255, 0.75); }
.holo-big { display: flex; align-items: baseline; gap: 8px; }
.holo-big b { font-weight: 500; font-size: 34px; letter-spacing: -0.03em; }
.holo-big span { font-size: 13px; color: var(--ink-3); }
.holo-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; align-items: end; height: 46px; }
.holo-bars div { display: grid; gap: 4px; justify-items: center; align-self: end; }
.holo-bars i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, var(--accent), rgba(200, 227, 154, 0.25)); min-height: 3px; }
.holo-bars span { font: 500 8.5px/1 var(--mono); color: var(--ink-4); letter-spacing: 0.04em; }
.holo-find { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.holo-find img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.holo-find b { display: block; font-weight: 500; font-size: 15px; }
.holo-find span { font-size: 12.5px; color: var(--ink-3); }
.holo-tag { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.holo-tag .mono { color: var(--ink); }
.holo-card:hover, .holo-tag:hover { border-color: rgba(207, 216, 255, 0.38); }
@media (max-width: 1100px) { .holo-card[data-card="find"], .holo-lines { display: none; } }
@media (max-width: 760px) { .holo-hud { display: none; } }
@media (prefers-reduced-motion: reduce) { .holo-lines polyline { animation: none; } }
.holo-find > .small { grid-column: 1 / -1; }
