/* ==========================================================================
   MARENOVA — stage2.css  (Tahap 2)
   Muat SETELAH css/style.css:
   <link rel="stylesheet" href="css/stage2.css">
   Isi: nav tambahan · hero halaman sub · Sustainability · Terms · Document Validator
   ========================================================================== */

/* ---------- A. NAV TAMBAHAN ---------- */
nav ul a[aria-current="page"] { color: var(--navy-900); }
nav ul a[aria-current="page"]::after { transform: scaleX(1); }

.btn.outline {
    background: transparent;
    border-color: var(--navy-900);
    color: var(--navy-900);
}
.btn.outline:hover {
    background: var(--navy-900);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(10, 31, 61, .5);
}
.btn.outline svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.btn-lg { padding: 18px 34px; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
nav .btn { white-space: nowrap; }
.logo { flex: none; }

/* menu lebih rapat karena kini ada 6 link + 2 tombol */
nav { gap: 20px; }
nav ul a { padding: 10px 11px; white-space: nowrap; }
nav ul a::after { left: 11px; right: 11px; }

@media (min-width: 1241px) {
    nav { gap: 12px; }
    nav ul a { padding: 10px 8px; font-size: .88rem; }
    nav ul a::after { left: 8px; right: 8px; }
    nav .btn.sm { padding: 10px 13px; font-size: .82rem; }
}

/* hamburger lebih awal (≤1240px) agar menu tidak sesak */
@media (max-width: 1240px) {
    .burger { display: flex; }
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 24px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 40px -20px rgba(10, 31, 61, .3);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .25s, transform .25s, visibility 0s linear .25s;
    }
    nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s, visibility 0s; }
    nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    nav ul a { padding: 15px 4px; border-bottom: 1px solid var(--line); }
    nav ul a::after { display: none; }
    nav ul a.on,
    nav ul a[aria-current="page"] { color: var(--gold-600); }
    nav .btn { width: 100%; margin-top: 20px; }
    nav .btn + .btn { margin-top: 12px; }
}

/* ---------- B. HERO HALAMAN SUB ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 88px);
    background:
        radial-gradient(900px 420px at 92% -10%, rgba(201, 162, 75, .18), transparent 60%),
        linear-gradient(180deg, var(--navy-900), var(--navy-950));
    color: #fff;
}
.page-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(201, 162, 75, 0) 60%);
}
.page-hero h1 { max-width: 18em; margin: 0 0 .4em; color: #fff; text-wrap: balance; }
.page-hero p { max-width: 60ch; margin: 0; color: #cdd9ec; font-size: clamp(1rem, 1.3vw, 1.18rem); }
.page-hero .cta { margin-top: 32px; }

.crumbs { margin: 0 0 26px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: #9fb1cc; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255, 255, 255, .3); }
.crumbs a { text-decoration: none; transition: color .2s; }
.crumbs a:hover { color: var(--gold-300); }
.crumbs [aria-current] { color: #fff; }

/* tata letak: daftar isi kiri + konten kanan */
.side-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}
.toc { position: sticky; top: 110px; }
.toc h2 { margin: 0 0 16px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.toc ul { border-left: 2px solid var(--line); }
.toc a {
    display: block;
    margin-left: -2px;
    padding: 8px 0 8px 18px;
    border-left: 2px solid transparent;
    color: var(--ink-soft);
    font-size: .93rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--navy-900); }
.toc a.is-active { border-left-color: var(--gold); color: var(--navy-900); font-weight: 700; }

@media (max-width: 960px) {
    .side-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .toc { position: static; }
    .toc ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; border-left: 0; scrollbar-width: thin; }
    .toc a { margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; white-space: nowrap; font-size: .85rem; }
    .toc a.is-active { border-color: var(--gold); background: var(--gold-100); }
}

/* ---------- C. SUSTAINABILITY ---------- */
.pledges { display: grid; gap: 24px; }
.pledge {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(28px, 3.4vw, 44px);
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 110px;
}
.pledge-icon {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    margin-bottom: 22px;
    border-radius: 14px;
    background: var(--navy-900);
    color: var(--gold-300);
}
.pledge-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pledge h2 { margin-bottom: .5em; font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
.pledge p { margin: 0; color: var(--ink-soft); }
.pledge-practice { align-self: start; padding: 26px; background: var(--ice); border-radius: var(--radius); }
.pledge-practice h3 { margin-bottom: 1em; color: var(--gold-600); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.pledge-practice ul { display: grid; gap: 14px; }
.pledge-practice li {
    position: relative;
    padding-left: 34px;
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.55;
}
.pledge-practice li::before {
    content: "";
    position: absolute;
    left: 0; top: 1px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--gold-100)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a98430' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
        center / 12px no-repeat;
}

.cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: clamp(28px, 4vw, 52px);
    background: var(--navy-900) radial-gradient(circle at 100% 0, rgba(201, 162, 75, .18), transparent 55%);
    border-radius: var(--radius);
    color: #fff;
}
.cta-band h2 { margin: 0 0 .3em; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.cta-band p { margin: 0; max-width: 52ch; color: #cfdbee; }

@media (max-width: 860px) { .pledge { grid-template-columns: 1fr; } }

/* ---------- D. TERMS & CONDITIONS (gaya dokumen legal) ---------- */
.legal-doc {
    counter-reset: sec;
    max-width: 840px;
    padding: clamp(28px, 5vw, 64px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: #1f2d44;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
    line-height: 1.85;
}
.doc-head { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 4px double var(--gold); }
.doc-kicker { margin: 0 0 10px; color: var(--gold-600); font: 700 .76rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase; }
.legal-doc .doc-head h2 { margin: 0 0 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; }
.doc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 28px; margin: 0; font-family: var(--font); }
.doc-meta dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.doc-meta dd { margin: 2px 0 0; color: var(--navy-900); font-size: .95rem; font-weight: 600; }

.notice {
    margin: 0 0 8px;
    padding: 16px 20px;
    background: var(--gold-100);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #4a3c14;
    font: 500 .92rem/1.6 var(--font);
}

.legal-doc section { counter-increment: sec; counter-reset: cl; margin-top: 44px; scroll-margin-top: 110px; }
.legal-doc section > h3 {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin: 0 0 .8em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    letter-spacing: 0;
}
.legal-doc section > h3::before { content: counter(sec) "."; flex: none; min-width: 1.6em; color: var(--gold-600); }

.clause { position: relative; margin: 0 0 1em; padding-left: 3.4em; counter-increment: cl; }
.clause::before {
    content: counter(sec) "." counter(cl);
    position: absolute;
    left: 0; top: .15em;
    color: var(--gold-600);
    font: 700 .86rem/1.9 var(--font);
}
.clause ol { margin: .6em 0 0; padding-left: 1.5em; list-style: lower-alpha; }
.clause ol li { margin-bottom: .4em; padding-left: .3em; }

.download-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 52px;
    padding: 28px 32px;
    background: var(--ice);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font);
}
.download-card h3 { margin: 0 0 .2em; font-size: 1.15rem; }
.download-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.btn .pdf-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media print {
    .topbar, .site-header, .footer, .toc, .page-hero .cta, .download-card, .crumbs { display: none !important; }
    .page-hero { padding: 0 0 16px; background: none; color: #000; }
    .page-hero h1, .page-hero p { color: #000; }
    .page-hero::after { display: none; }
    .legal-doc { max-width: none; padding: 0; border: 0; box-shadow: none; }
    .side-layout { display: block; }
}

/* ---------- E. DOCUMENT VALIDATOR (modal / <dialog>) ---------- */
html.vlock { overflow: hidden; }

.vdialog {
    width: min(660px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    background: #fff;
    border: 0;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.vdialog::backdrop { background: rgba(7, 23, 49, .74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vdialog[open] { animation: vpop .3s var(--ease); }
@keyframes vpop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.vhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 32px 8px; }
.veyebrow { margin: 0 0 6px; color: var(--gold-600); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.vhead h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.vclose {
    flex: none;
    width: 40px; height: 40px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink-soft);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.vclose:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* progress 1 → 2 → 3 */
.vsteps {
    --p: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 20px 32px 8px;
    padding: 0;
    list-style: none;
}
.vsteps::before,
.vsteps::after { content: ""; position: absolute; top: 17px; left: 16.666%; height: 3px; border-radius: 2px; }
.vsteps::before { right: 16.666%; background: var(--line); }
.vsteps::after { width: calc(66.666% * var(--p)); background: var(--gold); transition: width .45s var(--ease); }
.vsteps li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.vsteps b {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font-size: .9rem;
    transition: background .3s, border-color .3s, color .3s;
}
.vsteps li.is-active { color: var(--navy-900); }
.vsteps li.is-active b { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.vsteps li.is-done b { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }

.vpanels { padding: 12px 32px 32px; }
.vpanel[hidden] { display: none; }
.vpanel h3 { margin: 0 0 16px; font-size: 1.1rem; outline: 0; }

.vdrop {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 40px 24px;
    background: var(--ice);
    border: 2px dashed #c3cfe0;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.vdrop > * { pointer-events: none; }
.vdrop:hover,
.vdrop.is-over,
.vdrop:focus-within { background: var(--gold-100); border-color: var(--gold); }
.vdrop.has-file { background: #fff; border-style: solid; border-color: var(--gold); }
.vfile { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.vdrop-icon { width: 44px; height: 44px; margin-bottom: 6px; fill: none; stroke: var(--gold-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vdrop strong { color: var(--navy-900); font-size: 1.05rem; overflow-wrap: anywhere; }
.vdrop span { color: var(--muted); font-size: .88rem; }

.verror { min-height: 1.5em; margin: 12px 0 0; color: var(--danger); font-size: .9rem; font-weight: 500; }
.vactions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.vsummary { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vsummary div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; }
.vsummary div + div { border-top: 1px solid var(--line); }
.vsummary dt { color: var(--muted); font-size: .88rem; }
.vsummary dd { margin: 0; color: var(--navy-900); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.vnote { margin: 0; color: var(--muted); font-size: .92rem; }

.vloading { display: grid; justify-items: center; gap: 14px; padding: 36px 0; color: var(--muted); }
.vloading[hidden], .vresult[hidden] { display: none; }
.vloading p { margin: 0; }
.vspinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: vspin .9s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }

.vresult { display: grid; justify-items: center; text-align: center; padding-top: 8px; }
.vicon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; background: #e6f6ef; border-radius: 50%; color: #0b7a5a; font-size: 32px; font-weight: 800; }
.vresult.is-fail .vicon { background: #fdeceb; color: var(--danger); }
.vbadge { margin-bottom: 10px; padding: 3px 12px; background: var(--gold-100); border-radius: 999px; color: var(--gold-600); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.vbadge[hidden] { display: none; }
.vresult h4 { margin: 0 0 .4em; font-size: 1.25rem; }
.vresult p { max-width: 46ch; margin: 0 0 20px; color: var(--ink-soft); }
.vresult .vsummary { width: 100%; text-align: left; }

@media (max-width: 560px) {
    .vhead { padding: 22px 20px 4px; }
    .vsteps { margin: 16px 20px 4px; }
    .vpanels { padding: 8px 20px 24px; }
    .vdrop { padding: 32px 16px; }
    .vactions .btn { flex: 1 1 100%; }
}

.page-hero h1 .hl { color: var(--gold); }
