/* ── PROJECT PAGE — full-width gallery + side panel ── */

/* ── OVERVIEW TAB (fixed right edge) ── */
.ov-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  background: var(--color-navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 12px;
  border-radius: 12px 0 0 12px;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s;
}
.ov-tab:hover { background: #021e3a; }

.ov-tab__label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ov-tab__arrow {
  transition: transform 0.35s ease;
}
.ov-tab.is-open {
  right: 440px;
}
.ov-tab.is-open .ov-tab__arrow {
  transform: rotate(180deg);
}

/* ── OVERVIEW PANEL ── */
.ov-panel {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  height: 100vh;
  background: #fff;
  z-index: 290;
  box-shadow: -4px 0 48px rgba(0,0,0,0.12);
  overflow-y: auto;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.ov-panel.is-open {
  right: 0;
}

.ov-panel__close {
  position: sticky;
  top: 0;
  left: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 24px 24px 0 auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
  z-index: 1;
}
.ov-panel__close:hover { color: var(--color-text); }

.ov-panel__inner {
  padding: 0 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* back link inside panel */
.ov-back {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #aaa;
  transition: color 0.2s;
  display: inline-block;
}
.ov-back:hover { color: var(--color-text); }

/* tag */
.ov-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-navy);
  border: 1px solid var(--color-navy);
  border-radius: 100px;
  padding: 4px 12px;
}

/* project name */
.ov-name {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--color-navy);
  line-height: 1;
}

/* meta rows */
.ov-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid #ebebeb;
  border-bottom: 1px solid #ebebeb;
}
.ov-meta__row {
  display: flex;
  justify-content: space-between;
}
.ov-meta__row span:first-child {
  font-family: var(--font-sans);
  font-size: 12px;
  color: #aaa;
  letter-spacing: 0.04em;
}
.ov-meta__row span:last-child {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}

/* content blocks */
.ov-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-block__label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bbb;
}
.ov-block__sublabel {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.ov-block__text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text);
}

/* numbered design decisions */
.ov-decisions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.ov-decisions li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ov-decisions__num {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-navy);
  flex-shrink: 0;
  padding-top: 2px;
}

.ov-decisions__title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.ov-decisions__body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  color: #666;
}

/* ── DIM OVERLAY ── */
.ov-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 280;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.ov-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── GALLERY ── */
.pg-gallery {
  padding-top: 0; /* nav is transparent + fixed — images go full bleed to top */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── HERO IMAGE WITH OVERLAID TITLE ── */
.pg-hero {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  flex-shrink: 0;
}

.pg-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.pg-back {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #999;
  transition: color 0.2s;
}
.pg-back:hover { color: var(--color-text); }

/* images */
.pg-img {
  margin: 0;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.pg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.6s ease;
}
.pg-img:hover img {
  transform: scale(1.02);
}

.pg-img--tall  { aspect-ratio: 4 / 3; }
.pg-img--wide  { aspect-ratio: 21 / 9; }
.pg-img        { aspect-ratio: 16 / 10; } /* default */

/* video — not full bleed, 40px margin each side */
.pg-img--video {
  margin: 0 40px;
  width: calc(100% - 80px);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
}
.pg-img--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* two images side by side */
.pg-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pg-duo .pg-img { aspect-ratio: 3 / 4; }

/* next project */
.pg-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px 40px;
  border-top: 1px solid #ebebeb;
  margin-top: 40px;
}
.pg-next span {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bbb;
}
.pg-next a {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  color: var(--color-navy);
  transition: letter-spacing 0.4s ease;
}
.pg-next a:hover { letter-spacing: 0.04em; }

@media (max-width: 768px) {
  .ov-panel { right: -100%; width: 100%; height: 100dvh; z-index: 310; overscroll-behavior: contain; }
  .ov-panel.is-open { right: 0; }
  .ov-tab { top: auto; bottom: 20px; right: 16px; transform: none; flex-direction: row; padding: 14px 18px; border-radius: 100px; min-height: 48px; }
  .ov-tab__label { writing-mode: horizontal-tb; transform: none; font-size: 12px; }
  .ov-tab.is-open { right: 16px; visibility: hidden; }
  .ov-panel__close { width: 44px; height: 44px; margin: 12px 16px 0 auto; background: white; color: var(--color-navy); border-radius: 50%; }
  .ov-panel__inner { padding: 0 20px 40px; gap: 24px; }
  .ov-name { font-size: clamp(30px, 9vw, 48px); overflow-wrap: anywhere; }
  .ov-meta__row { gap: 16px; align-items: baseline; }
  .ov-meta__row span:last-child { text-align: right; max-width: 68%; overflow-wrap: anywhere; }
  .pg-gallery { padding-top: var(--nav-height); gap: 12px; }
  .pg-hero { height: auto; }
  .pg-hero img { height: auto; object-fit: contain; }
  .pg-img, .pg-duo .pg-img { aspect-ratio: auto; }
  .pg-img img { height: auto; object-fit: contain; }
  .pg-duo { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pg-img--video { width: calc(100% - 32px); margin: 0 16px; border-radius: 10px; aspect-ratio: 16 / 9; }
  .pg-next { padding: 32px 20px 96px; margin-top: 12px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .pg-next a { font-size: clamp(26px, 7vw, 48px); overflow-wrap: anywhere; }
}
