/* Nulogic digital brochures: page-turning flipbook.
   Without JS the pages simply stack as a scrolling document. */
:root {
  --flare: #e13844;
  --burgundy: #7d191b;
  --putty: #e8ddce;
  --rust: #dd8358;
  --ink: #2a0708;
  --bg-1: #5c1417;
  --bg-2: #2a0708;
  --white: #fff;
  --bar-h: 68px;
  --nav-h: 64px;
  --radius: 999px;
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 40%, var(--bg-1) 0%, var(--bg-2) 70%) fixed, var(--bg-2);
  min-height: 100%;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  height: var(--bar-h); padding: 0 clamp(16px, 3vw, 32px);
}
.bar__logo { display: block; flex: none; }
.bar__logo img { display: block; height: 30px; width: auto; }
.bar__title {
  margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--putty); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 20px; border-left: 1px solid rgba(232, 221, 206, .25);
}
.bar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--ghost { border: 1px solid rgba(232, 221, 206, .35); color: var(--putty); list-style: none; }
.btn--ghost::-webkit-details-marker { display: none; }
.btn--ghost:hover { background: rgba(232, 221, 206, .12); border-color: var(--putty); }
.btn--solid { background: var(--flare); color: var(--white); border: 1px solid var(--flare); }
.btn--solid:hover { background: #f04a55; }
.btn:focus-visible, .nav__btn:focus-visible, .nav__dot:focus-visible, .spot:focus-visible {
  outline: 2px solid var(--putty); outline-offset: 3px;
}

.more { position: relative; }
.more__list {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none;
  min-width: 240px; background: var(--white); color: var(--ink); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.more__list a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600; }
.more__list a:hover { background: var(--putty); }

/* ---------- Pages: no-JS fallback (stacked) ---------- */
.stage { padding: 8px 16px 120px; }
.book { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }
.page { position: relative; margin: 0; }
.page img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.spot { position: absolute; display: block; border-radius: 4px; }
.spot:hover { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.hint { display: none; }
.nav { display: none; }

/* ---------- Flipbook mode (JS on) ---------- */
html.js, html.js body { overflow: hidden; height: 100%; }
html.js .stage {
  position: fixed; inset: var(--bar-h) 0 calc(var(--nav-h) + 28px) 0;
  padding: 8px clamp(16px, 3vw, 40px) 0;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none;
}
html.js .book { position: relative; display: block; max-width: none; margin: 0; gap: 0; }
html.js .page { position: absolute; top: 0; height: 100%; display: none; cursor: pointer; }
html.js .page.is-on { display: block; }
html.js .page img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); -webkit-user-drag: none; }
html.js .page.is-single { left: 0; width: 100%; }
html.js .page.is-single img { border-radius: 3px; }
html.js .page.is-left { left: 0; width: 50%; }
html.js .page.is-right { left: 50%; width: 50%; }
html.js .page.is-left img { border-radius: 3px 0 0 3px; }
html.js .page.is-right img { border-radius: 0 3px 3px 0; }
/* spine shading on spreads */
html.js .page.is-left::after, html.js .page.is-right::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none;
}
html.js .page.is-left::after { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .22), transparent); }
html.js .page.is-right::after { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .18), transparent); }

html.js .book.turn-next { animation: turnNext .38s cubic-bezier(.2, .7, .2, 1); }
html.js .book.turn-prev { animation: turnPrev .38s cubic-bezier(.2, .7, .2, 1); }
@keyframes turnNext { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes turnPrev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .book.turn-next, html.js .book.turn-prev { animation: none; }
}

html.js .hint {
  display: block; position: absolute; left: 0; right: 0; bottom: -24px; margin: 0; text-align: center;
  font-size: 12px; color: var(--putty); opacity: .7; transition: opacity .4s; pointer-events: none;
}
html.js .hint.is-gone { opacity: 0; }

/* ---------- Bottom nav (pill, as on the Moments brochure) ---------- */
html.js .nav {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 10px; height: var(--nav-h); padding: 0 10px;
  max-width: calc(100vw - 32px);
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.nav__btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; transition: background .2s;
}
.nav__btn:hover:not(:disabled) { background: var(--putty); }
.nav__btn:disabled { opacity: .25; cursor: default; }
.nav__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav__btn[data-next] { background: var(--flare); color: var(--white); }
.nav__btn[data-next]:hover:not(:disabled) { background: #f04a55; }
.nav__dots { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.nav__dot { width: 22px; height: 22px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.nav__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #cdbfb0; transition: width .25s, background .25s; }
.nav__dot:hover::before { background: var(--rust); }
.nav__dot[aria-current="true"]::before { width: 20px; border-radius: 4px; background: var(--flare); }
.nav__label { font-size: 13px; font-weight: 600; white-space: nowrap; min-width: 150px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.nav__label b { color: var(--flare); margin-right: 8px; }

/* ---------- Brochure index ---------- */
body.index { overflow: auto; }
.shelf {
  max-width: 1160px; margin: 0 auto; padding: 24px 16px 64px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px;
}
.card { text-decoration: none; display: grid; gap: 6px; }
.card img { width: 100%; aspect-ratio: 596 / 842; object-fit: cover; border-radius: 3px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: transform .25s; }
.card:hover img { transform: translateY(-4px); }
.card__title { font-weight: 700; margin-top: 8px; }
.card__meta { font-size: 13px; color: var(--putty); opacity: .75; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .hide-sm, .bar__title { display: none; }
  .bar__actions .btn--ghost:not(summary) { display: none; }
}
@media (max-width: 560px) {
  :root { --bar-h: 60px; --nav-h: 56px; }
  .bar { gap: 10px; }
  .bar__logo img { height: 24px; }
  .btn { height: 34px; padding: 0 12px; font-size: 12px; }
  .more { display: none; }
  .nav__dots { display: none; }
  .nav__label { min-width: 0; flex: 1; text-align: center; }
  html.js .nav { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  html.js .hint { display: none; }
}
