/* SDN Pandeglang 6 | Website publik
   Palet diambil dari logo sekolah: biru langit, biru tua, kuning, oranye api, hijau daun. */
:root {
  --sky: #1fb9d6;
  --sky-2: #7fdcef;
  --sky-soft: #e4f7fc;
  --blue: #1459b8;
  --navy: #0d2f5f;
  --sun: #ffc629;
  --sun-soft: #fff4cf;
  --flame: #ff6b35;
  --flame-soft: #ffe6dc;
  --leaf: #1fa760;
  --leaf-soft: #dff6e9;
  --ink: #16263d;
  --ink-2: #4a5a70;
  --ink-3: #7b8799;
  --line: #e3e9f1;
  --bg: #ffffff;
  --bg-2: #f6fafd;
  --cream: #fffaf0;
  --r: 22px;
  --r-sm: 14px;
  --shadow: 0 10px 30px -12px rgba(13, 47, 95, .22);
  --shadow-sm: 0 4px 14px -6px rgba(13, 47, 95, .18);
  --wrap: 1180px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.65; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; color: var(--navy); font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 800; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none !important; white-space: nowrap; font-size: 15px; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sun { background: var(--sun); color: var(--navy); box-shadow: 0 6px 0 #e0a800; }
.btn-sun:hover { box-shadow: 0 8px 0 #e0a800; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 0 #0c3f86; }
.btn-blue:hover { box-shadow: 0 8px 0 #0c3f86; }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-white { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.6); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Header ---------- */
.topbar { background: var(--navy); color: #cfe2ff; font-size: 13.5px; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 38px; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar .sp { flex: 1; }
.topbar a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none !important; min-width: 0; }
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand b { font-family: var(--display); font-size: 21px; line-height: 1; display: block; white-space: nowrap; }
.brand small { display: block; color: var(--leaf); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.menu { display: flex; align-items: center; gap: 2px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > button {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 11px; white-space: nowrap; border-radius: 12px; font-weight: 800; color: var(--ink);
  background: none; border: 0; cursor: pointer; font-size: 15px; text-decoration: none;
}
.menu > li > a:hover, .menu > li > button:hover, .menu > li > a.on { background: var(--sky-soft); color: var(--blue); }
.menu .sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 8px; list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .15s;
}
.menu li:hover > .sub, .menu li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.menu .sub a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; }
.menu .sub a:hover { background: var(--bg-2); color: var(--blue); text-decoration: none; }
.menu .sub .ic { color: var(--sky); }
.nav-cta { margin-left: 8px; white-space: nowrap; flex: none; }
@media (max-width: 1280px) { .menu > li > a, .menu > li > button { padding: 10px 8px; font-size: 14.5px; } .nav .wrap { gap: 10px; } }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; align-items: center; justify-content: center; color: var(--navy); }

.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.open { display: block; }
.drawer .shade { position: absolute; inset: 0; background: rgba(13, 47, 95, .45); animation: fade .2s; }
.drawer .panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 88vw); background: #fff; padding: 18px; overflow-y: auto;
  animation: slide .22s ease-out; display: flex; flex-direction: column; gap: 4px;
}
.drawer .panel .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer .panel a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink); font-weight: 800; }
.drawer .panel a:hover, .drawer .panel a.on { background: var(--sky-soft); color: var(--blue); text-decoration: none; }
.drawer .panel .grp { font-size: 12px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; padding: 14px 12px 4px; }
.drawer .panel .btn { margin-top: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(100%); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, #58d6ee 0%, transparent 60%), linear-gradient(160deg, #1fb9d6 0%, #1780d0 55%, #1459b8 100%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 120px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5.2vw, 60px); margin-bottom: 18px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--sun); white-space: nowrap; text-shadow: 0 4px 0 rgba(13,47,95,.25); }
.hero p.lead { font-size: clamp(16px, 1.6vw, 19px); color: #e6f7ff; max-width: 540px; margin-bottom: 26px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; margin-bottom: 18px; }
.hero .pill .ic { color: var(--sun); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; min-height: 440px; }
.hero-art .ph {
  position: absolute; overflow: hidden; background: #fff; border: 6px solid #fff; box-shadow: 0 30px 60px -20px rgba(4, 30, 70, .55);
}
.hero-art .ph img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .ph.a { width: 62%; aspect-ratio: 4/5; left: 0; top: 10px; border-radius: 40% 60% 55% 45% / 45% 45% 55% 55%; transform: rotate(-3deg); }
.hero-art .ph.b { width: 52%; aspect-ratio: 4/5; right: 0; bottom: 0; border-radius: 55% 45% 40% 60% / 50% 60% 40% 50%; transform: rotate(4deg); }
.hero-art .badge {
  position: absolute; z-index: 3; background: #fff; color: var(--navy); border-radius: 18px; padding: 10px 14px; display: flex; gap: 10px;
  align-items: center; box-shadow: var(--shadow); font-weight: 800; font-size: 14px; line-height: 1.25;
}
.hero-art .badge i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.hero-art .badge small { display: block; color: var(--ink-3); font-weight: 700; font-size: 12px; }
.hero-art .badge.b1 { right: 4%; top: 6%; animation: bob 5s ease-in-out infinite; }
.hero-art .badge.b1 i { background: var(--sun-soft); color: #c78a00; }
.hero-art .badge.b2 { left: 2%; bottom: 8%; animation: bob 6s ease-in-out infinite reverse; }
.hero-art .badge.b2 i { background: var(--leaf-soft); color: var(--leaf); }
@keyframes bob { 50% { transform: translateY(-10px); } }
.deco { position: absolute; z-index: 1; pointer-events: none; }
.deco.cloud { opacity: .9; }
.hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; width: 100%; height: 90px; display: block; }

/* ---------- Statistik ---------- */
.stats { position: relative; z-index: 5; margin-top: -70px; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--line);
}
.stat i { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--sky-soft); color: var(--blue); }
.stat b { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--navy); display: block; }
.stat span { color: var(--ink-2); font-weight: 700; font-size: 14px; }
.stats .note { text-align: right; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

/* ---------- Section ---------- */
section.sec { padding: 84px 0; position: relative; }
section.sec.tint { background: var(--bg-2); }
section.sec.cream { background: var(--cream); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head.left { text-align: left; margin-left: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--flame); text-transform: uppercase; letter-spacing: .12em;
  font-size: 13px; margin-bottom: 10px;
}
.kicker::before { content: ''; width: 22px; height: 4px; border-radius: 4px; background: var(--flame); }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); }
.sec-head p { color: var(--ink-2); font-size: 17px; margin: 0; }
.more { display: flex; justify-content: center; margin-top: 34px; }

/* ---------- Sambutan ---------- */
.welcome { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; }
.hm-card { position: relative; }
.hm-card .photo {
  border-radius: 30px; overflow: hidden; aspect-ratio: 4/5; background: linear-gradient(180deg, var(--sky-soft), #fff);
  box-shadow: var(--shadow); position: relative; z-index: 2;
}
.hm-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hm-card::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border-radius: 30px; background: var(--sun); z-index: 1; }
.hm-card .name { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 16px; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.hm-card .name b { display: block; font-family: var(--display); color: var(--navy); font-size: 18px; line-height: 1.2; }
.hm-card .name span { color: var(--ink-3); font-size: 13.5px; font-weight: 700; }
.welcome blockquote { margin: 0; font-size: 18px; color: var(--ink-2); }
.welcome blockquote p:first-child::before { content: '\201C'; font-family: Georgia, serif; font-size: 70px; line-height: 0; color: var(--sky); vertical-align: -30px; margin-right: 4px; }

/* ---------- Visi misi ---------- */
.vision {
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; border-radius: 32px; padding: 44px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.vision .kicker { color: var(--sun); }
.vision .kicker::before { background: var(--sun); }
.vision h3 { color: #fff; font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; max-width: 900px; line-height: 1.35; }
.vision .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.vision .chips span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14.5px; }
.vision .star { position: absolute; right: -30px; top: -30px; width: 200px; height: 200px; color: rgba(255,255,255,.07); }
/* Flex supaya baris terakhir yang tidak penuh (misi 4 dan 5) berada di tengah */
.missions { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 26px; counter-reset: m; }
.mission {
  flex: 0 1 calc((100% - 36px) / 3);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 22px 76px; position: relative; box-shadow: var(--shadow-sm);
  color: var(--ink-2); font-size: 15.5px;
}
.mission::before {
  counter-increment: m; content: counter(m); position: absolute; left: 20px; top: 20px; width: 42px; height: 42px; border-radius: 14px;
  background: var(--sun); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 22px; display: grid; place-items: center;
}

/* ---------- Dimensi (kartu ikon) ---------- */
.dims { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dim {
  background: #fff; border-radius: var(--r); padding: 24px 22px; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.dim:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.dim i { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 14px; background: var(--sky-soft); color: var(--blue); }
.dim h4 { font-size: 19px; margin-bottom: 6px; }
.dim p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.dim .no { position: absolute; right: 16px; top: 10px; font-family: var(--display); font-size: 44px; font-weight: 800; color: var(--bg-2); line-height: 1; }

/* ---------- Pembelajaran mendalam ---------- */
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pm-list { display: grid; gap: 14px; }
.pm-item { display: flex; gap: 16px; background: #fff; border-radius: var(--r); padding: 18px 20px; border: 1px solid var(--line); }
.pm-item i { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--leaf-soft); color: var(--leaf); }
.pm-item b { font-family: var(--display); font-size: 20px; color: var(--navy); display: block; line-height: 1.2; }
.pm-item b small { font-family: var(--font); font-size: 13px; color: var(--ink-3); font-weight: 700; margin-left: 6px; }
.pm-item p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.step { background: var(--navy); color: #fff; border-radius: 18px; padding: 16px; position: relative; }
.step b { font-family: var(--display); font-size: 18px; display: block; color: var(--sun); }
.step p { margin: 4px 0 0; font-size: 13.5px; color: #d6e6ff; }
.photo-stack { position: relative; min-height: 420px; }
.photo-stack img { position: absolute; border-radius: 24px; object-fit: cover; box-shadow: var(--shadow); border: 5px solid #fff; }
.photo-stack img:nth-child(1) { width: 75%; height: 62%; left: 0; top: 0; }
.photo-stack img:nth-child(2) { width: 60%; height: 52%; right: 0; bottom: 0; }

/* ---------- Kartu umum ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; color: inherit; text-decoration: none !important;
}
a.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16/10; background: var(--sky-soft); overflow: hidden; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 20px; margin: 0; color: var(--navy); }
.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.card .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; font-weight: 700; align-items: center; }
.card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: var(--sky-soft); color: var(--blue); line-height: 1.4;
}
.tag.sun { background: var(--sun-soft); color: #9a6a00; }
.tag.leaf { background: var(--leaf-soft); color: #127a45; }
.tag.flame { background: var(--flame-soft); color: #c2410c; }
.thumb .tag { position: absolute; left: 12px; top: 12px; box-shadow: var(--shadow-sm); background: #fff; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--sky); background: linear-gradient(135deg, var(--sky-soft), #fff); }

/* Prestasi */
.ach .thumb { aspect-ratio: 4/3; }
.ach .rank { display: inline-flex; align-items: center; gap: 6px; color: #9a6a00; font-weight: 800; font-size: 14px; }
.ach .rank .ic { color: var(--sun); }

/* Galeri */
.gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.gal a { position: relative; border-radius: 20px; overflow: hidden; display: block; background: var(--sky-soft); }
.gal a img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .4s; }
.gal a:hover img { transform: scale(1.06); }
.gal a .cap {
  position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(8, 27, 56, .85)); color: #fff;
  font-weight: 800; line-height: 1.25; font-size: 15px;
}
.gal a .cap small { display: block; font-weight: 700; opacity: .85; font-size: 12.5px; margin-top: 2px; }
/* Tata letak menyesuaikan jumlah album supaya selalu rapat */
.gal a:first-child { grid-column: span 2; grid-row: span 2; }
.gal.n1 { grid-template-columns: 1fr; grid-auto-rows: 360px; }
.gal.n1 a:first-child { grid-column: auto; grid-row: auto; }
.gal.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 320px; }
.gal.n2 a:first-child { grid-column: auto; grid-row: auto; }
.gal.n3 { grid-template-columns: 2fr 1fr; }
.gal.n3 a:first-child { grid-column: auto; }
.gal.n4 { grid-template-columns: 2fr 1fr 1fr; }
.gal.n4 a:first-child { grid-column: auto; }
.gal.n4 a:last-child { grid-column: span 2; }
.photos { columns: 3 260px; column-gap: 14px; }
.photos button { display: block; width: 100%; margin: 0 0 14px; border: 0; padding: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: var(--sky-soft); break-inside: avoid; text-align: left; }
.photos button img { width: 100%; height: auto; }
.photos button span { display: block; padding: 10px 12px; font-size: 14px; color: var(--ink-2); background: #fff; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6, 18, 38, .92); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { color: #e3edf9; margin-top: 12px; }
.lightbox .lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.28); }
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 16px; top: 50%; }
.lightbox .next { right: 16px; top: 50%; }

/* Agenda & pengumuman */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.panel { background: #fff; border-radius: var(--r); border: 1px solid var(--line); padding: 24px; }
.panel h3 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.panel h3 .ic { color: var(--flame); }
.agenda { display: flex; gap: 14px; padding: 14px 0; border-top: 1px dashed var(--line); }
.agenda:first-of-type { border-top: 0; }
.agenda .date { width: 62px; flex: none; border-radius: 14px; background: var(--sky-soft); text-align: center; padding: 6px 4px; color: var(--blue); }
.agenda .date b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
.agenda .date span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.agenda h4 { font-size: 17px; margin: 2px 0 2px; font-family: var(--font); font-weight: 800; }
.agenda p { margin: 0; color: var(--ink-3); font-size: 14px; }
.ann { padding: 14px 0; border-top: 1px dashed var(--line); }
.ann:first-of-type { border-top: 0; }
.ann h4 { font-family: var(--font); font-weight: 800; font-size: 17px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.ann p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.ann small { color: var(--ink-3); font-weight: 700; }
.empty { text-align: center; color: var(--ink-3); padding: 26px 10px; }
.empty .ic { color: var(--sky-2); margin-bottom: 6px; }

/* Kebiasaan */
.habits { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.habit { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 9px 18px 9px 10px; font-weight: 800; color: var(--navy); }
.habit i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); color: #b37b00; }

/* CTA */
.cta {
  background: linear-gradient(120deg, var(--flame), #ff9a3c); border-radius: 32px; padding: 44px; color: #fff; display: grid;
  grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.cta h2 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 8px; }
.cta p { margin: 0; color: #fff4ea; font-size: 17px; }
.cta .btn-sun { box-shadow: 0 6px 0 #d19a00; }

/* ---------- Halaman dalam ---------- */
.page-hero { background: linear-gradient(160deg, #1fb9d6 0%, #1459b8 100%); color: #fff; position: relative; overflow: hidden; }
.page-hero .wrap { padding-top: 46px; padding-bottom: 86px; position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 8px; }
.page-hero p { color: #e2f4ff; margin: 0; max-width: 680px; font-size: 17px; }
/* Logo sekolah di kanan hero halaman */
.page-hero .wrap { padding-right: 220px; }
.page-hero .hero-logo {
  position: absolute; right: 24px; top: 50%; transform: translateY(-62%); width: 164px; height: 164px; border-radius: 50%;
  background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 18px 40px rgba(8,40,90,.28), 0 0 0 10px rgba(255,255,255,.16);
  animation: logoFloat 5s ease-in-out infinite;
}
.page-hero .hero-logo img { width: 124px; height: 124px; object-fit: contain; }
@keyframes logoFloat { 0%, 100% { transform: translateY(-62%); } 50% { transform: translateY(calc(-62% - 8px)); } }
.page-hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; color: #cdeaff; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: #fff; }
.content { padding: 40px 0 80px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tabs a, .tabs button {
  padding: 9px 16px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 800; color: var(--ink-2); cursor: pointer;
  text-decoration: none; font-size: 14.5px;
}
.tabs a.on, .tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.prose { font-size: 17px; color: var(--ink-2); max-width: 760px; }
.prose h2, .prose h3, .prose h4 { color: var(--navy); margin-top: 1.4em; }
.prose img { border-radius: 18px; margin: 18px 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { border-left: 5px solid var(--sun); margin: 18px 0; padding: 8px 18px; background: var(--sun-soft); border-radius: 0 14px 14px 0; }
.article { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.article .cover { border-radius: 24px; overflow: hidden; margin-bottom: 24px; aspect-ratio: 16/9; }
.article .cover img { width: 100%; height: 100%; object-fit: cover; }
.side { display: grid; gap: 18px; align-content: start; }
.side .panel h3 { font-size: 19px; }
.mini { display: flex; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); color: inherit; }
.mini:first-of-type { border-top: 0; }
.mini img { width: 72px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.mini b { font-size: 14.5px; line-height: 1.35; color: var(--navy); display: block; }
.mini small { color: var(--ink-3); }

.list-num { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: l; }
.list-num li { position: relative; padding: 14px 16px 14px 60px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); }
.list-num li::before {
  counter-increment: l; content: counter(l); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 10px;
  background: var(--sky-soft); color: var(--blue); font-weight: 800; display: grid; place-items: center;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.block { margin-bottom: 56px; }
.block > h2 { font-size: clamp(24px, 3vw, 32px); }

/* Guru */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 16px; text-align: center; }
.person .av {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px; overflow: hidden; background: var(--sky-soft); color: var(--blue);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 32px; border: 4px solid #fff; box-shadow: var(--shadow-sm);
}
.person .av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.person b { display: block; color: var(--navy); line-height: 1.3; font-size: 15.5px; }
.person span { color: var(--ink-3); font-size: 13.5px; font-weight: 700; }
.person.head { border-color: var(--sun); background: var(--cream); }

/* Grafik batang sederhana */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 50px; gap: 12px; align-items: center; font-weight: 700; font-size: 14.5px; }
.bar-track { height: 26px; border-radius: 999px; background: var(--bg-2); display: flex; overflow: hidden; }
.bar-track .l { background: var(--sky); }
.bar-track .p { background: var(--flame); }
.legend { display: flex; gap: 16px; font-size: 13.5px; color: var(--ink-2); font-weight: 700; margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* Form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 800; font-size: 14.5px; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; outline: none; transition: border .15s;
  font-size: 16px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); }
.field small { color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 14px; display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.alert.ok { background: var(--leaf-soft); color: #0e6b3b; }
.alert.err { background: #ffe4e4; color: #b42318; }
.alert.info { background: var(--sky-soft); color: var(--navy); }
.result { background: #fff; border: 2px dashed var(--leaf); border-radius: 18px; padding: 20px; text-align: center; }
.result b.big { font-family: var(--display); font-size: 30px; color: var(--navy); letter-spacing: 1px; display: block; }

.map { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); min-height: 360px; background: var(--bg-2); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.contact-list { display: grid; gap: 14px; }
.contact-list .it { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.contact-list .it i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sky-soft); color: var(--blue); flex: none; }
.contact-list b { display: block; color: var(--navy); }
.contact-list span { color: var(--ink-2); }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pager a { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line); font-weight: 800; color: var(--ink-2); padding: 0 10px; text-decoration: none; }
.pager a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; align-items: center; }
.filters select, .filters input { padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; }

.skeleton { background: linear-gradient(90deg, var(--bg-2), #eef3f8, var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
footer.foot { background: var(--navy); color: #c9d8ee; padding: 70px 0 0; margin-top: 0; position: relative; }
footer.foot .wave-top { position: absolute; top: -59px; left: 0; right: 0; width: 100%; height: 60px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.foot h4 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.foot a { color: #c9d8ee; }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot .brand b { color: #fff; }
.foot .brand small { color: var(--sun); }
.foot p { font-size: 15px; }
.foot .row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 15px; }
.foot .row .ic { color: var(--sun); margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 12px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; }
.socials a:hover { background: var(--sky); }
.copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 46px; padding: 18px 0; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Animasi muncul */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art .badge, .page-hero .hero-logo { animation: none; }
  html { scroll-behavior: auto; }
}

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 48px; height: 48px; border-radius: 16px; border: 0; background: var(--sun);
  color: var(--navy); box-shadow: 0 6px 0 #e0a800; cursor: pointer; display: none; place-items: center;
}
.to-top.show { display: grid; }

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
  .menu, .nav-cta { display: none; }
  .burger { display: inline-flex; }
  .dims { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mission { flex-basis: calc((100% - 18px) / 2); }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 110px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .ctas { justify-content: center; }
  .hero-art { min-height: 360px; max-width: 460px; margin: 0 auto; width: 100%; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .welcome { grid-template-columns: 1fr; gap: 40px; }
  .hm-card { max-width: 320px; margin: 0 auto; width: 100%; }
  .pm, .two-col, .split, .article { grid-template-columns: 1fr; }
  .photo-stack { min-height: 320px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gal, .gal.n3, .gal.n4 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gal a:first-child, .gal.n3 a:first-child, .gal.n4 a:first-child { grid-column: 1 / -1; grid-row: span 1; height: 240px; }
  .gal.n3 a:first-child { grid-row: auto; }
  .gal.n4 a:last-child { grid-column: 1 / -1; }
  .gal.n1 a:first-child, .gal.n2 a:first-child { grid-column: auto; height: auto; }
  .cta { grid-template-columns: 1fr; text-align: center; padding: 34px 24px; }
  .cta .btn { justify-self: center; }
  section.sec { padding: 64px 0; }
}
@media (max-width: 640px) {
  .page-hero .wrap { padding-right: 16px; }
  .page-hero .hero-logo { display: none; }
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .topbar .hide-sm { display: none; }
  .nav .wrap { min-height: 64px; }
  .brand img { width: 42px; height: 42px; }
  .brand b { font-size: 18px; }
  .hero-art { min-height: 300px; }
  .hero-art .badge { font-size: 12.5px; padding: 8px 10px; }
  .hero-art .badge i { width: 32px; height: 32px; }
  .stats { margin-top: -60px; }
  .stats .grid { gap: 10px; }
  .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat i { width: 44px; height: 44px; border-radius: 14px; }
  .stat b { font-size: 28px; }
  .dims { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .mission { flex-basis: 100%; }
  .mission { padding: 18px 18px 18px 68px; }
  .vision, .cta { padding: 30px 22px; border-radius: 26px; }
  .steps { grid-template-columns: 1fr; }
  .gal, .gal.n3, .gal.n4 { grid-auto-rows: 140px; gap: 10px; }
  .gal a:first-child { height: 200px; }
  .gal.n2 { grid-template-columns: 1fr; }
  .gal a .cap { font-size: 14px; padding: 24px 10px 9px; }
  .form { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .bar-row { grid-template-columns: 56px 1fr 40px; }
  .sec-head { margin-bottom: 30px; }
}
@media print {
  .topbar, .nav, footer.foot, .to-top, .drawer { display: none !important; }
}
.foot a.btn { color: var(--navy); }
.foot a.btn:hover { color: var(--navy); }
.person.head { width: min(100%, 300px); }

/* ---------- Perpustakaan Digital ---------- */
.baca-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 44px; }
.baca-stats .bs { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.baca-stats .bs i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sun-soft); color: #b37b00; flex: none; }
.baca-stats .bs:nth-child(2) i { background: var(--sky-soft); color: var(--blue); }
.baca-stats .bs:nth-child(3) i { background: var(--leaf-soft); color: var(--leaf); }
.baca-stats b { display: block; font-family: var(--display); font-size: 32px; line-height: 1; color: var(--navy); }
.baca-stats span { color: var(--ink-2); font-size: 14.5px; font-weight: 700; }
.baca-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.baca-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.6vw, 30px); margin: 0; }
.baca-head h2 .ic { color: var(--flame); }
.baca-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.baca-tools select { height: 48px; border-radius: 14px; border: 1px solid var(--line); padding: 0 14px; font: inherit; font-weight: 700; background: #fff; color: var(--ink); }
.search-box { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff; color: var(--ink-3); }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,89,184,.12); }
.search-box input { border: 0; outline: 0; flex: 1; font: inherit; min-width: 0; background: transparent; color: var(--ink); }
.list-dot { padding-left: 20px; color: var(--ink-2); }
.list-dot li { margin-bottom: 8px; }
.mini-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.mini-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--sun-soft); color: #7a5200; font-weight: 800; font-size: 13px; }
.book-detail { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; margin-bottom: 56px; }
.book-cover { border-radius: 8px 22px 22px 8px; overflow: hidden; box-shadow: 0 30px 50px -24px rgba(13,47,95,.55); aspect-ratio: 3 / 4; background: var(--sky-soft); position: relative; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(160deg, var(--sky), var(--blue)); }
.book-info h2 { font-size: clamp(26px, 3.2vw, 38px); margin: 12px 0 8px; }
.book-info .lead-sm { font-size: 17px; color: var(--ink-2); }
.book-info .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attrib { font-size: 14px; color: var(--ink-3); background: var(--bg-2); border-radius: 14px; padding: 14px 16px; line-height: 1.7; }
.home-baca { background: linear-gradient(160deg, #fff4cf, #ffe6dc); }
@media (max-width: 900px) {
  .book-detail { grid-template-columns: 1fr; }
  .book-cover { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .baca-stats { grid-template-columns: 1fr; gap: 10px; margin-bottom: 32px; }
  .baca-stats .bs { padding: 14px 16px; }
  .baca-tools select { flex: 1 1 140px; }
}

/* ---------- Kalender akademik ---------- */
.cal-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h3 { margin: 0; font-size: 24px; }
.cal-nav { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.cal-nav:hover { background: var(--sky-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cw { text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-3); padding: 4px 0; }
.cd { aspect-ratio: 1; border-radius: 12px; border: 0; background: var(--bg-2); font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
  animation: cdIn .4s ease both; animation-delay: calc(var(--i, 0) * 12ms); }
.cd.pad { background: transparent; cursor: default; animation: none; }
.cd:not(.pad):hover { background: var(--sky-soft); }
.cd.sun span { color: var(--flame); }
.cd.has { background: var(--sun-soft); }
.cd i { display: flex; gap: 3px; }
.cd i b { width: 6px; height: 6px; border-radius: 50%; background: var(--flame); }
.cd.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cd.sel { background: var(--navy); color: #fff; }
.cd.sel span { color: #fff; }
.cd.sel i b { background: var(--sun); }
@keyframes cdIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* ---------- Struktur organisasi ---------- */
.org { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-top { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.org-line { width: 3px; height: 34px; background: var(--sky); border-radius: 3px; }
.org-group { width: 100%; border-top: 3px solid var(--sky); padding-top: 22px; margin-bottom: 26px; position: relative; }
.org-label { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: var(--sky); color: #fff; font-weight: 800; font-size: 13.5px; padding: 5px 14px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.org-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.org-node { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.org-node img, .org-node .ini { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.org-node b { font-size: 14.5px; line-height: 1.3; color: var(--navy); }
.org-node small { color: var(--ink-3); font-weight: 700; font-size: 12.5px; }
.org-node.lead { min-width: 240px; padding: 22px; border: 2px solid var(--sun); background: var(--sun-soft); }
.org-node.lead img, .org-node.lead .ini { width: 96px; height: 96px; }
.org-node.lead b { font-size: 17px; }
@media (max-width: 900px) {
  .cal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cal { padding: 14px; }
  .cal-grid { gap: 4px; }
  .cd { border-radius: 9px; font-size: 14px; }
  .org-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .org-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cd { animation: none; } }

/* ---------- Animasi tambahan website ---------- */
/* Garis kemajuan gulir di atas layar */
.scroll-bar { position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 120; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--sun), var(--flame), var(--sky)); pointer-events: none; }
/* Awan melayang pelan, bintang berkelip */
.deco.cloud { animation: cloudDrift 16s ease-in-out infinite alternate; }
.deco:not(.cloud) { animation: twinkle 3.2s ease-in-out infinite; }
@keyframes cloudDrift { to { transform: translateX(46px); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.75) rotate(20deg); opacity: .6; } }
/* Tombol berkilau saat disorot */
.btn { position: relative; overflow: hidden; }
.btn-sun::after, .btn-blue::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
}
.btn-sun:hover::after, .btn-blue:hover::after { animation: shineS .75s ease; }
@keyframes shineS { from { left: -60%; } to { left: 130%; } }
/* Statistik, misi, dan kebiasaan hidup saat disentuh */
.stat { transition: transform .25s, box-shadow .25s; }
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat:hover i, .dim:hover i, .habit:hover i { animation: wiggleS .55s ease; }
@keyframes wiggleS { 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } }
.mission { transition: transform .25s, box-shadow .25s, border-color .25s; }
.mission:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #ffe28a; }
.mission:hover::before { animation: wiggleS .55s ease; }
.habit { transition: transform .2s, border-color .2s; }
.habit:hover { transform: translateY(-3px) scale(1.03); border-color: var(--sun); }
/* Garis kicker memanjang saat bagian muncul */
.sec-head .kicker::before { transition: width .6s cubic-bezier(.2,.8,.2,1); }
.sec-head:hover .kicker::before { width: 40px; }
/* Gambar kartu sedikit membesar */
.card:hover .thumb img, .gal a:hover img { transform: scale(1.06); }
/* Gerakan muncul yang lebih hidup */
.reveal { transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); transform: translateY(28px) scale(.98); }
.reveal.in { transform: none; }
.cards > .reveal:nth-child(2), .dims > .reveal:nth-child(2), .missions > .reveal:nth-child(2) { transition-delay: .08s; }
.cards > .reveal:nth-child(3), .dims > .reveal:nth-child(3), .missions > .reveal:nth-child(3) { transition-delay: .16s; }
.dims > .reveal:nth-child(4), .missions > .reveal:nth-child(4) { transition-delay: .24s; }
.dims > .reveal:nth-child(n+5), .missions > .reveal:nth-child(5) { transition-delay: .3s; }
.habits > .reveal:nth-child(2n) { transition-delay: .06s; }
.habits > .reveal:nth-child(3n) { transition-delay: .12s; }
/* Kartu buku melayang bergantian */
.shelf .bk { animation: bkIn .6s cubic-bezier(.2,.8,.2,1) both; }
.shelf .bk:nth-child(2) { animation-delay: .05s; } .shelf .bk:nth-child(3) { animation-delay: .1s; }
.shelf .bk:nth-child(4) { animation-delay: .15s; } .shelf .bk:nth-child(5) { animation-delay: .2s; }
.shelf .bk:nth-child(n+6) { animation-delay: .25s; }
.bk-grid .bk { animation: bkIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes bkIn { from { opacity: 0; transform: translateY(18px) rotate(-2deg); } }
.page-hero h1 { animation: heroIn .7s cubic-bezier(.2,.8,.2,1) both; }
.page-hero p, .page-hero .crumbs { animation: heroIn .7s .1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .deco, .shelf .bk, .bk-grid .bk, .page-hero h1, .page-hero p, .page-hero .crumbs { animation: none !important; }
  .scroll-bar { display: none; }
}

/* ---------- Footer selalu di dasar layar (halaman pendek) ---------- */
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app > main { flex: 1 0 auto; }

/* ---------- Halaman 404 ---------- */
.nf-hero .wrap { padding: 40px 20px 110px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.nf-hero h1 { margin: 6px 0 10px; }
.nf-hero p { margin: 0 auto; max-width: 620px; }
.nf-code { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--display); font-weight: 800; line-height: 1; }
.nf-code span { font-size: clamp(110px, 17vw, 190px); color: #fff; text-shadow: 0 10px 0 rgba(13, 47, 95, .25); }
.nf-code img {
  width: clamp(104px, 14vw, 156px); height: clamp(104px, 14vw, 156px); object-fit: contain; padding: 12px;
  background: #fff; border-radius: 50%; box-shadow: 0 0 0 10px rgba(255, 255, 255, .22), var(--shadow);
  animation: nfFloat 4s ease-in-out infinite;
}
@keyframes nfFloat { 50% { transform: translateY(-10px) rotate(-4deg); } }
.nf-path {
  display: inline-block; max-width: 100%; padding: 2px 10px; border-radius: 999px; background: rgba(13, 47, 95, .28);
  color: #fff; font-family: ui-monospace, Consolas, monospace; font-size: .9em; word-break: break-all; vertical-align: middle;
}
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 26px 0 22px; }
.nf-search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; padding: 6px 6px 6px 18px;
  background: #fff; border-radius: 999px; box-shadow: var(--shadow); color: var(--ink-3);
}
.nf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); padding: 8px 0; }
.nf-search:focus-within { box-shadow: 0 0 0 3px var(--sun), var(--shadow); }
.nf-content { padding-top: 24px; }
.nf-title { text-align: center; font-size: clamp(24px, 3vw, 30px); margin-bottom: 22px; }
.nf-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nf-link {
  display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nf-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sky-2); color: var(--ink); }
.nf-link > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.nf-link b { font-family: var(--display); font-size: 18px; color: var(--navy); }
.nf-link small { color: var(--ink-2); font-size: 14px; }
.nf-link > .ic:last-child, .nf-link > svg:last-child { color: var(--ink-3); flex: none; }
.nf-ic { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--sky-soft); color: var(--blue); }
.nf-link:nth-child(3n+2) .nf-ic { background: var(--sun-soft); color: #b07d00; }
.nf-link:nth-child(3n+3) .nf-ic { background: var(--leaf-soft); color: var(--leaf); }
@media (max-width: 900px) { .nf-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .nf-hero .wrap { padding: 28px 16px 90px; }
  .nf-links { grid-template-columns: 1fr; }
  .nf-hero .deco:not(.cloud) { display: none; }
  .nf-actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .nf-code img { animation: none; } }
