/* Benang Senja: panggung terbelah. Separuh layar selalu kain, separuh lagi halaman buku contoh. */
:root {
  --ground: #6E3238; --ground-2: #5C282E; --ground-3: #7E3D43; --ink: #F2E3D6;
  --m: clamp(16px, 3vw, 44px);
  --s-body: clamp(1.0625rem, 1rem + .2vw, 1.1875rem);
  --s-lead: clamp(1.375rem, 1.2rem + .8vw, 1.875rem);
  --s-head: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--s-body)/1.5 "Instrument Sans", system-ui, sans-serif; -webkit-text-size-adjust: 100%; overflow-x: clip; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.02em; line-height: .98; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stage { position: sticky; top: 48px; height: calc(100svh - 48px); background: var(--ground-2); overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .28s ease; }
.stage.ganti canvas { opacity: .25; }
.stage canvas { animation: ayun 16s ease-in-out infinite alternate; }
@keyframes ayun { from { transform: scale(1.06) translate(-1.6%, -1.2%); } to { transform: scale(1.06) translate(1.6%, 1.2%); } }
.stage-cap { position: absolute; left: 0; bottom: 0; background: var(--ground); padding: 10px 18px 10px var(--m); font-family: "Instrument Serif", Georgia, serif; font-size: var(--s-lead); line-height: 1.1; }

.col { padding: 0 var(--m); min-width: 0; }
.head { padding: clamp(32px, 7vh, 72px) 0 clamp(64px, 12vh, 120px); }
.logo { display: block; width: min(330px, 82%); height: auto; margin-bottom: clamp(48px, 12vh, 112px); }
.logo path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: benang 2.2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes benang { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
h1 { font-size: clamp(3rem, 1.5rem + 4.6vw, 6rem); }
.lead { font-size: var(--s-lead); line-height: 1.25; font-family: "Instrument Serif", Georgia, serif; margin: 24px 0 28px; max-width: 28em; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; background: var(--ink); color: var(--ground-2); font-family: inherit; font-size: var(--s-body); font-weight: 500; text-decoration: none; cursor: pointer; transition: transform .14s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

section { padding-bottom: clamp(80px, 14vh, 150px); }
section h2 { font-size: var(--s-head); }
.sub { margin: 12px 0 28px; max-width: 44ch; }

.lembar { display: grid; gap: 4px; }
.lembar button { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 2px 18px; align-items: center; width: 100%; padding: 10px 14px 10px 10px; border: 0; background: var(--ground-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.lembar button:hover { background: var(--ground-3); }
.lembar button[aria-pressed="true"] { background: var(--ink); color: var(--ground-2); }
.lembar i { grid-row: span 2; display: block; width: 112px; height: 86px; background-size: cover; }
.lembar b { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 1.625rem; line-height: 1.05; align-self: end; }
.lembar span { grid-column: 2 / -1; font-size: 1rem; line-height: 1.32; align-self: start; }
.lembar em { font-style: normal; font-weight: 500; align-self: end; white-space: nowrap; }

.model { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.model button { padding: 8px 4px 10px; border: 0; background: var(--ground-2); color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; display: grid; gap: 6px; justify-items: center; transition: background-color .15s ease, color .15s ease; }
.model button:hover { background: var(--ground-3); }
.model button[aria-checked="true"] { background: var(--ink); color: var(--ground-2); }
.model svg { display: block; width: 100%; height: auto; max-width: 110px; }
.ukuran { display: flex; gap: 4px; margin-top: 4px; }
.ukuran button { flex: 1; min-height: 48px; border: 0; background: var(--ground-2); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.ukuran button:hover { background: var(--ground-3); }
.ukuran button[aria-checked="true"] { background: var(--ink); color: var(--ground-2); }
.hasil { margin-top: 28px; }
.meter { font-family: "Instrument Serif", Georgia, serif; font-size: var(--s-head); line-height: 1; }
.hasil p + p { margin: 8px 0 20px; max-width: 44ch; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { position: absolute; left: -9999px; }
th, td { text-align: right; padding: 12px 0; border-top: 1px solid var(--ground-3); }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 500; border-top: 0; }
tbody th { font-weight: 400; font-family: "Instrument Serif", Georgia, serif; font-size: var(--s-lead); line-height: 1.1; }

.alamat .baris { font-family: "Instrument Serif", Georgia, serif; font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.75rem); line-height: 1.12; padding: 12px 0; }
.alamat h2 { margin-bottom: 20px; }
.kaki { padding-bottom: 28px; }

.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.rise.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .stage { top: 52px; height: 30svh; z-index: 5; }
  .stage canvas { height: 100%; }
  .stage-cap { font-size: 1.25rem; padding: 6px 12px 6px var(--m); }
  html { scroll-padding-top: calc(30svh + 64px); }
  .head { padding-top: 24px; }
  .logo { margin-bottom: 28px; }
  .lembar button { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 2px 12px; }
  .lembar i { width: 84px; height: 72px; }
  .model { grid-template-columns: repeat(6, minmax(0, 1fr)); } /* 3 di atas, 2 melebar di bawah, tanpa kotak kosong */
  .model button { grid-column: span 2; }
  .model button:nth-child(n + 4) { grid-column: span 3; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .stage { height: 22svh; }
  html { scroll-padding-top: calc(22svh + 64px); }
  .logo { margin-bottom: 18px; width: min(240px, 70%); }
  .head { padding-top: 16px; }
  h1 { font-size: 2.75rem; }
  .lead { margin: 14px 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage canvas { animation: none; }
  .logo path { animation: none; }
  .rise { opacity: 1; transform: none; transition: none; }
  .stage canvas, .btn { transition: none; }
}
