/* =========================================================
   Website Sekolah — Landing Page
   ========================================================= */
:root {
    --green: #0f5132;
    --green-700: #0b3d26;
    --green-100: #e3efe8;
    --gold: #f4b740;
    --cream: #faf7f0;
    --ink: #1b2a22;
    --muted: #5f6f66;
    --line: #e2e8e4;
    --radius: 18px;
    --shadow: 0 10px 30px -12px rgba(15, 81, 50, .25);
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--sans); color: var(--ink); background: #fff; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--green-700); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .6rem; }

.btn {
    display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
    background: var(--green); color: #fff; padding: .8rem 1.4rem; border-radius: 999px;
    font-weight: 600; border: 2px solid var(--green); cursor: pointer; transition: .2s;
    font-family: inherit; font-size: .95rem;
}
.btn:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-100); }
.btn-sm { padding: .5rem 1.1rem; }
.btn-block { width: 100%; }

.kicker {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: #b7791f; margin-bottom: .5rem;
}
.kicker-light { color: var(--gold); }
.empty { color: var(--muted); padding: 2rem; text-align: center; grid-column: 1 / -1; }

/* ---------- Navbar ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); transition: .25s; }
.nav.scrolled { box-shadow: 0 4px 20px -10px rgba(0,0,0,.2); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { display: block; font-family: var(--serif); color: var(--green-700); font-size: 1.05rem; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .75rem; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--green); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.8rem; color: var(--green); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--cream), #fff); padding: 4rem 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; background: var(--green-100); color: var(--green);
    padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-media { position: relative; }
.hero-media > img { border-radius: 28px 28px 28px 120px; box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-badge {
    position: absolute; left: -24px; bottom: 28px; background: #fff; border-radius: 16px; padding: .9rem 1.2rem;
    display: flex; align-items: center; gap: .8rem; box-shadow: var(--shadow);
}
.hero-badge strong { font-family: var(--serif); font-size: 2rem; color: var(--green); }
.hero-badge span { font-size: .8rem; color: var(--muted); line-height: 1.3; }

/* ---------- Stats ---------- */
.stats { margin-top: -2.5rem; position: relative; z-index: 2; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); background: var(--green); color: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 1.6rem; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold); }
.stat span { font-size: .9rem; opacity: .85; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-tint { background: var(--cream); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.prose { color: #3d4a43; }

.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 3.5rem; align-items: center; }
.kepsek { position: relative; }
.kepsek img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.kepsek div {
    position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(255,255,255,.95);
    border-radius: 12px; padding: .8rem 1rem;
}
.kepsek strong { display: block; color: var(--green-700); }
.kepsek span { font-size: .85rem; color: var(--muted); }

.vm-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.5rem; margin-top: 4rem; }
.vm-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.vm-card i { font-size: 1.6rem; color: var(--green); }
.vm-card h3 { margin: .6rem 0; }
.vm-card ol { padding-left: 1.2rem; color: #3d4a43; }
.vm-card li { margin-bottom: .35rem; }
.vm-visi { background: var(--green); border-color: var(--green); color: #fff; }
.vm-visi h3, .vm-visi i { color: var(--gold); }
.vm-visi p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; }

.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.program { background: #fff; border-radius: var(--radius); padding: 1.8rem; border: 1px solid var(--line); transition: .25s; }
.program:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.program i {
    display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
    background: var(--green-100); color: var(--green); font-size: 1.4rem; margin-bottom: 1rem;
}
.program h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.program p { color: var(--muted); font-size: .95rem; }

.guru-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.guru { text-align: center; }
.guru img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: .8rem; background: var(--green-100); }
.guru strong { display: block; color: var(--green-700); }
.guru span { display: block; font-size: .88rem; color: var(--muted); }
.guru small { color: #b7791f; font-size: .8rem; font-weight: 600; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.news { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: .25s; display: flex; flex-direction: column; }
.news:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.news-img { aspect-ratio: 16/10; overflow: hidden; background: var(--green-100); }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.news:hover .news-img img { transform: scale(1.05); }
.news-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-body h3 { font-size: 1.15rem; }
.news-body p { color: var(--muted); font-size: .92rem; }
.news-body small { color: var(--muted); margin-top: auto; }
.news-featured { grid-column: span 2; grid-row: span 2; }
.news-featured h3 { font-size: 1.6rem; }
.news-featured .news-img { aspect-ratio: 16/9; }
.news-grid-3 .news-featured { grid-column: auto; grid-row: auto; }
.tag { align-self: flex-start; background: var(--green-100); color: var(--green); font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }

.gallery { columns: 4 220px; column-gap: 1rem; }
.gallery figure { break-inside: avoid; margin-bottom: 1rem; position: relative; border-radius: 14px; overflow: hidden; }
.gallery figcaption {
    position: absolute; inset: auto 0 0; padding: 2rem .9rem .7rem; color: #fff; font-size: .85rem;
    background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transition: .25s;
}
.gallery figure:hover figcaption { opacity: 1; }

/* ---------- Portal Guru: panel di landing ---------- */
.apps { padding: 4.5rem 0 1rem; }
.portal-panel {
    position: relative; overflow: hidden; border-radius: 28px; padding: 2.2rem;
    background: radial-gradient(circle at 100% 0%, #1c7a4c 0, var(--green) 45%, var(--green-700) 100%);
    box-shadow: 0 24px 50px -24px rgba(11, 61, 38, .55);
}
.portal-panel::before {
    content: ''; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px;
    border-radius: 50%; border: 50px solid rgba(244, 183, 64, .12); pointer-events: none;
}
.portal-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.portal-title { display: flex; gap: 1rem; align-items: flex-start; }
.portal-badge {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--gold); color: var(--green-700); font-size: 1.5rem;
}
.portal-head h2 { color: #fff; margin-bottom: .25rem; }
.portal-head p { color: #cfe3d7; max-width: 52ch; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--green-700); }
.btn-gold:hover { background: #ffc85c; border-color: #ffc85c; }
.btn-gold .count { background: var(--green-700); color: #fff; font-size: .75rem; padding: .05rem .5rem; border-radius: 999px; }
.portal-panel .app-grid { position: relative; }
.portal-panel .app-card { border-color: transparent; }
.portal-panel .app-card:hover { border-color: var(--gold); }
.portal-more {
    position: relative; display: block; text-align: center; margin-top: 1.2rem; padding: .8rem;
    border: 1px dashed rgba(255,255,255,.35); border-radius: 14px; color: #fff; font-weight: 600; transition: .2s;
}
.portal-more:hover { background: rgba(255,255,255,.08); border-color: var(--gold); color: var(--gold); }

/* ---------- Portal Guru: halaman /portal ---------- */
.portal-hero { background: radial-gradient(circle at 85% 10%, #1c7a4c, var(--green-700) 60%); color: #cfe3d7; padding: 3rem 0 2.6rem; }
.portal-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .4rem; }
.back.back-light { color: var(--gold); display: table; margin-bottom: 1.4rem; }
.back.back-light:hover { color: #fff; }
.portal-search { position: relative; display: block; max-width: 620px; margin-top: 1.6rem; }
.portal-search i { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.portal-search input {
    width: 100%; font: inherit; font-size: 1.02rem; padding: 1rem 1rem 1rem 3rem; border: 0; border-radius: 14px;
    background: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4);
}
.portal-search input:focus { outline: 3px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.chip {
    font: 600 .86rem var(--sans); padding: .45rem .95rem; border-radius: 999px; cursor: pointer;
    background: rgba(255,255,255,.1); color: #e3efe8; border: 1px solid rgba(255,255,255,.2); transition: .15s;
}
.chip small { opacity: .7; margin-left: .2rem; }
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--gold); color: var(--green-700); border-color: var(--gold); }
.portal-body { padding-top: 2.5rem; background: var(--cream); min-height: 40vh; }
.portal-group { margin-bottom: 2.4rem; }
.group-title { font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.group-title span { font-family: var(--sans); font-size: .75rem; background: var(--green-100); color: var(--green); padding: .1rem .55rem; border-radius: 999px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.app-card {
    position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 2.6rem 1.1rem 1.1rem;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: .2s;
}
.app-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.app-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.app-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.app-text strong { color: var(--green-700); font-size: 1rem; }
.app-text small { color: var(--muted); font-size: .84rem; margin-top: .15rem; }
.app-text em { font-style: normal; font-size: .72rem; font-weight: 700; color: #b7791f; margin-top: .3rem; text-transform: uppercase; letter-spacing: .06em; }
.app-go { position: absolute; top: 1rem; right: 1rem; color: var(--muted); transition: .2s; }
.app-card:hover .app-go { color: var(--green); transform: translate(2px, -2px); }
.app-ico {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
    font-size: 1.45rem; overflow: hidden;
}
.app-ico img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.w-hijau { background: #e3efe8; color: #0f5132; }
.w-biru  { background: #e2ecfb; color: #1d4ed8; }
.w-emas  { background: #fff1d6; color: #b7791f; }
.w-merah { background: #fde4e6; color: #c81e3a; }
.w-ungu  { background: #ede5fb; color: #6d28d9; }
.w-tosca { background: #dcf4f2; color: #0f766e; }

/* ---------- Kontak ---------- */
.contact { background: var(--green-700); color: #e9f2ed; }
.contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; margin: 1.5rem 0; display: grid; gap: .7rem; }
.contact-list i { color: var(--gold); margin-right: .5rem; }
.map { width: 100%; height: 220px; border: 0; border-radius: 14px; }
.contact-form { background: #fff; color: var(--ink); padding: 2rem; border-radius: var(--radius); display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
    font: inherit; font-weight: 400; padding: .75rem .9rem; border: 1px solid var(--line);
    border-radius: 10px; background: #fbfcfb; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert { padding: .8rem 1rem; border-radius: 10px; font-size: .92rem; display: flex; justify-content: space-between; gap: 1rem; }
.alert-success { background: #d1f2df; color: #0b5132; }
.alert-danger { background: #fde2e1; color: #9b1c1c; }
.alert-warning { background: #fff3cd; color: #7a5b00; }
.alert-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; }

/* ---------- Artikel ---------- */
.article { padding: 3rem 0 4rem; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: .8rem 0; }
.back { display: inline-block; color: var(--green); font-weight: 600; margin-bottom: 1.5rem; }
.meta { color: var(--muted); font-size: .9rem; }
.article-img { border-radius: var(--radius); margin: 2rem 0; width: 100%; }
.article-body { font-size: 1.08rem; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.footer { background: #0a2e1e; color: #b9cbc1; padding: 4rem 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 3rem; }
.footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-grid > div > a { display: block; margin-bottom: .5rem; }
.footer a:hover { color: var(--gold); }
.footer p { margin: .8rem 0; }
.brand-light strong { color: #fff; }
.brand-light small { color: #b9cbc1; }
.social { display: flex; gap: .6rem; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding: 1.3rem 0; font-size: .85rem; text-align: center; }

/* ---------- Animasi ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--cream); }
.error-page h1 { font-size: 6rem; color: var(--green); }
.error-page p { margin: .5rem 0 1.5rem; color: var(--muted); }

/* ---------- Responsif ---------- */
@media (max-width: 960px) {
    .hero-grid, .about-grid, .contact-grid, .vm-grid { grid-template-columns: 1fr; }
    .about-grid .kepsek { max-width: 320px; }
    .program-grid, .news-grid { grid-template-columns: 1fr 1fr; }
    .guru-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-badge { left: 12px; }
}
@media (max-width: 1080px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed; inset: 72px 0 auto; background: #fff; flex-direction: column; align-items: stretch;
        padding: 1rem 16px 1.5rem; gap: .4rem; box-shadow: 0 10px 20px -10px rgba(0,0,0,.2);
        transform: translateY(-120%); transition: .3s; z-index: -1;
    }
    .nav-links a { padding: .6rem 0; }
    .nav-links .btn { padding: .7rem 1rem; }
    .menu-open .nav-links { transform: none; }
}
@media (max-width: 760px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(2) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
    .program-grid, .news-grid, .row2, .footer-grid { grid-template-columns: 1fr; }
    .news-featured { grid-column: auto; grid-row: auto; }
    .guru-grid { grid-template-columns: 1fr 1fr; }
    .section { padding: 4rem 0; }
}
@media (max-width: 760px) {
    .apps { padding-top: 3rem; }
    .portal-panel { padding: 1.4rem; border-radius: 20px; }
    .portal-title { flex-direction: column; }
    .portal-head .btn { width: 100%; }
}
.portal-empty {
    position: relative; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.35); border-radius: 16px;
    padding: 1.3rem 1.4rem; color: #e3efe8;
}
.portal-empty > i { font-size: 1.6rem; color: var(--gold); }
.portal-empty > div { flex: 1; min-width: 240px; }
.portal-empty strong { display: block; color: #fff; }
/* Di panel landing, kartu melebar penuh walau aplikasinya sedikit */
.portal-panel .app-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
