/* ==========================================================================
   Landing E-Formulir SIM, versi 2 (resources/views/landing-page/v2.blade.php).
   Malam di Satpas: latar hampir hitam, satu aksen kuning dari logo E-FORM SIM,
   merah-biru hanya sebagai cahaya rotator di dunia 3D (public/js/landing-3d.js).
   ========================================================================== */
:root {
    --bg: #04070d;
    --bg-2: #0a1220;
    --navy: #0f2a4a;
    --ink: #0e1f33;
    --text: #eef2f7;
    --muted: #93a2b7;
    --rule: rgb(255 255 255 / .14);
    --accent: #f2b31f;
    --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
    --gutter: clamp(20px, 5vw, 72px);
    --max: 1280px;
    --ease: cubic-bezier(.2, .75, .15, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: .9; text-transform: uppercase; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--accent); color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 6px; }
.skip:focus { top: 12px; }

/* Kanvas 3D menempel di belakang hero dan alur; bagian sesudahnya menutupinya. */
#stage { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 0 26px; font: 600 18px/1.2 var(--sans); color: var(--ink); text-decoration: none; background: var(--accent); border-radius: 6px; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .2); transition: transform .2s var(--ease), background-color .2s ease; }
.btn:hover { background: #f7c443; }
.btn:hover svg { transform: translateX(4px); }
.btn svg { flex: none; transition: transform .25s var(--ease); }
.btn:active { transform: translateY(1px); }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* ---------- Kepala halaman ---------- */
.top { position: absolute; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-logos { display: flex; gap: 8px; }
.brand-logos img { width: 34px; height: 34px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font: 700 21px var(--display); letter-spacing: .02em; text-transform: uppercase; }
.brand-name span { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top-cta { display: none; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 600; text-decoration: none; border: 1px solid rgb(255 255 255 / .4); border-radius: 6px; }
.top-cta:hover { border-color: #fff; }
@media (min-width: 720px) { .top-cta { display: inline-flex; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; display: grid; align-content: end; min-height: max(640px, 100svh); padding: 120px var(--gutter) 28px; }
.hero-copy { position: relative; z-index: 2; max-width: 100%; }
.hero-kicker { max-width: 34em; margin-bottom: 18px; font: 500 12px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mega { font-size: clamp(58px, 15.5vw, 150px); letter-spacing: -.005em; line-height: .84; }
.mega .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.mega .line > span { display: inline-block; white-space: nowrap; }
.mega b { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 28px; }
.hero-actions .btn { width: 100%; }
@media (min-width: 560px) { .hero-actions .btn { width: auto; } }

.hero-note { position: relative; z-index: 2; max-width: 46em; margin-top: 30px; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent); font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.hero-note b, .hero-note strong { color: var(--text); font-weight: 600; }

/* Kode QR datar: hanya dipakai kalau dunia 3D tidak hidup. */
.hero-qr { margin: 0; }
.qr-svg { display: block; width: min(300px, 62vw); border-radius: 10px; }
.qr-caption { font-size: 15px; color: var(--muted); text-align: center; }
.qr-caption span { display: block; margin-top: 2px; font: 500 12px var(--mono); letter-spacing: .06em; color: var(--text); }
.js:not(.no-3d) .qr-svg { display: none; }
.js:not(.no-3d) .qr-caption { position: absolute; z-index: 2; left: var(--cx, 75%); top: var(--cy, 80%); transform: translate(-50%, 14px); white-space: nowrap; transition: opacity .5s ease; }
.js:not(.no-3d) .qr-caption.is-gone { opacity: 0; }
.no-3d .hero-qr { order: -1; justify-self: start; margin-bottom: 28px; }
.no-3d .qr-caption { margin-top: 10px; text-align: left; }
@media (max-width: 899px) { .js:not(.no-3d) .qr-caption { display: none; } }

@media (min-width: 900px) {
    .hero { padding-bottom: 40px; }
    .hero-copy { max-width: 52%; }
    .mega { font-size: clamp(64px, 8.6vw, 158px); }
    .no-3d .hero { grid-template-columns: 1fr auto; align-items: end; column-gap: 48px; }
    .no-3d .hero-qr { order: 0; grid-row: 1; grid-column: 2; margin: 0; }
    .no-3d .hero-note { grid-column: 1 / -1; }
}
/* Layar HP: ruang di atas untuk kode QR 3D. */
@media (max-width: 899px) {
    .js:not(.no-3d) .hero { padding-top: 46svh; }
}

/* Masuk: baris judul naik dari balik masker, sisanya menyusul. */
.js .hero .mega .line > span { transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(.35s + var(--i) * .09s); }
.js .hero.is-ready .mega .line > span { transform: none; }
.js .hero-kicker, .js .hero .hero-actions, .js .hero-note { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .9s var(--ease); }
.js .hero.is-ready .hero-kicker { opacity: 1; transform: none; transition-delay: .2s; }
.js .hero.is-ready .hero-actions { opacity: 1; transform: none; transition-delay: .8s; }
.js .hero.is-ready .hero-note { opacity: 1; transform: none; transition-delay: 1s; }

/* Satu lapisan bayangan tetap di atas kanvas (kiri di layar lebar, bawah di HP), supaya teks di atas
   foto malam selalu terbaca. Tetap, bukan per bagian: lapisan per bagian membentuk tepi keras saat
   bagian yang menempel mulai tergulir. */
.has-3d body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(0deg, rgb(4 7 13 / .94), rgb(4 7 13 / .62) 42%, transparent 64%); }
@media (min-width: 900px) { .has-3d body::after { background: linear-gradient(90deg, rgb(4 7 13 / .88), rgb(4 7 13 / .5) 46%, transparent 66%); } }

/* ==========================================================================
   Alur: dengan gerak, bagian ini menempel sementara dunia 3D bercerita.
   ========================================================================== */
.journey { position: relative; }
.journey-pin { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 72px var(--gutter); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 48px; }
.step-num { display: block; font: 500 14px var(--mono); letter-spacing: .08em; color: var(--accent); }
.step-num i { font-style: normal; color: var(--muted); }
.step h3 { margin-top: 12px; font-size: clamp(46px, 11vw, 112px); line-height: .86; }
.step h3 > span { display: inline-block; }
.step p { max-width: 26em; margin-top: 16px; font-size: 18px; color: var(--muted); }
.step .link { margin-top: 10px; }
.rail { display: none; }

.has-motion .journey { height: 420vh; }
.has-motion .journey-pin { position: sticky; top: 0; height: 100svh; display: grid; align-content: end; padding-block: 0 40px; overflow: hidden; }
.has-motion .steps { position: relative; display: block; min-height: 15.5em; }
.has-motion .step { position: absolute; inset: auto 0 0 0; pointer-events: none; }
.has-motion .step-num, .has-motion .step p, .has-motion .step .link { opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .5s var(--ease); }
.has-motion .step h3 { overflow: hidden; padding-bottom: .04em; }
.has-motion .step h3 > span { transform: translateY(105%); transition: transform .6s var(--ease); }
.has-motion .step.is-active { pointer-events: auto; }
.has-motion .step.is-active h3 > span { transform: none; transition-delay: .05s; }
.has-motion .step.is-active .step-num { opacity: 1; transform: none; }
.has-motion .step.is-active p, .has-motion .step.is-active .link { opacity: 1; transform: none; transition-delay: .15s; }
.has-motion .rail { position: relative; display: block; height: 2px; margin-top: 28px; background: var(--rule); }
.has-motion .rail span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--jp, 0)); }
@media (min-width: 900px) {
    .has-motion .journey-pin { align-content: center; padding-block: 0; }
    .has-motion .steps, .has-motion .rail { max-width: 46%; }
    .has-motion .steps { min-height: 17em; }
    .has-motion .step { inset: 50% 0 auto 0; transform: translateY(-50%); }
    .step h3 { font-size: clamp(64px, 7.6vw, 132px); }
}
@media (max-width: 899px) { .has-motion .step p { font-size: 16px; } .has-motion .steps { min-height: 13.5em; } }
/* Di HP, tombol menempel menutupi 80 px terbawah. */
@media (max-width: 719px) { .has-motion .journey-pin { padding-bottom: 104px; } }

/* ==========================================================================
   Golongan SIM: dengan gerak, menempel; kartu dan hurufnya ada di dunia 3D.
   ========================================================================== */
.classes { position: relative; }
.classes-pin { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 96px var(--gutter) 72px; }
.classes-title { font-size: clamp(52px, 12vw, 132px); }
.source { margin-top: 24px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.g-chip { min-width: 58px; min-height: 50px; padding: 0 14px; font: 700 24px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--text); background: rgb(4 7 13 / .4); border: 1px solid rgb(255 255 255 / .22); border-radius: 6px; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease); }
.g-chip:hover { border-color: #fff; }
.g-chip[aria-pressed="true"] { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.g-chip:active { transform: translateY(1px); }
.g-desc { max-width: 26em; min-height: 3.3em; margin-top: 22px; font-size: 19px; line-height: 1.55; color: var(--text); }
.g-static { display: grid; gap: 20px; margin: 32px 0 0; }
.g-static div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.g-static dt { font: 700 40px/1 var(--display); color: var(--accent); text-transform: uppercase; }
.g-static dd { margin: 0; color: var(--muted); }
.g-rail { display: none; }
html:not(.has-motion) .g-list, html:not(.has-motion) .g-desc { display: none; }
.has-motion .g-static { display: none; }

.has-motion .classes { height: 380vh; }
.has-motion .classes-pin { position: sticky; top: 0; height: 100svh; display: grid; align-content: end; padding-block: 0 40px; overflow: hidden; }
.has-motion .classes-copy { position: relative; }
.has-motion .g-rail { position: relative; display: block; height: 2px; margin-top: 24px; background: var(--rule); }
.has-motion .g-rail span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--gp, 0)); }
@media (min-width: 900px) {
    .has-motion .classes-pin { align-content: center; padding-block: 0; }
    .has-motion .classes-copy, .has-motion .g-rail { max-width: 42%; }
    .classes-title { font-size: clamp(64px, 7.6vw, 132px); }
}
@media (max-width: 899px) {
    .has-motion .classes-title { font-size: clamp(44px, 12vw, 72px); }
    .has-motion .g-list { margin-top: 18px; gap: 6px; }
    .has-motion .g-chip { min-width: 50px; min-height: 46px; font-size: 21px; padding: 0 11px; }
    .has-motion .g-desc { margin-top: 14px; font-size: 16px; min-height: 4.7em; }
    .has-motion .source { margin-top: 10px; }
}
@media (max-width: 719px) { .has-motion .classes-pin { padding-bottom: 104px; } }

/* ==========================================================================
   Penutup: dengan gerak, kubus kembali menjadi kode QR di atas [data-end-slot].
   ========================================================================== */
.closing { position: relative; padding-block: 112px; }
.closing .wrap { display: grid; gap: 40px; align-items: center; }
.mega--closing { font-size: clamp(64px, 16vw, 200px); }
.closing-lead { max-width: 34em; margin-top: 22px; color: var(--muted); }
.closing-qr { margin: 0; justify-self: start; }
.qr-slot { width: min(300px, 64vw); aspect-ratio: 1; }
.qr-slot svg { display: block; width: 100%; height: 100%; border-radius: 8px; }
.closing-qr figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.closing-qr figcaption span { display: block; font: 500 12px var(--mono); letter-spacing: .06em; color: var(--text); }
.has-motion .qr-slot svg { visibility: hidden; }
@media (min-width: 900px) {
    .closing { min-height: 100svh; display: grid; align-content: center; }
    .closing .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; }
    .closing-qr { grid-column: 2; grid-row: 1; justify-self: end; text-align: center; }
    .qr-slot { width: clamp(260px, 26vw, 380px); }
    .mega--closing { font-size: clamp(80px, 10vw, 190px); white-space: nowrap; }
}
@media (max-width: 899px) {
    html:not(.has-motion) .closing-qr { display: none; }
    .has-motion .closing-qr { justify-self: center; text-align: center; }
    .has-motion .closing-qr figcaption { display: none; }
}

/* Tanpa dunia 3D yang bergerak, bagian-bagian ini menutupi kanvas dengan latar sendiri. */
html:not(.has-motion) .journey, html:not(.has-motion) .classes, html:not(.has-motion) .closing { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--rule); }

/* ---------- Kaki ---------- */
.foot { padding-block: 48px 120px; font-size: 15px; color: var(--muted); background: #020409; border-top: 1px solid var(--rule); }
.foot .wrap { display: grid; gap: 24px; }
.foot strong { color: var(--text); font-weight: 600; }
.foot img { width: 140px; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 18px; border-top: 1px solid var(--rule); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 720px) { .foot { padding-bottom: 48px; } .foot .wrap { grid-template-columns: auto 1fr; column-gap: 48px; } .foot-meta { grid-column: 1 / -1; } }

/* ---------- Muncul saat digulir ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Tombol menempel di HP ---------- */
.sticky-cta { position: fixed; inset: auto 0 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgb(4 7 13 / .92); border-top: 1px solid var(--rule); transform: translateY(110%); transition: transform .3s var(--ease); }
.sticky-cta .btn { width: 100%; }
.sticky-cta.is-visible { transform: none; }
@media (min-width: 720px) { .sticky-cta { display: none; } }

/* ---------- Kurangi gerakan ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .hero .mega .line > span, .js .hero-kicker, .js .hero .hero-actions, .js .hero-note, .js .reveal { opacity: 1; transform: none; transition: none; }
}
