/* =========================================================
   VDC — Victory Disability Care
   Desain: hangat, aksesibel, dan dipercaya.
   Fraunces (judul, berkarakter) + Atkinson Hyperlegible (isi,
   dirancang khusus untuk keterbacaan low-vision).
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root {
    --paper: #f7f9fc;
    --card: #ffffff;
    --ink: #1f2a3c;
    --ink-soft: #56607a;
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-tint: #e8eefc;
    --gold: #eab308;
    --gold-tint: #fef7e0;
    --line: #dde3ee;
    --success-bg: #eef8ef;
    --success-border: #bfe3c4;
    --success-text: #245c30;
    --error-bg: #fdf0ee;
    --error-border: #f1c6bd;
    --error-text: #9c3c2c;
    --radius: 14px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Atkinson Hyperlegible', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
}

a { color: var(--primary-dark); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link — muncul saat di-fokus lewat keyboard */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 8px 0;
    z-index: 1000;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus {
    left: 0;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }

/* ---------- Ribbon signature: banyak aspek dukungan, satu layanan ---------- */
.ribbon {
    height: 8px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        100deg,
        var(--primary) 0 34px,
        var(--gold) 34px 52px,
        #c9776b 52px 70px,
        #6d8fb0 70px 96px
    );
    opacity: 0.9;
}
.ribbon.thin { height: 5px; }

/* ---------- Navbar (modern) ---------- */
.navbar {
    background: rgba(247, 249, 252, 0.85);
    border-bottom: 1px solid var(--line);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    box-shadow: 0 1px 0 rgba(31, 42, 60, 0.03), 0 4px 16px rgba(31, 42, 60, 0.04);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    font-size: 19px;
}
.navbar .brand:hover { color: var(--ink); text-decoration: none; }

.navbar .brand .badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 10px;
    padding: 6px 11px;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(29, 78, 216, 0.25);
}

/* Menu navigasi utama */
.nav-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-menu a {
    position: relative;
    color: var(--ink-soft);
    font-size: 14.5px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-menu a:hover {
    color: var(--primary-dark);
    background: var(--primary-tint);
}

.nav-menu a.active {
    color: var(--primary-dark);
    background: var(--primary-tint);
}

.nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--gold);
}

/* Tombol hamburger — hanya tampil di layar kecil */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 0 8px;
    background: var(--ink);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 780px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--card);
        border-bottom: 1px solid var(--line);
        padding: 10px 16px 16px;
        box-shadow: 0 10px 24px rgba(31, 42, 60, 0.08);

        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.25s ease, opacity 0.2s ease;
    }

    .nav-menu.is-open {
        max-height: 480px;
        opacity: 1;
    }

    .nav-menu a { text-align: left; }
    .nav-menu a.active::after { display: none; }
}

/* ---------- Layout ---------- */
.page { max-width: 980px; margin: 0 auto; padding: 40px 24px 70px; }

.page-header { text-align: center; margin-bottom: 30px; }

.page-header .eyebrow {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 12.5px;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.page-header h1 { margin: 0 0 14px; font-size: 32px; }
.page-header .subtitle { color: var(--ink-soft); margin: 0 0 18px; font-size: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }
.page-header .ribbon { max-width: 220px; margin: 0 auto; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 20px;
    padding: 56px 40px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.hero .eyebrow {
    color: var(--gold-tint);
    font-weight: 700;
    letter-spacing: 1.8px;
    font-size: 12.5px;
    text-transform: uppercase;
    margin: 0 0 14px;
    opacity: 0.9;
}

.hero h1 { margin: 0 0 16px; font-size: 36px; color: #fff; }
.hero p { margin: 0 auto; max-width: 600px; opacity: 0.96; font-size: 16.5px; }

.hero-ribbon-wrap { margin-top: 30px; max-width: 320px; margin-left: auto; margin-right: auto; }
.hero-ribbon-wrap .ribbon { background-blend-mode: screen; opacity: 0.85; }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 32px;
    margin-bottom: 22px;
}

.card h2 {
    margin-top: 0;
    font-size: 21px;
    color: var(--ink);
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: none;
    position: relative;
}
.card h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--gold);
    margin-top: 10px;
}

.card .content-body { font-size: 16px; }
.card .content-body img { max-width: 100%; border-radius: 10px; }
.card .content-body p:first-child { margin-top: 0; }

/* ---------- Subsystem cards (tombol ke SIAP, TOOLI, dst) ---------- */
.subsystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin: 6px 0;
}

.subsystem-card {
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.subsystem-card:hover,
.subsystem-card:focus-visible {
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.16);
    transform: translateY(-3px);
    border-color: var(--primary);
    text-decoration: none;
}

.subsystem-card .icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--primary-tint);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.subsystem-card .name { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 18px; }
.subsystem-card .desc { color: var(--ink-soft); font-size: 14px; margin: 0; }
.subsystem-card .go { color: var(--primary-dark); font-size: 13.5px; font-weight: 700; margin-top: auto; }

/* ---------- Quicklinks (ke 5 halaman info) ---------- */
.quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 26px;
}

.quicklinks a {
    background: var(--card);
    border: 1.5px solid var(--line);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.quicklinks a:hover,
.quicklinks a:focus-visible {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: var(--primary-tint);
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--ink-soft);
    font-size: 13.5px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}
.site-footer a { color: var(--ink-soft); font-weight: 700; }
.site-footer a:hover { color: var(--primary-dark); }

.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 34px;
    font-size: 14.5px;
}

@media (max-width: 640px) {
    .hero { padding: 40px 24px; }
    .hero h1 { font-size: 28px; }
    .card { padding: 24px 20px; }
    .navbar { padding: 14px 18px; }
}