/* ===== HALAMAN PUBLIK (SISWA) — bertema sekolah =====
   Selaras dengan halaman login: kertas kotak-kotak, ilustrasi buku & toga, penggaris kuning. */
:root {
  --primary: #1c2a5a;
  --primary-dark: #121c40;
  --blue: #1c86cf;
  --blue-d: #136aa6;
  --accent: #f5b400;
  --orange: #f39c1f;
  --sky: #e3f3fe;
  --text: #17224a;
  --text-muted: #55638a;
  --bg: #f3f8fd;
  --white: #fff;
  --line: #d6e3f1;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(28, 42, 90, .35);
  --shadow-sm: 0 6px 18px -10px rgba(28, 42, 90, .3);
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--f-body); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── NAVBAR ── */
.navbar { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.navbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.navbar-brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.navbar-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.navbar-logo-placeholder { width: 48px; height: 48px; border-radius: 14px; background: var(--primary); display: grid; place-items: center; flex-shrink: 0; transform: rotate(-6deg); }
.navbar-logo-placeholder svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.navbar-info { min-width: 0; }
.navbar-name { font-family: var(--f-display); font-variation-settings: 'wdth' 90; color: var(--primary); font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-motto { color: var(--text-muted); font-size: .76rem; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-links { display: flex; gap: 4px; list-style: none; flex-shrink: 0; }
.navbar-links a { color: var(--text-muted); font-size: .92rem; font-weight: 600; padding: 8px 14px; border-radius: 10px; transition: background .2s, color .2s; }
.navbar-links a:hover { background: var(--sky); color: var(--primary); }
.navbar-links li:first-child a { background: var(--blue); color: #fff; }
.navbar-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--primary); padding: 6px; border-radius: 8px; }
.navbar-toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ── HERO ── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-bottom: 22px;
  background:
    linear-gradient(rgba(28, 134, 207, .09) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(28, 134, 207, .09) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(180deg, #f4faff 0%, var(--sky) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .16; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 20px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: 12px; }
.hero-content { align-self: center; padding-bottom: clamp(20px, 5vw, 56px); }
.hero-title { font-family: var(--f-display); font-variation-settings: 'wdth' 80, 'opsz' 80; font-weight: 800; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -.025em; color: var(--primary); text-wrap: balance; }
.hero-school { margin-top: 12px; font-family: var(--f-display); font-variation-settings: 'wdth' 92; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.45rem); color: var(--blue-d); }
.hero-year { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 16px 6px 10px; font-weight: 700; font-size: .92rem; color: #7a5300; background: #fff3c4; border: 1.5px solid var(--accent); border-radius: 999px; }
.hero-year svg { width: 20px; height: 20px; fill: none; stroke: #7a5300; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hero-lead { margin-top: 18px; max-width: 36ch; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.hero-cta { display: inline-block; margin-top: 20px; padding: 13px 26px; font: 800 1rem var(--f-display); color: #fff; background: linear-gradient(180deg, #2a9ae6, var(--blue)); border-radius: 12px; box-shadow: 0 4px 0 var(--blue-d), 0 14px 24px -10px rgba(19, 106, 166, .7); transition: transform .12s, box-shadow .12s; }
.hero-cta:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--blue-d), 0 10px 20px -10px rgba(19, 106, 166, .7); }
.hero-cta:active { transform: translateY(4px); box-shadow: 0 0 0 var(--blue-d); }

.scene { display: block; width: 100%; height: clamp(300px, 36vw, 440px); }
.scene .cap { animation: drop .9s cubic-bezier(.3, 1.4, .5, 1) .15s both; }
@keyframes drop { from { opacity: 0; transform: translate(20px, -90px) rotate(-6deg); } }
.scene .pop { transform-box: fill-box; transform-origin: 50% 60%; animation: pop .55s cubic-bezier(.3, 1.5, .5, 1) var(--d, .8s) both; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } }

/* penggaris di dasar hero */
.ruler {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background:
    repeating-linear-gradient(to right, #7d5600 0 1.5px, transparent 1.5px 50px) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(to right, #7d5600 0 1.5px, transparent 1.5px 10px) bottom / 100% 6px no-repeat,
    linear-gradient(180deg, #ffd45c, var(--accent));
}

/* ── KARTU PENCARIAN ── */
.search-wrap { background: var(--bg); padding: 0 20px 50px; }
.search-card { max-width: 720px; margin: -2px auto 0; position: relative; z-index: 10; background: var(--white); border-radius: 0 0 20px 20px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); border-top: 0; }
.search-card-header { padding: 26px 30px 0; display: flex; align-items: center; gap: 16px; }
.search-card-header .icon { flex: none; width: 52px; height: 52px; border-radius: 15px; background: var(--primary); display: grid; place-items: center; transform: rotate(-5deg); }
.search-card-header .icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.search-card-header h2 { font-family: var(--f-display); font-variation-settings: 'wdth' 90; font-size: 1.35rem; color: var(--primary); font-weight: 800; line-height: 1.15; }
.search-card-header p { font-size: .92rem; color: var(--text-muted); margin-top: 2px; }
.search-card-body { padding: 22px 30px 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.form-group label { display: block; font-size: .9rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.form-group input { width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); font: 500 1rem var(--f-body); background: #f6faff; color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s; }
.form-group input:hover { border-color: #aac3de; }
.form-group input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(245, 180, 0, .35); background: #fff; }
.btn-search { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; color: #fff; font: 800 1.05rem var(--f-display); border: 0; cursor: pointer; background: linear-gradient(180deg, #2a9ae6, var(--blue)); box-shadow: 0 4px 0 var(--blue-d), 0 14px 24px -10px rgba(19, 106, 166, .7); transition: transform .12s, box-shadow .12s; }
.btn-search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-search:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-d); }
.search-err { margin-bottom: 16px; padding: 12px 16px; background: #fdf1ef; border-left: 4px solid #a4231a; border-radius: 10px; color: #a4231a; font-size: .93rem; }
.closed-info { text-align: center; padding: 16px 0 6px; }
.closed-info p { color: var(--text-muted); font-size: .98rem; }
.countdown { display: flex; justify-content: center; gap: 12px; margin: 18px 0 6px; }
.countdown-box { text-align: center; min-width: 72px; background: var(--primary); color: #fff; border-radius: 14px; padding: 12px 10px; border-bottom: 4px solid var(--accent); }
.countdown-box b { display: block; font-family: var(--f-display); font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown-box span { font-size: .72rem; opacity: .8; letter-spacing: .05em; }

/* ── HASIL SISWA ── */
.result-wrap { max-width: 760px; margin: 0 auto; padding: 30px 0 10px; }
.result-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); }
.result-card-header { padding: 14px 24px; background: var(--primary); color: #fff; border-bottom: 4px solid var(--accent); }
.result-card-header h2 { font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; }
.result-card-body { padding: 20px 24px; }
.status-banner { text-align: center; padding: 22px 20px; border-radius: 12px; margin-bottom: 16px; }
.status-banner.ok { background: #effaf3; border: 2px solid #7bd39a; }
.status-banner.bad { background: #fdf1ef; border: 2px solid #f0a59d; }
.status-banner.wait { background: #fff6d6; border: 2px solid #f1d34f; }
.status-banner small { font-size: .85rem; color: var(--text-muted); display: block; }
.status-banner strong { display: block; font-family: var(--f-display); font-size: 2.2rem; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.status-banner.ok strong { color: #17803d; }
.status-banner.bad strong { color: #b42318; }
.status-banner.wait strong { color: #8a6100; }
.status-note { margin-top: 4px; color: #2f6f47; font-size: .95rem; }
.bio-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bio-table tr td { padding: 9px 10px; }
.bio-table tr:not(:last-child) td { border-bottom: 1px dashed var(--line); }
.bio-table td:first-child { font-weight: 600; color: var(--text-muted); width: 170px; white-space: nowrap; }
.scores-table { width: 100%; border-collapse: collapse; font-size: .93rem; margin-top: 4px; }
.scores-table th { background: var(--sky); color: var(--primary); padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--accent); }
.scores-table th.num { width: 46px; text-align: center; }
.scores-table th.val { width: 80px; text-align: right; }
.scores-table td { padding: 9px 12px; border-bottom: 1px dashed var(--line); }
.scores-table td.num { text-align: center; color: var(--text-muted); }
.scores-table td.val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.scores-table tr.sum td { font-weight: 800; border-top: 2px solid var(--primary); border-bottom: 0; background: #fff8dc; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn { padding: 11px 22px; border-radius: 12px; font: 700 .95rem var(--f-body); cursor: pointer; border: 2px solid transparent; display: inline-block; transition: background .2s, color .2s, transform .12s; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-d); }
.btn-primary:hover { background: #2a9ae6; }
.btn-primary:active { transform: translateY(2px); box-shadow: none; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ── INFORMASI / PENGUMUMAN / KONTAK ── */
.section { padding: 48px 20px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-title { font-family: var(--f-display); font-variation-settings: 'wdth' 88; font-size: 1.7rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; display: inline-block; background: linear-gradient(transparent 62%, rgba(245, 180, 0, .55) 62%); }
.section-subtitle { color: var(--text-muted); font-size: .98rem; margin-bottom: 24px; }
.info-section { background: var(--sky); background-image: linear-gradient(rgba(28, 134, 207, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(28, 134, 207, .07) 1px, transparent 1px); background-size: 30px 30px; }
.info-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.info-banner-left { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 240px; }
.info-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: var(--accent); display: grid; place-items: center; font: 800 1.5rem var(--f-display); flex-shrink: 0; transform: rotate(-6deg); }
.info-banner-left strong { color: var(--primary); font-family: var(--f-display); font-size: 1.15rem; }
.info-list { margin-top: 6px; padding-left: 18px; max-width: 60ch; }
.info-list li { font-size: .95rem; margin-bottom: 4px; }
.info-script { font-family: var(--f-display); font-style: italic; font-size: 1.5rem; color: var(--primary); font-weight: 700; text-align: right; flex-shrink: 0; line-height: 1.3; min-width: 220px; }

.pengumuman-section { background: var(--white); }
.pengumuman-box { background: #fffbea; border-radius: var(--radius); padding: 24px 28px 24px 34px; border: 1px solid #f1e1a0; border-left: 6px solid var(--accent); font-size: .98rem; line-height: 1.85; white-space: pre-wrap; }
.pengumuman-empty { text-align: center; padding: 32px; color: var(--text-muted); background: var(--bg); border: 2px dashed var(--line); border-radius: var(--radius); }

.kontak-section { background: var(--bg); }
.kontak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kontak-card { background: var(--white); border-radius: var(--radius); padding: 20px; display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-bottom: 4px solid var(--accent); transition: transform .15s, box-shadow .2s; }
a.kontak-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.kontak-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.kontak-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kontak-icon.wa { background: #dcf7e6; color: #17803d; }
.kontak-icon.info { background: #dcecfb; color: var(--blue-d); }
.kontak-label { font-size: .82rem; font-weight: 700; color: var(--text-muted); }
.kontak-val { font-size: 1rem; font-weight: 700; margin-top: 2px; color: var(--primary); overflow-wrap: anywhere; }

/* ── FOOTER ── */
.footer { position: relative; background: var(--primary-dark); color: rgba(255, 255, 255, .8); padding: 32px 20px 28px; border-top: 6px solid var(--accent); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-sosmed { display: flex; gap: 8px; }
.sosmed-btn { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); color: #fff; font-size: 16px; font-weight: 700; transition: background .2s, transform .15s; border: 1px solid rgba(255, 255, 255, .18); }
.sosmed-btn:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }
.footer-copy { font-size: .85rem; color: rgba(255, 255, 255, .65); }

/* ── RESPONSIF ── */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-content { padding-bottom: 0; }
  .hero-lead { max-width: none; }
  .scene { height: 260px; margin-top: 8px; }
}
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; z-index: 200; box-shadow: 0 12px 20px -12px rgba(28, 42, 90, .3); }
  .navbar-links.open a { display: block; padding: 11px 14px; }
  .navbar-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .search-card { border-radius: 0 0 16px 16px; }
  .search-card-body, .search-card-header { padding-left: 18px; padding-right: 18px; }
  .search-card-header { padding-top: 22px; }
  .info-script { text-align: left; }
  .footer-inner { flex-direction: column; text-align: center; }
  .bio-table td:first-child { width: auto; white-space: normal; }
}
@media (max-width: 400px) {
  .countdown { gap: 6px; }
  .countdown-box { min-width: 56px; padding: 10px 6px; }
  .countdown-box b { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene .cap, .scene .pop { animation: none; }
  .hero-cta, .btn-search, .btn { transition: none; }
}

.scores-table tr.group-row td { background: var(--sky); color: var(--primary); padding: 8px 12px; border-bottom: 1px solid var(--line); }
