:root {
  --bg: #0b0c10;
  --text: #f5f5f0;
  --accent: #d4ff3a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow: hidden;
}
body.locked { overflow: hidden; }
[hidden] { display: none !important; }

/* Foto sebagai background utama */
.bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 75%;
  filter: blur(14px) saturate(160%);
  transform: scale(1.08);
  opacity: .55;
  z-index: -2;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: rgba(20, 22, 30, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Kartu kaca ala iOS */
.glass {
  background: linear-gradient(145deg, rgba(30, 33, 42, .42), rgba(30, 33, 42, .18));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 -1px 0 rgba(255, 255, 255, .08);
}

.stage {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.stage .glass {
  width: min(640px, 92vw);
  padding: clamp(28px, 5vw, 56px);
  border-radius: 36px;
  text-align: center;
}
.stage h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(60px, 11vw, 120px);
  line-height: .92; margin: 0; letter-spacing: 1px; text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.stage h1 span { color: transparent; -webkit-text-stroke: 2px var(--accent); }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  color: #0b0c10; background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 30px rgba(212, 255, 58, .35);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-glass {
  color: var(--text);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .24); }

/* Panel dokumen di dalam halaman yang sama */
.viewer {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(11, 12, 16, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade .25s ease;
}
.viewer-card {
  width: min(960px, 100%);
  height: min(88vh, 900px);
  display: flex; flex-direction: column;
  border-radius: 28px;
  overflow: hidden;
  animation: rise .3s ease;
}
.viewer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.viewer-head h2 {
  margin: 0; font-family: "Bebas Neue", sans-serif; font-size: 30px; letter-spacing: 1px; text-transform: uppercase;
}
.viewer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.viewer-actions .btn { padding: 10px 18px; font-size: 14px; }
.viewer-pages {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 16px; background: #2a2c33;
  color: var(--muted); text-align: center;
}
.viewer-pages canvas { max-width: 100%; height: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .stage .glass { border-radius: 28px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .viewer-head { flex-direction: column; align-items: stretch; }
  .viewer-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
