@font-face {
  font-family: 'humnst777_bt';
  src: url(fonts/humnst777-bt-roman.woff) format('woff'),
       url(fonts/humnst777-bt-roman.ttf) format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #fc0;
  --red: #e2001a;
  --dark: #222;
  --gray: #666;
  --light: #f5f5f5;
  --card-radius: 8px;
}

body {
  font-family: 'humnst777_bt', 'Gill Sans', 'Gill Sans MT', Trebuchet, Arial, sans-serif;
  background: var(--light);
  color: var(--dark);
}

/* Header */
header {
  background: var(--yellow);
  border-bottom: 1px solid #e6b800;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
}

.logo {
  display: block;
  height: 48px;
  width: 200px;
  background: url(logo.png) no-repeat left center;
  background-size: contain;
  text-indent: -9999px;
  flex-shrink: 0;
}

.tagline {
  font-size: 0.9rem;
  color: var(--dark);
  opacity: 0.75;
}

/* Grid */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

/* Card */
.card {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}

/* .card-cover {
  aspect-ratio: 10 / 14;
  object-fit: cover;

  width: 100%;
  display: block;
  background: #ddd;
}


*/

 .card-cover {
  width: 100%;
  height: auto;
  display: block;
  background: #ddd;
} 

.card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-edition {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
}

.card-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

.card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.72rem;
  color: var(--gray);
}

/* Card as button */
.card { cursor: pointer; }

/* Footer */
footer {
  border-top: 1px solid #ddd;
  background: #fff;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #142983;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--gray);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  main { padding: 20px 16px 48px; }
  .header-inner { padding: 16px 16px; }
  .footer-inner { padding: 16px 16px 20px; }
  .logo { font-size: 1.8rem; }
  .tagline { display: none; }

  .flipbook-title { font-size: 0.75rem; }
  .flipbook-zoom-btn { width: 28px; height: 28px; }
  .flipbook-zoom-btn img { width: 16px; height: 16px; }
  .flipbook-zoom-level { min-width: 44px; height: 28px; font-size: 0.7rem; padding: 0 4px; }
}

/* ── Flipbook Modal ─────────────────────────────────────────────────────────── */

.flipbook-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flipbook-modal.hidden { display: none; }

.flipbook-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.flipbook-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 12px 16px 16px;
}

.flipbook-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.flipbook-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
  justify-self: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.flipbook-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.flipbook-zoom-btn,
.flipbook-zoom-level {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flipbook-zoom-btn {
  width: 32px;
  height: 32px;
  padding: 0;
}

.flipbook-zoom-btn img {
  width: 18px;
  height: 18px;
  display: block;
  filter: invert(1);
  pointer-events: none;
}

.flipbook-zoom-level {
  min-width: 56px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.flipbook-zoom-btn:hover,
.flipbook-zoom-level:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.flipbook-zoom-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: none;
}

.flipbook-close {
  justify-self: end;
}

.flipbook-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  opacity: 0.65;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.flipbook-close:hover { opacity: 1; }

.flipbook-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.flipbook-zoom-wrapper {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.flipbook-zoom-wrapper.is-zoomed { cursor: grab; }
.flipbook-zoom-wrapper.is-panning { cursor: grabbing; }

#flipbook {
  height: 100%;
  min-height: 0;
  transform-origin: center center;
  will-change: transform;
}

.flipbook-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 4rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 1001;
}

.flipbook-prev { left: 16px; }
.flipbook-next { right: 16px; }


.flipbook-nav:hover { opacity: 1; }

.flipbook-loading {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  opacity: 0.85;
}

.flipbook-loading.hidden { display: none; }

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.page {
  overflow: hidden;
  background: #fff;
}

.page canvas {
  display: block;
  width: 100%;
  height: 100%;
}
