/*
 * Design page — a deliberately distinct look from the photography pages.
 * Photography = dark, soft, serif-italic, editorial.
 * Design       = light "paper", bold uppercase sans, grid lines, a punchy
 *                accent, and a numbered editorial index.
 * Everything is scoped under .design-page so the rest of the site is
 * untouched. It still shares the brand name, header and footer for cohesion.
 */
.design-page {
  --d-bg: #ece7dc;
  --d-paper: #f5f1e8;
  --d-ink: #16140f;
  --d-muted: #6f6a5e;
  --d-line: rgba(22, 20, 15, 0.16);
  --d-accent: #ff4d23;
  background: var(--d-bg);
  color: var(--d-ink);
}

/* ---------- Header (light variant) ---------- */
.design-page .site-header {
  color: var(--d-ink);
  background: rgba(245, 241, 232, 0.7);
  backdrop-filter: blur(10px);
}
.design-page .site-header .brand small { color: var(--d-muted); }
.design-page .site-header.scrolled {
  background: rgba(245, 241, 232, 0.85);
  box-shadow: 0 1px 0 var(--d-line);
}
.design-page .nav a:hover,
.design-page .nav a.active { color: var(--d-accent); }
.design-page .nav a::after { background: var(--d-accent); }

/* ---------- Typographic hero ---------- */
.design-hero {
  padding: 168px 0 56px;
  border-bottom: 1px solid var(--d-line);
}
.design-hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 40px;
}
.design-hero .eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--d-accent);
  margin-bottom: 18px;
}
.design-hero h1 {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
  font-size: clamp(3rem, 11vw, 9rem);
  margin: 0;
}
.design-hero h1 .amp { color: var(--d-accent); }
.design-hero .lead {
  color: var(--d-muted);
  font-size: 1.05rem;
  max-width: 42ch;
  margin: 0 0 6px;
}

/* ---------- Editorial index grid ---------- */
.design-index { padding: 64px 0 40px; }

/* Section split (Apparel / Print) */
.design-section + .design-section { margin-top: 96px; }
.design-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 22px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--d-line);
}
.design-section-head .sec-no {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--d-accent);
}
.design-section-head h2 {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1;
  margin: 0;
}
.design-section-head p {
  grid-column: 2;
  color: var(--d-muted);
  margin: 12px 0 0;
  max-width: 48ch;
}

/* Justified gallery: images keep their real proportions, and each row is
   scaled by JS to fill the full width — edge-to-edge, aligned, no cropping. */
.design-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.design-item {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--d-paper);
  border: 1px solid var(--d-line);
  /* width/height are set inline by js/design.js (justifyGrid) */
  height: 240px;
}

.design-item .frame {
  position: absolute;
  inset: 0;
}
.design-item .frame img,
.design-item .frame video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* exact fit — JS sizes each tile to its own ratio */
  display: block;
  opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.6s var(--ease);
}
.design-item .frame img.loaded,
.design-item .frame video.loaded { opacity: 1; }
.design-item:hover .frame img { transform: scale(1.04); }
/* Videos play inline with controls — keep them steady (no hover zoom) so the
   control bar stays in place and clickable. */
.design-item .frame video { cursor: default; }

.design-item .index-no {
  position: absolute;
  pointer-events: none;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: #fff;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.design-item:hover .index-no { opacity: 1; }

.design-item .meta {
  position: absolute;
  pointer-events: none;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 26px 12px 11px;
  background: linear-gradient(0deg, rgba(18, 16, 11, 0.78), rgba(18, 16, 11, 0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.design-item:hover .meta { opacity: 1; transform: none; }
/* Hide the bottom caption on video tiles so it never overlaps the native
   playback control bar. */
.design-item[data-type="video"] .meta { display: none; }
.design-item .meta h3 {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  line-height: 1.2;
  color: #fff;
  margin: 0;
}
.design-item .meta .cat {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

/* ---------- Back-to-photography note ---------- */
.design-note {
  border-top: 1px solid var(--d-line);
  text-align: center;
  padding: 64px 0;
}
.design-note p { color: var(--d-muted); margin: 0; }
.design-note a {
  color: var(--d-ink);
  border-bottom: 1px solid var(--d-accent);
  padding-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}
.design-note a:hover { color: var(--d-accent); }

/* ---------- Footer on light bg ---------- */
.design-page .site-footer { border-top: 1px solid var(--d-line); }
.design-page .site-footer .brand { color: var(--d-ink); font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; }
.design-page .site-footer .social a { color: var(--d-muted); }
.design-page .site-footer .social a:hover { color: var(--d-accent); }
.design-page .site-footer .copy { color: var(--d-muted); }

/* ---------- Lightbox (light theme) ---------- */
.design-page .lightbox { background: rgba(236, 231, 220, 0.97); }
.design-page .lightbox img {
  border: 1px solid var(--d-line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}
.design-page .lightbox button { color: var(--d-ink); }
.design-page .lb-counter { color: var(--d-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .design-hero .container { grid-template-columns: 1fr; gap: 22px; }
}
/* Mobile dropdown menu, light variant to match the Design page. */
@media (max-width: 860px) {
  .design-page .nav {
    background: var(--d-paper);
    border-top-color: var(--d-line);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
  }
  body.nav-open.design-page .site-header {
    background: var(--d-paper);
  }
}
@media (max-width: 640px) {
  .design-hero { padding: 130px 0 40px; }
}
