@font-face { font-family: "Fraunces"; font-weight: 100 900; font-style: normal; src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 100 900; font-style: italic; src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Jost"; font-weight: 100 900; src: url("fonts/jost-latin-wght-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #1b1814; --bg2: #26221c; --cream: #f6f1e8; --muted: #b3a998; --gold: #e3c489; --line: rgba(246,241,232,.16);
  --display: "Fraunces", Georgia, serif; --label: "Jost", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--cream); font-family: var(--label); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: rgba(27,24,20,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand .name { font: 400 19px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.brand .name i { font-style: normal; font: 500 9px/1 var(--label); letter-spacing: .42em; margin-left: 4px; color: var(--gold); }
.brand .issue { font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  font: 500 12px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border: 1px solid transparent; background: none; }
.btn.solid { background: var(--gold); color: #1b1814; }
.btn.solid:hover { background: #efd6a4; }
.btn.ghost { border-color: var(--line); color: var(--cream); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 11px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.round:hover { border-color: var(--gold); color: var(--gold); }
.round:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- stage ---------- */
.stage { padding: 18px 16px 8px; display: flex; flex-direction: column; align-items: center; }
.book-wrap { width: 100%; max-width: 620px; }

/* Default (no script, or script failed): pages stack and scroll. */
.book .pg { margin: 0 0 14px; background: var(--cream); box-shadow: 0 8px 28px rgba(0,0,0,.45); cursor: zoom-in; }
.book .pg img { display: block; width: 100%; height: auto; }

/* Flip mode, switched on by viewer.js once the page-flip library is running. */
body.flip .book-wrap { max-width: none; }
body.flip .book .pg { margin: 0; box-shadow: none; }
body.flip .book .pg img { height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
body.flip .stage { min-height: calc(100vh - 62px); min-height: calc(100dvh - 62px); justify-content: center; padding-top: 12px; }

.controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.controls[hidden] { display: none; }
.count { font-size: 13px; letter-spacing: .12em; color: var(--muted); min-width: 64px; text-align: center; }
.hint { margin: 10px 0 0; font-size: 12px; letter-spacing: .06em; color: var(--muted); text-align: center; }

/* ---------- pitch + footer ---------- */
.pitch { margin: 28px auto 0; max-width: 980px; padding: 28px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pitch h2 { margin: 0; font: 300 30px/1.1 var(--display); letter-spacing: -.01em; }
.pitch h2 i { color: var(--gold); }
.pitch p { margin: 10px 0 0; max-width: 520px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.pitch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.foot { padding: 18px 20px 30px; text-align: center; font-size: 11px; line-height: 1.5; letter-spacing: .04em; color: #8b8273; max-width: 760px; margin: 0 auto; }

/* ---------- overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: #12100d; display: flex; flex-direction: column; }
.overlay[hidden] { display: none; }
.ov-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ov-bar #ov-title { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ov-tools { display: flex; gap: 6px; align-items: center; }
.ov-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; text-align: center; touch-action: pan-x pan-y pinch-zoom; }
.ov-scroll img { display: block; margin: 0 auto; width: 100%; max-width: none; height: auto; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .brand .issue { display: none; }
  .brand .name { font-size: 16px; }
  .btn { padding: 0 12px; font-size: 11px; letter-spacing: .1em; }
  .bar { padding: 8px 12px; }
  .stage { padding: 12px 12px 6px; }
  .pitch h2 { font-size: 25px; }
  .ov-tools .round { width: 36px; height: 36px; }
  #ov-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

@media (max-width: 480px) {
  .brand .name { font-size: 14px; letter-spacing: .06em; }
  .brand .name i { display: none; }
  .actions { gap: 6px; }
  .btn { min-height: 38px; padding: 0 11px; font-size: 10.5px; letter-spacing: .08em; }
  .controls { gap: 8px; }
}

.for { margin: 0; padding: 10px 16px; background: #2c271f; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; text-align: center; color: var(--cream); }
.for b { color: var(--gold); font-weight: 500; }

/* ---------- reservable ad spots ---------- */
.book .pg { position: relative; }
.hot { position: absolute; z-index: 4; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5%; text-decoration: none; cursor: pointer; }
.hot span { background: var(--gold); color: #1b1814; font: 600 clamp(8px, 1.15vw, 13px)/1 var(--label); letter-spacing: .14em; text-transform: uppercase; padding: .8em 1.2em; border-radius: 999px; box-shadow: 0 3px 12px rgba(0,0,0,.35); white-space: nowrap; }
.hot.available:hover { background: rgba(227,196,137,.14); outline: 2px solid var(--gold); outline-offset: -2px; }
.hot.mine { align-items: flex-start; padding: 0; }
.hot.mine span { transform: translateY(-60%); }
.hot.sold, .hot.held { background: rgba(27,24,20,.9); align-items: center; padding: 0; cursor: default; }
.hot.sold span, .hot.held span { background: #1b1814; color: var(--gold); border: 1px solid var(--gold); }

@media (max-width: 640px) { .bar { flex-wrap: wrap; row-gap: 8px; } .actions { flex-wrap: wrap; } }
