/* ============================================
   Cargo Template B374 — Replica
   Based on https://4170741.cargo.site/
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --swatch-1: rgba(0, 0, 0, 0.85);
  --swatch-2: rgba(0, 0, 0, 0.75);
  --swatch-3: rgba(0, 0, 0, 0.6);
  --swatch-4: rgba(0, 0, 0, 0.4);
  --swatch-5: rgba(0, 0, 0, 0.25);
  --accent: #FF0000;
  --bg: #ffffff;
  --page-pad: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 525;
  line-height: 1.1;
  color: var(--swatch-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--swatch-1);
  text-decoration: none;
}

a:hover {
  opacity: 0.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Hide scrollbar */
body::-webkit-scrollbar { width: 0; }

/* ============================================
   Crease / Spine Overlay
   ============================================ */

.crease {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  width: auto;
}

.crease img {
  height: 100vh;
  width: auto;
  display: block;
}

.crease-highlight {
  mix-blend-mode: screen;
}

.crease-shadow {
  mix-blend-mode: multiply;
}

/* ============================================
   Pinned Top Nav
   ============================================ */

.pinned-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--page-pad);
  background: var(--bg);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.nav-left,
.nav-right {
  font-size: 1.1rem;
  font-weight: 525;
  line-height: 1.1;
}

.brand {
  color: var(--swatch-1);
}

.nav-right a {
  color: var(--swatch-1);
}

/* ============================================
   Pinned Bottom Footer
   ============================================ */

.pinned-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--page-pad);
  padding-bottom: 0.8rem;
  background: var(--bg);
}

.footer-row {
  display: grid;
  grid-template-columns: 6fr 4fr 2fr;
  gap: 2rem;
  align-items: end;
}

.footer-left a {
  color: var(--swatch-1);
}

.footer-center {
  text-align: right;
}

.footer-right {
  text-align: right;
}

/* ============================================
   Page Sections
   ============================================ */

.page {
  padding: 0;
}

main {
  padding-top: 3rem;   /* space for fixed nav */
  padding-bottom: 3rem; /* space for fixed footer */
}

/* ============================================
   Two-Column Spread
   ============================================ */

.spread {
  display: flex;
  width: 100%;
  gap: 0;
}

.col {
  width: 50%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-end;
}

.col img {
  display: block;
  width: 100%;
  height: auto;
}

.col-left.align-right,
.align-right {
  text-align: right;
}

.col-left.align-right {
  align-items: flex-end;
}

.col-left.align-right img {
  margin-left: auto;
}

img.align-right {
  margin-left: auto;
}

/* ============================================
   Full Width Image
   ============================================ */

.full-width {
  width: 100%;
}

.full-width img {
  display: block;
  width: 100%;
  height: auto;
}

.full-width.align-right {
  display: flex;
  justify-content: flex-end;
}

.full-width.align-right img {
  width: 66%;
}

/* ============================================
   Index Gallery Grid (4 columns)
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: var(--page-pad);
}

.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-item img:hover {
  opacity: 0.85;
}

.gallery-item figcaption {
  font-size: 0.8rem;
  font-weight: 525;
  line-height: 1.1;
  color: var(--swatch-4);
  margin-top: 0.4rem;
  padding-bottom: 0.5rem;
}

/* ============================================
   Information Page
   ============================================ */

.information {
  padding: 4rem var(--page-pad) 4rem;
  max-width: 100%;
}

.info-section {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--swatch-1);
}

.info-section:first-child {
  border-top: 1px solid var(--swatch-1);
}

.info-label {
  width: 200px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 525;
  color: var(--swatch-1);
}

.info-body {
  flex: 1;
  line-height: 1.4;
  color: var(--swatch-2);
}

.info-body p {
  margin-bottom: 0.8em;
}

.info-body p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Zoomable Images
   ============================================ */

.zoomable {
  cursor: pointer;
  transition: opacity 0.2s;
}

.zoomable:hover {
  opacity: 0.85;
}

/* ============================================
   Quick-View Lightbox
   ============================================ */

.quick-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.quick-view.open {
  display: flex;
}

.quick-view-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: qvFadeIn 0.3s ease;
}

.quick-view-frame {
  position: relative;
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  animation: qvSlideIn 0.35s ease;
}

.quick-view-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

/* Nav arrows */
.qv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(87, 87, 87, 0.35);
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
  padding: 0;
}

.qv-nav:hover {
  background: rgba(87, 87, 87, 0.6);
}

.qv-nav:active {
  opacity: 0.7;
}

.qv-prev {
  left: -50px;
}

.qv-next {
  right: -50px;
}

/* Caption */
.qv-caption {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 525;
  color: var(--swatch-4);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
}

.qv-caption:empty {
  display: none;
}

/* Animations */
@keyframes qvFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes qvSlideIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Closing state */
.quick-view.closing .quick-view-bg {
  animation: qvFadeOut 0.25s ease forwards;
}

.quick-view.closing .quick-view-frame {
  animation: qvSlideOut 0.25s ease forwards;
}

@keyframes qvFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes qvSlideOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}

/* ============================================
   Responsive — Mobile
   ============================================ */

@media (max-width: 768px) {
  body {
    font-size: calc(1.1rem * 1.3);
  }

  .crease {
    display: none;
  }

  .spread {
    flex-direction: column;
  }

  .col {
    width: 100%;
  }

  .col img,
  .full-width.align-right img {
    width: 100% !important;
  }

  img.align-right {
    margin-left: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-center {
    display: none;
  }

  .info-section {
    flex-direction: column;
    gap: 0.5rem;
  }

  .info-label {
    width: auto;
    text-align: left;
  }

  .quick-view-frame {
    width: 92%;
    height: 75%;
  }

  .qv-prev { left: 5px; }
  .qv-next { right: 5px; }
}
