/* Design project pages only: layout, mockup sizing and collateral viewer */
.p-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-700) var(--space-500); padding: var(--space-700) var(--gutter) var(--space-900); align-items: start; }
.p-main { display: contents; }

.p-main > .p-side { grid-column: 1; grid-row: 1; align-self: start; justify-self: center; width: min(100%, 460px); }
.p-main > .p-side img { max-height: 70vh; }
.p-main > .p-side.p-placeholder { aspect-ratio: 3 / 4; }
.p-main > .p-side--float { width: min(100%, clamp(400px, 38vw, 680px)); padding: 0; background: none; border: 0; box-shadow: none; }
@media (min-width: 1800px) { .p-main > .p-side--float { width: min(100%, 760px); } .p-main > .p-side--float.is-cards img { max-height: 88vh; } }
.p-split.has-wide-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.p-main > .p-side--float.is-cards { width: 100%; }
.p-main > .p-side.p-side--float.is-cards img { max-height: 84vh; box-shadow: none; filter: none; }
.p-main > .p-side.p-side--float img { max-height: 78vh; width: 100%; height: auto; box-shadow: 0 46px 70px -30px rgba(40, 36, 30, 0.5), 0 10px 22px -12px rgba(40, 36, 30, 0.3); }
.p-main > .p-side.p-side--float.is-cutout { width: min(90%, clamp(440px, 42vw, 720px)); overflow: visible; }
.p-main > .p-side.p-side--float.is-cutout img { max-height: 76vh; box-shadow: none; filter: drop-shadow(0 30px 26px rgba(40, 36, 30, 0.28)); }
.p-main > .p-side--float.p-placeholder { border: 1px dashed rgba(42, 42, 42, 0.25); padding: var(--space-300); aspect-ratio: 3 / 4; }
.p-main > .p-side--float:hover { transform: translateY(-6px); }
.p-main > .p-side--float:hover img { box-shadow: 0 60px 90px -34px rgba(40, 36, 30, 0.55), 0 14px 26px -12px rgba(40, 36, 30, 0.34); }

.p-aside { grid-column: 2; grid-row: 1; align-self: start; display: grid; gap: var(--space-600); width: min(100%, 520px); }
.p-aside .p-label { max-width: none; }
.p-aside h2 { font-family: var(--font-hero); font-weight: 400; font-size: var(--text-heading); line-height: var(--lh-heading); margin: 0 0 var(--space-300); }

.p-main > .p-frame:nth-child(n+2) { grid-column: auto; }
.p-main > .p-frame:nth-child(even):last-child { grid-column: 1 / -1; justify-self: center; width: min(100%, 620px); }

.p-main .p-frame { position: relative; transition: opacity 1.2s var(--ease-expo), transform 1.4s var(--ease-expo), box-shadow 0.7s ease-out; }
.p-main .p-frame img { width: auto; max-width: 100%; max-height: 44vh; height: auto; margin: 0 auto; }
.p-main .p-zoom { display: block; cursor: zoom-in; }
.p-main .p-frame:not(.p-placeholder)::after { content: "View"; position: absolute; right: 24px; bottom: 24px; padding: 8px 14px; background: var(--accent); color: #f5f5f5; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease-out, transform 0.5s var(--ease-expo); pointer-events: none; }
.p-main .p-frame:not(.p-placeholder):hover::after { opacity: 1; transform: none; }
.p-main .p-reveal:not(.is-in) { opacity: 0; transform: translateY(32px); }
.p-main .p-frame.is-in:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(42, 42, 42, 0.35); }

.p-lightbox { position: fixed; inset: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; border: 0; padding: 0; background: rgba(22, 21, 20, 0.94); }
.p-lightbox::backdrop { background: transparent; }
.p-lightbox[open] { display: grid; place-items: center; }
.p-lightbox figure { margin: 0; display: grid; justify-items: center; gap: 16px; padding: 72px 110px; box-sizing: border-box; }
.p-lightbox img { display: block; max-width: 100%; max-height: 80vh; object-fit: contain; }
.p-lightbox figcaption { color: rgba(245, 245, 245, 0.6); font-size: 12px; letter-spacing: 0.14em; }
.p-lb__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(245, 245, 245, 0.35); background: transparent; color: #f5f5f5; font: inherit; font-size: 18px; cursor: pointer; transition: background-color 0.4s ease-out, border-color 0.4s ease-out; }
.p-lb__btn:hover, .p-lb__btn:focus-visible { background: var(--accent); border-color: var(--accent); }
.p-lb__close { top: 24px; right: 24px; }
.p-lb__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.p-lb__next { right: 24px; top: 50%; transform: translateY(-50%); }
.p-lightbox[open] img { animation: lb-in 0.7s var(--ease-expo) both; }
@keyframes lb-in { from { opacity: 0; transform: scale(0.98); } }

@media (max-width: 900px) {
  .p-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-500); }
  .p-main > .p-side, .p-aside { grid-column: 1; grid-row: auto; width: 100%; justify-self: stretch; }
  .p-main > .p-frame:nth-child(even):last-child { width: 100%; }
  .p-lightbox figure { padding: 64px 56px; }
}
@media (prefers-reduced-motion: reduce) { .p-lightbox[open] img { animation: none; } .p-main .p-reveal { transition: none !important; } }
