:root {
  --navy: #103b5d;
  --blue: #1b83bd;
  --aqua: #7fd7e6;
  --gold: #caa85e;
  --paper: #f7f9fb;
  --ink: #162235;
  --muted: #708096;
  --stage: #181c21;
  --line: rgba(255,255,255,.14);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: #fff;
  background: var(--stage);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, a { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  color: var(--ink);
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(16,59,93,.12);
  position: relative;
  z-index: 20;
}

.icon-button, .close-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.menu-button { width: 36px; height: 36px; padding: 8px; }
.menu-button span { display: block; height: 2px; margin: 4px 0; background: var(--navy); }

.brand {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--navy);
  font-weight: 900;
  letter-spacing: -.06em;
}

.brand strong { display: block; letter-spacing: .1em; font-size: 14px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .15em; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.text-link { color: var(--navy); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.download-button {
  padding: 12px 17px;
  color: #fff;
  background: var(--navy);
  border-radius: 999px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
}

.viewer-shell { min-height: calc(100vh - 76px); padding: 26px 32px 20px; }
.viewer-meta, .viewer-controls {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.viewer-meta { margin-bottom: 16px; }
.eyebrow { color: var(--aqua); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.viewer-meta h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.02em; }

.view-mode { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.view-mode button { border: 0; border-radius: 999px; padding: 8px 13px; color: #9ca7b5; background: transparent; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.view-mode button.active { color: var(--ink); background: #fff; }

.book-stage {
  min-height: calc(100vh - 198px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
  max-width: 1600px;
  margin: auto;
}

.book {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.42));
  perspective: 1800px;
}

.page {
  margin: 0;
  width: min(42%, 520px);
  background: #fff;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1057.5 / 1489;
}

.source-half { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fff; }
.source-half img { position: absolute; top: 0; width: 200%; max-width: none; height: 100%; object-fit: fill; }
.source-half.crop-left img { left: 0; }
.source-half.crop-right img { right: 0; }

.theme-page {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10% 9%;
  overflow: hidden;
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(5,28,46,.84) 0%, rgba(5,28,46,.36) 42%, rgba(5,28,46,.06) 65%, rgba(5,28,46,.48) 100%),
    var(--theme-photo);
  background-size: cover;
  background-position: center, var(--theme-position);
}
.theme-copy { position: relative; z-index: 2; }
.theme-copy > span { color: var(--aqua); font-size: clamp(8px, .72vw, 13px); font-weight: 900; letter-spacing: .22em; }
.theme-page h3 { margin: 4% 0 5%; max-width: 9ch; font-size: clamp(26px, 3vw, 48px); line-height: .98; letter-spacing: -.045em; }
.brand-equation { display: flex; align-items: center; gap: 12px; margin-bottom: 4%; }
.brand-equation b { font-size: clamp(10px, 1vw, 17px); letter-spacing: .15em; }
.brand-equation i { color: var(--aqua); font-size: clamp(16px, 1.7vw, 27px); font-style: normal; font-weight: 300; }
.theme-page p { margin: 0; max-width: 30em; color: rgba(255,255,255,.86); font-size: clamp(8px, .72vw, 13px); line-height: 1.55; }
.product-display { position: absolute; z-index: 3; left: 7%; right: 7%; bottom: 6.5%; height: 30%; display: flex; align-items: flex-end; justify-content: center; gap: 1%; pointer-events: none; }
.product-display img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,.38)); }
.petlance-products { height: 32%; gap: 0; }
.petlance-products img { width: 31%; max-height: 96%; }
.petlance-products .product-1 { transform: rotate(-3deg) translateX(10%); }
.petlance-products .product-2 { width: 37%; transform: translateY(2%); }
.petlance-products .product-3 { transform: rotate(3deg) translateX(-10%); }
.freeze-products { height: 24%; }
.freeze-products img { width: 96%; }
.wet-products { height: 20%; bottom: 8%; }
.wet-products img { width: 92%; }
.wet-products-v2 { height: 23%; bottom: 6.5%; left: 5%; right: 5%; }
.wet-products-v2 img { width: 100%; }
.catnip-products { height: 33%; justify-content: flex-end; gap: 4%; padding-right: 4%; }
.catnip-products img { width: 27%; }
.catnip-products .product-2 { transform: translateY(5%); }
.catnip-products-v2 { height: 35%; bottom: 5.5%; left: 4%; right: 4%; }
.catnip-products-v2 img { width: 100%; }
.petbreeze-products { height: 31%; justify-content: flex-end; gap: 3%; padding-right: 4%; }
.petbreeze-products img { width: 25%; }
.theme-page small { position: absolute; z-index: 4; left: 9%; bottom: 2.5%; color: rgba(255,255,255,.72); font-size: clamp(5px, .43vw, 8px); font-weight: 800; letter-spacing: .1em; }
.left-page { transform-origin: right center; box-shadow: inset -16px 0 22px -22px rgba(0,0,0,.75); }
.right-page { transform-origin: left center; box-shadow: inset 16px 0 22px -22px rgba(0,0,0,.75); }

.book.single .page { width: min(64vw, 620px); }
.book.single .right-page { display: none; }
.book.single .left-page { box-shadow: none; }
.page.hidden { visibility: hidden; }

.page-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.06);
  font-size: 34px;
  line-height: 1;
  transition: .2s ease;
}
.page-arrow:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); transform: scale(1.06); }
.page-arrow:disabled { opacity: .22; cursor: default; }

.viewer-controls { padding-top: 15px; border-top: 1px solid var(--line); color: #aeb8c4; font-size: 11px; }
.viewer-controls button, .viewer-controls a { border: 0; color: inherit; background: transparent; text-decoration: none; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.viewer-controls button:hover, .viewer-controls a:hover { color: #fff; }
.list-icon { margin-right: 7px; font-size: 15px; }
.page-status strong { color: #fff; }
.control-actions { display: flex; gap: 22px; }

.index-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(430px, 88vw);
  padding: 30px 30px 24px;
  z-index: 50;
  color: var(--ink);
  background: var(--paper);
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.22,.75,.25,1);
  overflow-y: auto;
  box-shadow: 26px 0 60px rgba(0,0,0,.28);
}
.index-panel.open { transform: translateX(0); }
.panel-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.52); opacity: 0; pointer-events: none; transition: .25s; }
.panel-scrim.open { opacity: 1; pointer-events: auto; }

.index-heading { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid #dbe2e8; }
.index-heading .eyebrow { color: var(--blue); }
.index-heading h1 { margin: 4px 0 0; font-size: 28px; }
.close-button { font-size: 34px; color: var(--navy); }

.index-nav section { padding: 21px 0 14px; border-bottom: 1px solid #dbe2e8; }
.index-nav h2 { margin: 0 0 10px; color: var(--navy); font-size: 12px; letter-spacing: .12em; }
.index-nav button { width: 100%; border: 0; padding: 9px 0; display: flex; justify-content: space-between; color: #536173; background: transparent; text-align: left; }
.index-nav button:hover, .index-nav button.active { color: var(--blue); }
.index-nav button b { font-size: 10px; color: #9ba7b4; }

.index-footer { padding-top: 24px; }
.index-footer p { margin: 0 0 5px; font-weight: 800; }
.index-footer a { color: var(--blue); text-decoration: none; font-weight: 700; }
.index-footer span { display: block; margin-top: 8px; color: #8995a3; font-size: 11px; }

@media (max-width: 920px) {
  .book-stage { grid-template-columns: 38px minmax(0,1fr) 38px; gap: 6px; min-height: calc(100vh - 215px); }
  .book.spread .right-page { display: none; }
  .book.spread .left-page { width: min(92%, 900px); box-shadow: none; }
  .book.single .page { width: min(82vw, 620px); }
  .view-mode { display: none; }
  .text-link { display: none; }
  .viewer-shell { padding: 21px 12px 16px; }
  .topbar { padding: 0 14px; gap: 11px; }
  .brand small { display: none; }
  .download-button { padding: 10px 12px; font-size: 9px; }
}

@media (max-width: 560px) {
  .topbar { height: 66px; }
  .brand strong { font-size: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .viewer-shell { min-height: calc(100vh - 66px); }
  .viewer-meta { margin-bottom: 10px; }
  .viewer-meta h2 { font-size: 17px; }
  .book-stage { min-height: calc(100vh - 190px); grid-template-columns: 30px minmax(0,1fr) 30px; }
  .page-arrow { width: 30px; height: 42px; border-radius: 8px; font-size: 27px; }
  .viewer-controls { padding-top: 11px; }
  #fullscreenButton { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
