* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

img, #flipbook img {
  -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none; pointer-events: none;
}
#flipbook { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --paper: #faf9f6;
  --ink: #2d2d2d;
  --ink-light: #4a4a4a;
  --muted: #888;
  --accent: #8b7355;
  --shadow-1: 0 20px 40px -12px rgba(0,0,0,0.25), 0 8px 16px -8px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  --shadow-2: 0 28px 56px -16px rgba(0,0,0,0.3), 0 12px 24px -12px rgba(0,0,0,0.2);
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  background: var(--paper);
}

.cover-wrapper { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.cover {
  max-width: 100%;
  width: clamp(200px, 60vw, 400px);
  height: auto;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow-1);
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

.btn-cta {
  display: inline-block;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: 1rem 3rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-cta:hover { background: #1a1a1a; transform: scale(1.02); }
.btn-cta:active { transform: scale(0.98); }
.btn-cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.description {
  max-width: 560px;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--ink-light);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.7;
}

.closing { border-top: 1px solid #e0dcd4; padding-top: 1.5rem; width: 100%; max-width: 560px; }
.pantun {
  font-style: italic;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: #5a5a5a;
  line-height: 2;
  margin-bottom: 1rem;
  white-space: pre-line;
}
.credit {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--muted);
  font-style: italic;
}

#flipbook-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  padding: clamp(0.5rem, 2vh, 1.5rem);
  overflow: hidden;
}

#flipbook {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.back-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: rgba(0,0,0,0.5);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.15s;
}
.back-link:hover { background: rgba(0,0,0,0.7); transform: translateX(-2px); }
.back-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.nav-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 50;
}
.nav-controls button {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-controls button:hover { background: #fff; transform: scale(1.05); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.nav-controls button:active { transform: scale(0.95); }
.nav-controls button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nav-controls button:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

@media (max-width: 480px) {
  .nav-controls button { width: 48px; height: 48px; font-size: 1.25rem; }
  .back-link { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
}