/* Portal awam SKMB+ — "Pilihan 1": asas cerah dan lapang (gaya Apple) dengan sentuhan GSC terkawal.
   Warna, tulisan dan jejari daripada tokens.css (dikongsi dengan app.skminyakbeku.com). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-navy); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, p, figure { margin: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--brand-ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 104px; padding-bottom: 104px; }
.band { padding: 88px 24px; }
.band .container { padding: 0; }
.band--muted { background: var(--surface-muted); }
.band--dark { background: var(--brand-navy-deep); color: #fff; }
.section-title { font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06; }
.section-title.center { text-align: center; }
.section-lead { margin-top: 8px; font-size: 18px; color: var(--text-muted); }
.band--dark .section-lead { color: var(--text-on-dark-soft); }
.eyebrow { font-family: var(--font-label); font-size: 16px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-navy); }
.body-lg { margin-top: 22px; font-size: 18px; line-height: 1.6; color: var(--text-soft); }

/* Pil dan lencana */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; white-space: nowrap; }
.pill:hover { text-decoration: none; }
.pill--dark { background: var(--brand-navy-deep); color: #fff; font-weight: 600; }
.pill--dark:hover { background: #16294a; }
.pill--line { border: 1px solid #d5d9e0; color: var(--text); }
.pill--line:hover { background: var(--surface-muted); }
.badge { display: inline-block; font-family: var(--font-label); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-pill); color: var(--brand-ink); }
.badge--accent { background: var(--brand-cyan); }
.badge--light { background: #fff; }

/* Kepala laman */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid #e6e8ec; }
.site-nav { max-width: 1160px; margin: 0 auto; padding: 8px 24px; min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img:first-child { height: 30px; width: auto; }
.brand img:last-child { height: 17px; width: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 13px; }
.nav-links a { color: var(--text-soft); padding: 8px 0; }
.nav-login { margin-left: auto; font-size: 13px; min-height: 36px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; place-items: center; }

/* Pengenalan dan slaid sorotan */
.intro { max-width: 1160px; margin: 0 auto; padding: 72px 24px 0; text-align: center; }
.intro__kicker { margin-bottom: 12px; font-size: 17px; font-weight: 500; color: var(--text-muted); }
.intro__title { margin: 0 auto; max-width: 880px; font-size: clamp(44px, 7vw, 88px); line-height: 1.02; font-weight: 600; letter-spacing: -0.035em; }
.intro__lead { margin: 20px auto 0; max-width: 600px; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.45; color: var(--text-soft); }
.spotlight { max-width: 1240px; margin: 44px auto 0; padding: 0 24px; }
.spotlight__frame { position: relative; overflow: hidden; border-radius: 28px; background: var(--brand-navy-deep); color: #fff; }
.slide { position: relative; }
.slide[hidden] { display: none; }
.slide.is-entering { animation: fade 0.5s var(--ease); }
@keyframes fade { from { opacity: 0.2; } to { opacity: 1; } }
.slide__img { width: 100%; height: clamp(360px, 44vw, 580px); object-fit: cover; }
.slide::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(180deg, rgba(8, 18, 31, 0) 0%, rgba(8, 18, 31, 0.9) 100%); pointer-events: none; }
.slide__caption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: clamp(22px, 3.4vw, 44px); padding-right: clamp(22px, 30vw, 380px); padding-bottom: clamp(84px, 7vw, 44px); }
.slide__title { margin-top: 12px; font-size: clamp(26px, 3.6vw, 46px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.slide__link { display: inline-block; margin-top: 10px; font-size: 17px; color: #fff; }
.spotlight__controls { position: absolute; z-index: 2; right: clamp(16px, 3.4vw, 44px); bottom: clamp(18px, 3.4vw, 44px); display: flex; align-items: center; gap: 14px; }
.counter { font-family: var(--font-label); font-size: 17px; font-weight: 700; letter-spacing: 0.08em; }
.counter__total { color: #9aa8bd; }
.progress { display: flex; gap: 5px; }
.progress__bar { width: 40px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); transition: background 0.3s; }
.progress__bar.is-active { background: var(--brand-cyan); }
.round-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; cursor: pointer; }
.round-btn:hover { background: rgba(255, 255, 255, 0.28); }

/* Angka */
.stats { max-width: 1160px; margin: 0 auto; padding: 72px 24px 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px 24px; }
.stat__value { font-size: 56px; font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__label { margin-top: 2px; font-size: 15px; color: var(--text-muted); }

/* Poster sorotan */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; background: #e8ebef; padding: 4px; border-radius: var(--radius-pill); }
.segmented button { font: inherit; font-size: 13px; color: var(--text-soft); background: transparent; border: 0; min-height: 36px; padding: 0 16px; border-radius: var(--radius-pill); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(11, 27, 46, 0.12); }
.posters { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; }
.poster[hidden] { display: none; }
.poster__media { position: relative; }
.poster__media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.poster__media .badge { position: absolute; top: 12px; left: 12px; }
.poster__title { margin-top: 14px; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.poster__summary { margin-top: 4px; font-size: 14px; color: var(--text-muted); }

/* Profil */
.split { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: center; }
.split__text { flex: 1 1 420px; min-width: 0; }
.split__text .section-title { margin-top: 10px; }
.split__img { flex: 1 1 420px; min-width: 0; width: 100%; height: 440px; object-fit: cover; border-radius: var(--radius-xl); }
.more { margin-top: 18px; }
.more summary { cursor: pointer; font-size: 17px; color: var(--brand-navy); list-style: none; display: inline-flex; min-height: 44px; align-items: center; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '›'; margin-left: 6px; transition: transform 0.2s; }
.more[open] summary::after { transform: rotate(90deg); }
.more p { margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--text-soft); }
.pillars { margin-top: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.pillar { background: var(--surface-muted); border-radius: 20px; padding: 32px; }
.pillar .eyebrow { font-size: 15px; color: var(--text-muted); }
.pillar__text { margin-top: 10px; font-size: 18px; line-height: 1.45; color: var(--text-soft); }
.pillar__text--lg { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; color: var(--text); }

/* Carta kejayaan (satu-satunya jalur gelap) */
.ranks { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.rank { background: rgba(255, 255, 255, 0.06); border-radius: 22px; overflow: hidden; }
.rank img { width: 100%; height: 180px; object-fit: cover; }
.rank__body { padding: 20px 22px 24px; display: flex; gap: 16px; align-items: baseline; }
.rank__num { font-family: var(--font-label); font-size: 48px; font-weight: 700; line-height: 1; color: var(--brand-cyan); }
.rank__title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.rank__level { margin-top: 4px; font-size: 14px; color: var(--text-on-dark-soft); }

/* Takwim */
.events { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.event { display: flex; align-items: center; gap: 18px; background: var(--surface-muted); border-radius: var(--radius-lg); padding: 16px 20px; }
.event__date { width: 58px; text-align: center; font-family: var(--font-label); font-weight: 700; }
.event__month { font-size: 13px; letter-spacing: 0.12em; color: var(--brand-navy); }
.event__day { font-size: 34px; line-height: 1; }
.event__title { font-size: 17px; font-weight: 600; }
.event__meta { margin-top: 2px; font-size: 14px; color: var(--text-muted); }

/* Pentadbir */
.leaders { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.leader img, .leader__placeholder { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; }
.leader__placeholder { background: var(--brand-navy-deep); display: grid; place-items: center; }
.leader__placeholder span { font-family: var(--font-label); font-size: 64px; font-weight: 700; letter-spacing: 0.04em; color: var(--brand-cyan); }
.leader figcaption { margin-top: 14px; }
.leader__name { font-size: 16px; font-weight: 600; }
.leader__role { margin-top: 2px; font-size: 14px; color: var(--text-muted); }

/* Galeri */
.gallery { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: 260px; object-fit: cover; border-radius: 16px; }

/* Pautan pantas dan kaki laman */
.quick { border-top: 1px solid #e6e8ec; padding: 36px 0; }
.quick__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quick__label { font-size: 14px; color: var(--text-muted); margin-right: 6px; }
.site-footer { background: var(--surface-muted); padding: 48px 0 40px; font-size: 13px; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.footer-grid img { height: 16px; width: auto; }
.footer-grid p { margin-top: 10px; line-height: 1.6; }
.footer-head { font-weight: 600; color: var(--text); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid #dfe2e7; }
.notfound { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; }

/* Data sekolah (angka rasmi langsung daripada SKMB+) */
.ldata-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ldata-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); }
.ldata-card--wide { grid-column: span 2; }
.ldata-card__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ldata-card__value { font-size: 48px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.ldata-card__note { font-size: 15px; color: var(--text-muted); }
.ldata-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ldata-bars li { display: grid; grid-template-columns: minmax(84px, 48%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.ldata-bars__label { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldata-bars__track { height: 10px; border-radius: 0 4px 4px 0; background: transparent; border-left: 1px solid var(--line-strong); }
.ldata-bars__fill { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; background: #2a78d6; transition: width 0.5s var(--ease); }
.ldata-bars__value { min-width: 32px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ldata-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ldata-chips span { padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-muted); font-size: 13px; }
.ldata-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.ldata-list li { display: flex; flex-direction: column; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.ldata-list__meta { font-size: 13px; color: var(--text-muted); }

@media (max-width: 760px) {
  .ldata-card--wide { grid-column: auto; }
  .ldata-card__value { font-size: 40px; }
  .site-nav { gap: 8px; padding: 8px 16px; }
  .nav-toggle { display: grid; margin-left: 0; order: 3; }
  .nav-links { display: none; order: 4; width: 100%; flex-direction: column; gap: 0; padding: 4px 0 8px; }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 16px; border-top: 1px solid #eef0f3; }
  .nav-login { margin-left: auto; order: 2; padding: 0 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 56px 24px 64px; }
  .stat__value { font-size: 44px; }
  .posters, .leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .poster__media img, .leader img, .leader__placeholder { border-radius: 14px; }
  .poster__title { font-size: 15px; }
  .poster__summary { display: none; }
  .leader__placeholder span { font-size: 44px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery img { height: 150px; border-radius: 12px; }
  .slide__caption { padding-right: 22px; padding-bottom: 86px; }
  .spotlight__controls { left: 22px; right: auto; }
  .split__img { height: 300px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .band { padding: 64px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
