/* Clean glass in the style of macOS Control Center: barely tinted, heavy blur, one thin bright rim,
   solid white for whatever is selected. */
:root {
  --brand: #0891B2; --brand-dark: #0E7490; --brand-deep: #155E75;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', Inter, system-ui, sans-serif;
  --page: #E9F0F3; --ink: #1D1D1F; --muted: rgba(29, 29, 31, .72); --accent-text: var(--brand-deep);
  --glass: rgba(255, 255, 255, .2); --glass-strong: rgba(255, 255, 255, .36);
  --blur: blur(10px) saturate(1.3); --blur-card: blur(14px) saturate(1.3);
  --rim: rgba(255, 255, 255, .9); --rim-low: rgba(255, 255, 255, .3); --shadow: 0 6px 24px rgba(15, 30, 45, .1);
  --line: rgba(29, 29, 31, .1); --hover: rgba(255, 255, 255, .45);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0A1218; --ink: #FFFFFF; --muted: rgba(255, 255, 255, .78); --accent-text: color-mix(in srgb, var(--brand) 40%, #fff);
  --glass: rgba(40, 50, 64, .16); --glass-strong: rgba(18, 26, 36, .34);
  --rim: rgba(255, 255, 255, .32); --rim-low: rgba(255, 255, 255, .07); --shadow: 0 6px 24px rgba(0, 0, 0, .22);
  --line: rgba(255, 255, 255, .14); --hover: rgba(255, 255, 255, .1);
}
* { box-sizing: border-box; }
html { scroll-snap-type: y proximity; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.track > div { height: 100vh; scroll-snap-align: start; }

.glass { position: relative; border-radius: 999px; background: var(--glass); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, var(--rim), var(--rim-low) 45%, var(--rim-low) 70%, var(--rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tint { background: var(--brand-dark); color: #fff; }
.press { transition: transform .3s cubic-bezier(.3, 1.3, .5, 1); }
.press:active { transform: scale(.96); }

/* Top: two floating capsules */
.top { position: fixed; top: 16px; left: 16px; right: 16px; z-index: 30; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; }
.top > * { pointer-events: auto; }
.group { display: flex; align-items: center; gap: 2px; padding: 6px; }
.logo { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 8px; color: var(--ink); border-radius: 999px; text-decoration: none; font-weight: 700; font-style: italic; font-size: 20px; letter-spacing: -.02em; }
.link { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-size: 15px; font-weight: 500; cursor: pointer; }
.link:hover, .round:hover, .logo:hover { background: var(--hover); }
.logo img { display: block; height: 36px; width: auto; }
a.link { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.tag { padding: 0 14px; font-size: 13px; color: var(--muted); }
.round { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.round[aria-pressed="true"], .round[aria-pressed="true"]:hover { background: #fff; color: #1D1D1F; }
.round .sun, [data-theme="dark"] .round .moon { display: none; }
[data-theme="dark"] .round .sun { display: block; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); cursor: pointer; }
.pill.tint { color: #fff; }

/* Hotspots: solid white badge with the port code on glass */
#hotspots { position: fixed; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.hot { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  pointer-events: auto; cursor: pointer; transition: opacity .3s; }
.hot .plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #1D1D1F;
  font-size: 24px; font-weight: 300; line-height: 1; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.hot .plus::before { display: none; }
.hot .code { padding: 5px 11px; font-size: 13px; font-weight: 600; }
.hot.p3 .code { background: var(--brand-dark); color: #fff; }
.hot.off { opacity: .35; }
.hot[aria-expanded="true"] .plus { transform: rotate(45deg); }
#pop { position: fixed; z-index: 12; width: 300px; padding: 18px 20px; border-radius: 24px; background: var(--glass-strong); }
#pop[hidden] { display: none; }
#pop h3 { margin: 0; font-size: 22px; font-weight: 600; }
#pop p { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
#pop dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
#pop dt { color: var(--muted); }
#pop dd { margin: 0; text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Text card */
.card { position: fixed; left: 24px; bottom: 116px; z-index: 20; width: min(540px, calc(100vw - 48px)); padding: 26px 28px 28px;
  border-radius: 28px; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur-card); backdrop-filter: var(--blur-card); }
.card article { position: relative; display: flex; flex-direction: column; gap: 14px; animation: rise .5s cubic-bezier(.3, 1.2, .5, 1); }
.card article[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-text); }
h1 { margin: 0; font-size: clamp(34px, 3.4vw, 50px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; }
h2 { margin: 0; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; }
.card p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.foot { font-size: 12px; line-height: 1.5; color: var(--muted); }
.nowebgl { display: none; }
.no-webgl .nowebgl { display: block; }

/* Bottom: tab bar and network switch; the selected item gets a solid white lens */
.bar { position: fixed; left: 24px; right: 24px; bottom: 20px; z-index: 20; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs, .seg { display: flex; align-items: center; gap: 2px; padding: 5px; }
.lens { position: absolute; z-index: 1; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; opacity: 0; background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12); transition: transform .5s cubic-bezier(.3, 1.3, .5, 1), width .5s cubic-bezier(.3, 1.3, .5, 1), opacity .25s; }
.chip { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 74px; height: 56px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.chip small { font-size: 11px; font-weight: 500; white-space: nowrap; }
.chip[aria-current="step"] { color: #1D1D1F; }
.progress { position: absolute; left: 28px; right: 28px; bottom: 2px; height: 2px; border-radius: 2px; overflow: hidden; background: var(--line); }
#fill { display: block; width: 0; height: 100%; background: var(--brand); }
.net { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#caption { padding: 8px 14px; font-size: 13px; }
.seg .lab { padding: 0 8px 0 12px; font-size: 13px; color: var(--muted); }
.seg button { position: relative; z-index: 2; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: none;
  font-size: 15px; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { color: #1D1D1F; font-weight: 600; }

/* Auto tour indicator: chapter, time to the next chapter, stop button */
.tour { position: fixed; top: 88px; left: 50%; transform: translateX(-50%); z-index: 31; display: flex; align-items: center; gap: 12px;
  padding: 5px 5px 5px 18px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.tour[hidden] { display: none; }
.tour-bar { width: 96px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tour-bar i { display: block; height: 100%; width: 0; background: var(--brand); animation: tourfill 8s linear forwards; }
@keyframes tourfill { to { width: 100%; } }

/* Over the detail sections: story card, bar and hotspots fade out, the scene dims */
.card, .bar, #hotspots { transition: opacity .3s, visibility .3s; }
#scene { transition: filter .4s; }
.in-details .card, .in-details .bar, .in-details #hotspots, .in-details #pop { visibility: hidden; opacity: 0; }
.in-details #scene { filter: brightness(.8) blur(4px); }

/* "Lihat detail" sheet, opened from each chapter */
.card .detail { align-self: flex-start; }
.sheet { position: fixed; right: 24px; top: 88px; max-height: calc(100vh - 204px); z-index: 25; display: flex; flex-direction: column; gap: 10px;
  width: min(580px, calc(100vw - 620px)); min-width: 420px; padding: 20px 22px; border-radius: 28px; background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-card); backdrop-filter: var(--blur-card); animation: slidein .45s cubic-bezier(.3, 1.2, .5, 1); }
.sheet[hidden] { display: none; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
#sheet-body { overflow: auto; overscroll-behavior: contain; padding-right: 4px; }

/* Tables, meters and the fuel slider: shared by the sheet and the detail sections (.data) */
.data h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; scroll-margin-top: 96px; }
.tscroll { overflow-x: auto; }
.data table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.data th { padding: 6px 8px; text-align: left; font-weight: 500; color: var(--muted); white-space: nowrap; }
.data td { padding: 7px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.data td:nth-child(n+3) { white-space: nowrap; }
.data .hi { background: color-mix(in srgb, var(--brand) 16%, transparent); font-weight: 600; }
.data .note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.data a { color: var(--accent-text); font-weight: 600; }
.meter { margin: 10px 0; }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.meter-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 8px; background: var(--brand); }
.fuel-top { font-size: 14px; font-weight: 600; }
.fuel input { width: 100%; margin: 8px 0; accent-color: var(--brand); }
/* Detail sections: glass panels scrolling over the fixed scene after the story */
.details { position: relative; z-index: 22; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; width: min(1040px, calc(100vw - 32px)); margin: 0 auto; padding: 96px 0 64px; }
section.detail { border-radius: 28px; padding: 28px 32px 32px; background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-card); backdrop-filter: var(--blur-card); scroll-margin-top: 88px; }
section.detail h2 { margin: 0 0 12px; font-size: clamp(24px, 2.4vw, 32px); scroll-margin-top: 88px; }
section.detail p { max-width: 72ch; margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }
section.detail .data table, section.detail table { font-size: 14px; }
.netsw { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 14px; padding: 4px; }
.netsw .lab { padding: 0 8px 0 12px; font-size: 13px; color: var(--muted); }
.netsw button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-size: 14px; font-weight: 500; cursor: pointer; }
.netsw button[aria-pressed="true"] { background: #fff; color: #1D1D1F; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
a[aria-disabled="true"] { cursor: default; opacity: .75; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.fact { padding: 4px 18px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); }
section.detail .fact p { font-size: 14px; }
section.detail .fact .case { color: var(--ink); }
section.detail a { color: var(--accent-text); font-weight: 600; }
@media (max-width: 1100px) {
  .sheet { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; min-width: 0; max-height: 72vh; border-radius: 24px; }
}

@media (max-width: 900px) {
  .links, .tag, .laporan { display: none; }
  .card { left: 12px; right: 12px; width: auto; bottom: 196px; padding: 20px 22px; border-radius: 24px; }
  .card p { font-size: 15px; }
  h1 { font-size: 30px; } h2 { font-size: 26px; }
  .bar { left: 12px; right: 12px; bottom: 12px; }
  .chip { min-width: 0; padding: 0 10px; }
  #caption { display: none; }
  .details { width: calc(100vw - 24px); padding-top: 80px; }
  section.detail { padding: 20px 18px 24px; border-radius: 24px; }
  .netsw button { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card article, .sheet { animation: none; }
  .lens, .press, .hot .plus, .card, .bar, #hotspots, #scene { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, .92); --glass-strong: rgba(255, 255, 255, .96); }
  :root[data-theme="dark"] { --glass: rgba(28, 34, 42, .94); --glass-strong: rgba(22, 28, 36, .97); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .9); --glass-strong: rgba(255, 255, 255, .95); }
  :root[data-theme="dark"] { --glass: rgba(28, 34, 42, .92); --glass-strong: rgba(22, 28, 36, .95); }
}
