/* Landing page SIAKAD Kampusku
   Arah: tertata, hangat, tepat. Dunia: laut Mandar saat pagi dan kartu mahasiswa di atas kertas. */

:root {
    --bg: #f7f4ee;
    --card: #fdfbf7;
    --raised: #efe9df;
    --hair: rgba(31, 27, 22, 0.1);
    --ink: #1f1b16;
    --ink-2: #5e554a;
    --ink-3: #7b7266;

    --accent: #0f6b66;
    --accent-hover: #0b5753;

    --ok: #2f8f5b;
    --warn: #b7791f;
    --info: #4a6a8a;
    --bad: #c2413f;

    --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --edge: 24px;
    --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 22px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: calc(var(--max) + var(--edge) * 2);
    margin: 0 auto;
    padding: 0 var(--edge);
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition-property: background-color, border-color, color, transform;
    transition-duration: 160ms;
    transition-timing-function: var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-quiet {
    background: rgba(253, 251, 247, 0.72);
    border-color: var(--hair);
    color: var(--ink);
}
.btn-quiet:hover { background: var(--card); }

/* ---------- Navigation ---------- */

.nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
}
.nav-inner {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
}
.brand span { font-weight: 400; color: var(--ink-2); margin-left: -2px; }
.brand svg { color: var(--accent); }

.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--ink-2);
    font-weight: 500;
    transition-property: color, background-color;
    transition-duration: 160ms;
    transition-timing-function: var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(31, 27, 22, 0.05); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-login { color: var(--ink-2); font-weight: 500; transition: color 160ms var(--ease); }
.nav-login:hover { color: var(--ink); }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hair);
    border-radius: 10px;
    background: rgba(253, 251, 247, 0.72);
    font-size: 18px;
    cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 72px;
    overflow: hidden;
}

/* Adegan: gambar skala lebar, cakrawala dan perahu dihitung dari lebar layar */
.hero-scene {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(38vw + 272px);
    background: url("../img/sandeq-hero.webp") no-repeat 0 -20.9vw / 100% auto;
    background-color: #faecd8;
    z-index: 0;
}
.hero-scene::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 240px;
    background: linear-gradient(to bottom, rgba(247, 244, 238, 0), var(--bg));
}

.hero-copy {
    position: relative;
    z-index: 1;
    min-height: 38vw;
    padding-top: 64px;
}
.hero-copy-inner { max-width: 54%; }

.hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 4.7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.hero-sub {
    margin-top: 20px;
    max-width: 36rem;
    font-size: 18px;
    line-height: 28px;
    color: var(--ink-2);
}

.hero-actions { display: flex; gap: 12px; margin-top: 32px; }

/* Pratinjau produk */
.hero-preview {
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}

.window {
    background: var(--card);
    border: 1px solid var(--hair);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 8px 24px rgba(31, 27, 22, 0.08);
    max-height: 468px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
    mask-image: linear-gradient(to bottom, #000 78%, transparent);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 40px;
    padding: 0 16px;
    border-bottom: 1px solid var(--hair);
    background: var(--bg);
    font-size: 12px;
    line-height: 16px;
    color: var(--ink-3);
}
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--raised); border: 1px solid var(--hair); }
.window-title { margin-left: auto; }

.app-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 48px;
    padding: 0 24px;
    border-bottom: 1px solid var(--hair);
    font-size: 13px;
    line-height: 20px;
    color: var(--ink-2);
}
.app-nav .brand { font-size: 14px; }
.app-nav .is-here { color: var(--ink); font-weight: 500; }
.app-nav .app-user { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }

.avatar {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--raised);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.app-body { padding: 24px; }
.app-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.app-title { font-size: 28px; line-height: 32px; font-weight: 400; letter-spacing: -0.01em; }
.app-meta { font-size: 12px; line-height: 16px; color: var(--ink-3); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
    padding: 16px 20px;
    border: 1px solid var(--hair);
    border-radius: 12px;
    background: var(--card);
}
.stat-label { font-size: 13px; line-height: 20px; color: var(--ink-2); }
.stat-figure { margin-top: 4px; font-size: 28px; line-height: 32px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-figure.is-accent { color: var(--accent); }
.stat-note { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-3); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: var(--ink-3);
    background: var(--bg);
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}
.table td { height: 44px; padding: 0 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.table .col-nim { width: 112px; color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.table .col-end { text-align: right; font-variant-numeric: tabular-nums; }
.table .person { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }

/* Penanda status: detail khas produk ini */
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, var(--ok));
}
.status.is-cuti { --dot: var(--warn); }
.status.is-lulus { --dot: var(--info); }
.status.is-do { --dot: var(--bad); }

/* ---------- Sections ---------- */

.section { padding-top: 112px; }
.section-head { max-width: 40rem; }

.h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(32px, 3.4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.lead { margin-top: 16px; font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 32rem; }

/* Fitur */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.split-sticky { position: sticky; top: 48px; }

.rows { border-top: 1px solid var(--hair); }
.row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--hair);
}
.row i { font-size: 18px; line-height: 22px; color: var(--ink-3); }
.row h3 { font-size: 17px; line-height: 24px; font-weight: 500; }
.row p { margin-top: 4px; color: var(--ink-2); max-width: 34rem; }

/* Cetak */
.print-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }

.stage {
    display: grid;
    place-items: center;
    padding: 64px 32px;
    border-radius: 20px;
    background: var(--raised);
}

.ktm {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1.586;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    background: linear-gradient(160deg, #165a56, #0f4643);
    color: #f4efe6;
    box-shadow: 0 24px 48px rgba(31, 27, 22, 0.18), 0 2px 4px rgba(31, 27, 22, 0.1);
    transform: rotate(-2deg);
}
.ktm-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(244, 239, 230, 0.2);
}
.ktm-top b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.ktm-top span { font-size: 12px; line-height: 16px; color: rgba(244, 239, 230, 0.72); }
.ktm-body { display: flex; gap: 16px; align-items: center; }
.ktm-photo {
    flex: none;
    display: grid;
    place-items: center;
    width: 72px;
    height: 92px;
    border-radius: 8px;
    background: #e9e2d4;
    color: #5e554a;
    font-size: 24px;
    font-weight: 500;
}
.ktm dl { display: grid; grid-template-columns: 64px 1fr; row-gap: 2px; font-size: 12px; line-height: 16px; }
.ktm dt { color: rgba(244, 239, 230, 0.72); }
.ktm dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.ktm-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ktm-foot .status { color: #f4efe6; font-size: 12px; line-height: 16px; }
.ktm-foot .status::before { background: #6fcf9a; }
.ktm-bars { color: #f4efe6; }

.outputs { margin-top: 32px; border-top: 1px solid var(--hair); }

/* Penutup */
.closing {
    margin-top: 112px;
    padding: 80px 64px;
    border-radius: 20px;
    background: var(--ink);
    color: #efe9de;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}
.closing .h2 { color: #efe9de; max-width: 26rem; }
.closing p { margin-top: 12px; color: #aaa398; max-width: 28rem; }
.closing-actions { display: flex; gap: 12px; flex: none; }
.btn-light { background: #efe9de; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-light:hover { background: #fdfbf7; }
.btn-ghost { background: transparent; border-color: rgba(239, 233, 222, 0.2); color: #efe9de; }
.btn-ghost:hover { background: rgba(239, 233, 222, 0.08); }

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 64px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--hair);
    font-size: 13px;
    line-height: 20px;
    color: var(--ink-3);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { transition: color 160ms var(--ease); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Masuk satu kali saat halaman dibuka ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.rise { animation: rise 480ms var(--ease) both; }
.rise-1 { animation-delay: 60ms; }
.rise-2 { animation-delay: 120ms; }
.rise-3 { animation-delay: 180ms; }
.rise-4 { animation-delay: 260ms; }

@media (prefers-reduced-motion: reduce) {
    .rise { animation: none; }
    html { scroll-behavior: auto; }
    .btn, .nav-links a { transition: none; }
}

/* ---------- Layar kecil ---------- */

@media (max-width: 991px) {
    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav.is-open { background: var(--bg); border-bottom: 1px solid var(--hair); }
    .nav.is-open .nav-inner { flex-wrap: wrap; height: auto; padding-top: 16px; padding-bottom: 16px; gap: 16px; }
    .nav.is-open .brand { height: 40px; }
    .nav.is-open .nav-links,
    .nav.is-open .nav-actions { display: flex; flex-basis: 100%; }
    .nav.is-open .nav-links { flex-direction: column; margin: 0; }
    .nav.is-open .nav-actions { justify-content: space-between; }

    .hero { padding-top: 72px; }
    .hero-copy { min-height: 0; padding-top: 48px; }
    .hero-copy-inner { max-width: none; }
    .hero h1 { font-size: 40px; }
    .hero-sub { font-size: 17px; line-height: 26px; }
    .hero-actions { flex-wrap: wrap; }

    .hero-scene {
        position: relative;
        order: 2;
        height: 300px;
        margin-top: 24px;
        background-size: cover;
        background-position: 70% 62%;
        -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 78%, transparent);
        mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 78%, transparent);
    }
    .hero-scene::after { display: none; }
    .hero-preview { order: 3; margin-top: -72px; }
    .hero-copy { order: 1; }

    .stats { grid-template-columns: repeat(2, 1fr); }
    .table .col-prodi, .table .col-nim-head { display: none; }

    .section { padding-top: 80px; }
    .split, .print-grid { grid-template-columns: 1fr; gap: 40px; }
    .split-sticky { position: static; }
    .stage { padding: 40px 20px; }
    .closing { flex-direction: column; align-items: flex-start; padding: 48px 24px; margin-top: 80px; }
    .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575px) {
    :root { --edge: 20px; }
    .app-nav .is-here ~ a, .app-nav .brand span { display: none; }
    .app-body { padding: 16px; }
    .app-title { font-size: 24px; line-height: 28px; }
    .app-meta { display: none; }
    .stat { padding: 12px 16px; }
    .stat-figure { font-size: 24px; line-height: 28px; }
    .ktm { padding: 16px; }
    .ktm-photo { width: 56px; height: 72px; font-size: 20px; }
    .ktm dl { grid-template-columns: 60px 1fr; }
    .hero-actions .btn { flex: 1 1 100%; }
    .closing-actions { flex-direction: column; width: 100%; }
    .closing-actions .btn { width: 100%; }
}
