/* ==========================================================================
   CABIN FLUX — Catalog 03 · MATERIAL
   Register: Rolex × Bang & Olufsen × Rimowa Bureau Borsche
   Pure black / pure white. Monumental craft. No gradients. No shadows.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --black: #000000;
  --white: #FFFFFF;
  --aluminum: #C0C0C0;
  --brass: #B8956A;
  --whisper: #8E8E8E;
  --ink: #0a0a0a;

  --font-serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --font-sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --page-w: 600px;
  --page-h: 848px;
}

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

html, body {
  width: 100%; min-height: 100vh;
  background: #111;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Viewer chrome ---------- */
.viewer-shell {
  display: flex; flex-direction: column;
  min-height: 100vh; width: 100%;
  background: #0c0c0c;
}

.viewer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: #000;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--white);
  text-transform: uppercase;
}
.brand-mark .x { color: var(--brass); }

.viewer-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--whisper);
  letter-spacing: 0.05em;
}

.viewer-tools {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-sans);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--whisper);
  text-transform: uppercase;
}
.viewer-tools button {
  background: transparent;
  border: 1px solid #333;
  color: var(--whisper);
  width: 32px; height: 28px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s;
}
.viewer-tools button:hover {
  border-color: var(--brass);
  color: var(--brass);
}

/* ---------- Book stage ---------- */
.book-stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 12px;
  position: relative;
  min-height: 0;
}

.nav-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.7);
  border: 1px solid #2a2a2a;
  color: var(--white);
  width: 44px; height: 64px;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nav-arrow:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--black);
}
.nav-arrow--prev { left: 12px; }
.nav-arrow--next { right: 12px; }

#book {
  margin: 0 auto;
}

/* ---------- Generic page surface ---------- */
.page {
  background: var(--black);
  color: var(--white);
  width: 100%; height: 100%;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}

.page--light { background: var(--white); color: var(--black); }
.page--black { background: var(--black); color: var(--white); }

/* page corners (pageflip) */
.page .pf-page-corner { background: transparent !important; }

.page-inner {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 38px 42px;
  position: relative;
}

/* Brand watermark in corner */
.page-mark {
  position: absolute;
  top: 24px; left: 30px;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 600;
}
.page-mark .x { color: var(--brass); }
.page--light .page-mark { color: var(--ink); }
.page--black .page-mark { color: var(--white); }

.page-num {
  position: absolute;
  bottom: 22px; left: 30px;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--whisper);
}
.page-num-right { left: auto; right: 30px; }

.page-kicker {
  position: absolute;
  bottom: 22px; right: 30px;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--whisper);
}

/* =========================================================================
   01 · COVER
   ========================================================================= */
.page--cover {
  background: var(--black);
  position: relative;
  display: flex; flex-direction: column;
}
.cover-mark {
  position: absolute;
  top: 32px; left: 36px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--white);
}
.cover-mark .x { color: var(--brass); }
.cover-hero-img {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 60px 80px;
}
.cover-hero-img img {
  width: 78%;
  height: auto;
  max-height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 0 0 transparent); /* explicit no-shadow */
}
.cover-foot {
  position: absolute;
  bottom: 32px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--whisper);
}

/* =========================================================================
   02 · TITLE PAGE
   ========================================================================= */
.page--title {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.title-block {
  max-width: 80%;
}
.title-display {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.title-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--whisper);
  letter-spacing: 0.02em;
}

/* =========================================================================
   MACRO / PRODUCT SPREAD PAGES
   ========================================================================= */

/* Macro page (left side): image fills ~80% of frame, centered */
.page--macro {
  display: flex; flex-direction: column;
  padding: 0;
}
.macro-frame {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 8% 8%;
}
.macro-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Caption page (right side): pure field, single line of text centered */
.page--caption {
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 0 50px;
}
.caption-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  max-width: 80%;
}
.caption-kicker {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  margin-bottom: 28px;
  color: var(--brass);
  font-weight: 500;
}

/* =========================================================================
   FULL PRODUCT PAGE (clean shot, pure white)
   ========================================================================= */
.page--product {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 50px;
}
.product-shot {
  flex: 1;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.product-shot img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}
.product-caption {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  margin-top: 18px;
  font-weight: 500;
}

/* =========================================================================
   DIPTYCH (folded / extended)
   ========================================================================= */
.page--diptych {
  display: flex; flex-direction: column;
  padding: 50px 30px;
}
.diptych-pair {
  flex: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}
.diptych-cell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.diptych-cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.diptych-caption {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  margin-top: 18px;
}

/* =========================================================================
   TRIPTYCH (3-up grid)
   ========================================================================= */
.page--triptych {
  display: flex; flex-direction: column;
  padding: 50px 28px 70px;
}
.triptych-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.triptych-cell {
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.triptych-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.triptych-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  text-align: center;
  margin-top: 26px;
  letter-spacing: 0.02em;
  color: var(--white);
}

/* =========================================================================
   BACK COVER
   ========================================================================= */
.page--back {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 40px;
}
.back-mark {
  font-family: var(--font-sans);
  font-size: 22px;
  letter-spacing: 0.38em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 30px;
}
.back-mark .x { color: var(--brass); }
.back-dist {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--whisper);
  margin-bottom: 36px;
  letter-spacing: 0.04em;
}
.back-contact {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  line-height: 2.1;
  color: var(--white);
}
.back-issue {
  position: absolute;
  bottom: 28px; left: 0; right: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 10px;
  color: var(--whisper);
  text-align: center;
  letter-spacing: 0.06em;
}

/* =========================================================================
   MOBILE FALLBACK (no page-flip, vertical stack)
   ========================================================================= */
@media (max-width: 767px) {
  body.mobile .book-stage {
    padding: 0;
  }
  body.mobile .nav-arrow { display: none; }
  body.mobile #book {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    transform: none !important;
  }
  body.mobile #book .page,
  body.mobile #book .stf__parent,
  body.mobile #book .stf__wrapper {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    transform: none !important;
    display: block !important;
  }
  body.mobile .page {
    width: 100% !important;
    aspect-ratio: 600 / 848;
    height: auto !important;
    min-height: 0;
    margin: 0 0 4px 0;
    box-shadow: none;
  }
  body.mobile .viewer-header { padding: 10px 16px; }
  body.mobile .brand-mark { font-size: 11px; }
  body.mobile .viewer-title { display: none; }
  body.mobile .page-inner { padding: 28px 26px; }
  body.mobile .title-display { font-size: 32px; }
}
