/* Laman utama: hero dengan § besar, panel jawapan, topik, jubin angka, jalur video, tentang, soal jawab. § ialah satu-satunya motif. Lihat DESIGN.md. */

/* ------------------------------------------------------------ gerakan asas: keadaan akhir ialah keadaan asal */
@keyframes rise-in { from { transform: translateY(108%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes sign-in { from { opacity: 0; transform: translateX(9%); } }
@keyframes word-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes mark-in { from { transform: scaleX(0); } }
.js [data-load] { animation: fade-up 800ms var(--ease-out) var(--d, 0ms) backwards; }
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 900ms var(--ease-out) var(--d, 0ms), transform 900ms var(--ease-expo) var(--d, 0ms); }
.js [data-shutter] { clip-path: inset(0 0 100% 0); }
.js [data-shutter] img, .js [data-shutter] video { transform: scale(1.1); }
.js [data-shutter].is-in { clip-path: inset(0); transition: clip-path 1100ms var(--ease-in-out); }
.js [data-shutter].is-in img, .js [data-shutter].is-in video { transform: none; transition: transform 1500ms var(--ease-expo); }

/* ------------------------------------------------------------ hero: § setinggi skrin, dipotong di tepi */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: clamp(560px, calc(100svh - 92px), 880px); }
.hero > .wrap { position: relative; z-index: 2; }
.hero__sign { position: absolute; right: -5vw; top: 0; font-size: min(112vh, 70vw); line-height: .8; font-weight: 700; color: var(--field); pointer-events: none; user-select: none; animation: sign-in 1300ms var(--ease-expo) 200ms backwards; }
.hero__sign::before { content: "§"; }
.hero__t { max-width: min(64%, 920px); padding-block: clamp(40px, 7vh, 96px); }
.hero__h { font-size: clamp(2.75rem, 7.4vw, 8rem); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ln > span { display: block; animation: rise-in 1000ms var(--ease-expo) var(--d, 0ms) backwards; }
.hero__p { margin-top: 28px; max-width: 36ch; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); }
.hero__chips { margin-top: 28px; }
.hero__nws { margin-top: 32px; }
.hero__nws .nws__txt { display: block; }
.chip--s::before { content: "§"; color: var(--accent); font-weight: 700; transition: color var(--t-hover) ease; }
.chip--s:hover::before, .chip--s[aria-pressed="true"]::before { color: var(--bg); }

/* ------------------------------------------------------------ panel jawapan: angka §, petikan tepat, seksyen berkaitan */
.ans { padding-block: clamp(56px, 8vw, 120px); }
.ans__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--margin); row-gap: 40px; }
.ans__tabs { grid-column: 1 / -1; }
.ans__fig { grid-column: 1 / 7; align-self: end; padding-bottom: .12em; font-size: clamp(7rem, 21vw, 22rem); font-weight: 700; letter-spacing: -.07em; line-height: .8; white-space: nowrap; }
.ans__fig--long { font-size: clamp(5rem, 14vw, 15rem); }
.ans__fig .s { color: var(--field); font-weight: 700; }
.ans__txt { grid-column: 7 / 13; align-self: end; min-height: clamp(300px, 28vw, 420px); }
.ans__h { font-size: clamp(2.25rem, 4.6vw, 4.75rem); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.ans__ref { margin-top: 14px; color: var(--muted); font-weight: 500; }
.ans__q { margin-top: 28px; max-width: 30ch; font-size: clamp(1.375rem, 2.2vw, 2rem); line-height: 1.25; letter-spacing: -.02em; }
.ans__q::before { content: "“"; } .ans__q::after { content: "”"; }
.ans__act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.ans__more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.ans__src { margin-top: 20px; max-width: 58ch; font-size: var(--step-small); color: var(--muted); }
.ans__txt.is-set .w { animation: word-in 420ms var(--ease-out) calc(var(--k) * 26ms) backwards; }
.pen { position: relative; isolation: isolate; background: none; color: var(--ink); padding: 0 .12em; margin: 0 -.12em; }
.pen::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tint); transform-origin: left; }
.ans__txt.is-set .pen::before { animation: mark-in 600ms var(--ease-expo) calc(var(--k) * 26ms + 260ms) backwards; }
.ans__relbox { grid-column: 1 / -1; }
.ans__relh { margin-bottom: 16px; font-size: var(--fs-q); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.ans__rel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--margin); }
.ans__rel a { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding: 16px 18px; background: var(--surface); text-decoration: none; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.ans__rel a::before { content: "§"; color: var(--accent); font-weight: 700; transition: color var(--t-hover) ease; }
.ans__rel b { display: block; font-weight: 700; }
.ans__relt { display: block; color: var(--muted); transition: color var(--t-hover) ease; }
.ans__rel a:hover { background: var(--ink); color: var(--bg); }
.ans__rel a:hover::before, .ans__rel a:hover .ans__relt { color: var(--bg); }

/* ------------------------------------------------------------ topik: dua lajur, § sebagai penanda */
.topic { padding-block: 0 clamp(72px, 9vw, 140px); }
.topic__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--margin); }
.topic__pic { grid-column: 1 / 5; grid-row: 1 / 4; min-height: 520px; background: var(--surface); overflow: hidden; }
.topic__pic img { width: 100%; height: 100%; object-fit: cover; }
.topic__h { grid-column: 6 / 13; margin-bottom: clamp(24px, 3vw, 44px); font-size: clamp(2.25rem, 4.4vw, 4.75rem); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.topic__cols { grid-column: 6 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3vw, 48px) var(--margin); align-content: start; }
.grp__h { margin-bottom: 10px; font-size: clamp(1.375rem, 1.9vw, 1.75rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.grp ul { display: grid; gap: 2px; }
.grp__a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: 44px; padding: 6px 0; text-decoration: none; font-weight: 600; }
.grp__a::before { content: "§"; color: var(--accent); font-weight: 700; }
.grp__n { color: var(--muted); font-weight: 400; font-size: var(--step-small); white-space: nowrap; }
.grp__a:hover .grp__t { text-decoration: underline; text-underline-offset: .2em; }
.topic__all { grid-column: 6 / 13; justify-self: start; margin-top: clamp(28px, 3vw, 44px); }

/* ------------------------------------------------------------ tiga jubin angka yang tidak sejajar */
.tiles { padding-block: 0 clamp(72px, 9vw, 140px); }
.tiles__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; min-height: 76vh; align-items: start; }
.tiles__h { grid-column: 7 / 13; align-self: end; margin-bottom: 12px; font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.cell { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; }
.cell b { display: block; font-size: clamp(3.5rem, 5.8vw, 6rem); font-weight: 700; letter-spacing: -.05em; line-height: .9; }
.cell p { max-width: 28ch; }
.c1 { grid-column: 1 / 7; grid-row: 1 / 3; height: 70vh; min-height: 420px; background: var(--field); color: var(--field-ink); }
.c2 { grid-column: 7 / 10; grid-row: 2; height: 44vh; min-height: 300px; margin-top: 6vh; background: var(--ink); color: var(--bg); }
.c3 { grid-column: 10 / 13; grid-row: 2; height: 34vh; min-height: 260px; margin-top: 12vh; background: var(--surface); color: var(--ink); }

/* ------------------------------------------------------------ jalur video Jalan Kuching */
.band { margin: 0; background: var(--surface); }
.band video { width: 100%; aspect-ratio: 21 / 9; max-height: 72vh; object-fit: cover; }
.band figcaption { padding-block: 12px; font-size: var(--step-small); color: var(--muted); }

/* ------------------------------------------------------------ tentang */
.about { padding-block: clamp(72px, 9vw, 140px); }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--margin); align-items: end; }
.about__pics { grid-column: 1 / 6; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.about__map { overflow: hidden; background: var(--surface); }
.about__map img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.about__map--wide img { aspect-ratio: 4 / 3; }
.about__text { grid-column: 7 / 13; display: grid; gap: 20px; justify-items: start; }
.about__h { font-size: clamp(2.25rem, 4.4vw, 4.75rem); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.about__p { max-width: 58ch; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); }
.about__p--soft { color: var(--muted); font-size: var(--step-body); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 32px; width: 100%; }
.facts dt { font-size: var(--step-small); color: var(--muted); }
.facts dd { font-weight: 600; }

/* ------------------------------------------------------------ soal jawab terbuka */
.faq { padding-block: clamp(24px, 4vw, 64px) clamp(72px, 9vw, 140px); }
.faq__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--margin); }
.faq__h { grid-column: 1 / 5; align-self: start; position: sticky; top: 24px; font-size: clamp(2.25rem, 4.4vw, 4.75rem); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.faq__list { grid-column: 6 / 13; }
.qa { display: grid; gap: 8px; padding: 24px 24px 26px; }
.qa:nth-child(odd) { background: var(--surface); }
.qa__q { font-size: clamp(1.25rem, 1.8vw, 1.625rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.qa__a { max-width: 58ch; }

/* ------------------------------------------------------------ saiz kecil */
@media (max-width: 860px) {
  .hero__sign { right: -8vw; font-size: min(88vh, 76vw); }
  .hero__t { max-width: none; }
  .ans__grid { row-gap: 64px; }
  .ans__fig, .ans__txt { grid-column: 1 / -1; }
  .ans__txt { min-height: 0; }
  .ans__rel { grid-template-columns: 1fr; }
  .topic__pic, .topic__h, .topic__cols, .topic__all { grid-column: 1 / -1; grid-row: auto; }
  .topic__pic { min-height: 300px; margin-bottom: 32px; }
  .topic__cols { grid-template-columns: 1fr; }
  .tiles__grid { gap: 20px; min-height: 0; }
  .tiles__h, .c1, .c2, .c3 { grid-column: 1 / -1; grid-row: auto; }
  .cell { height: auto !important; min-height: 220px !important; margin-top: 0 !important; }
  .about__pics, .about__text, .faq__h, .faq__list { grid-column: 1 / -1; }
  .about__pics { margin-bottom: 32px; }
  .about__map img, .about__map--wide img { aspect-ratio: 4 / 3; }
  .faq__h { position: static; margin-bottom: 24px; }
  .band video { aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .hero { display: block; min-height: 0; padding-bottom: 38vw; }
  .hero__sign { top: auto; bottom: -8vw; right: -20vw; font-size: 84vw; }
  .hero__t { padding-block: 40px; }
  .about__pics { grid-template-columns: 1fr; }
  .qa { padding: 20px 18px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-shutter], .js [data-shutter] img, .js [data-shutter] video { opacity: 1; transform: none; clip-path: none; }
}
