/* Odisal Sections · project page (layout 1): centred title, photos in rows of one, two and three with a
   lightbox, the write-up beside a quote card, previous / next and "More projects".
   Room for a fixed header above the title: set --osx-project-top on .osx-project (default 140px, 112px on phones). */
.osx-project { --osx-soft: color-mix(in srgb, var(--osx-text) 86%, var(--osx-dark)); --osx-softer: color-mix(in srgb, var(--osx-text) 70%, var(--osx-dark)); display: block; padding-bottom: 100px; background: linear-gradient(90deg, var(--osx-dark) 0%, var(--osx-dark-2) 100%); }
.osx-project > * { width: 100%; }
.osx-project a { text-decoration: none; }

/* Title, intro, facts */
.osx-project-top { padding-top: var(--osx-project-top, 140px); text-align: center; }
.osx-project .osx-project-h1 { font: 600 54px/1.08 var(--osx-head); color: var(--osx-text); }
.osx-project-h1 em { display: block; font-style: normal; color: var(--osx-accent); }
.osx-project .osx-project-intro { max-width: 620px; margin: 18px auto 0; font-size: 18px; line-height: 1.6; color: var(--osx-soft); }
.osx-project-facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: center; margin: 30px 0 0; }
.osx-project-facts div { padding: 4px 28px 4px 0; margin-right: 28px; border-right: 1px solid rgba(255,255,255,.15); }
.osx-project-facts div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.osx-project-facts dt { font: 400 10.5px/1 var(--osx-label); letter-spacing: 1.8px; text-transform: uppercase; color: var(--osx-muted); }
.osx-project-facts dd { margin: 8px 0 0; font: 400 17px/1.3 var(--osx-head); color: var(--osx-text); }
.osx-project .osx-project-h2 { font: 600 28px/1.2 var(--osx-head); color: var(--osx-text); }

/* Breadcrumb and photo count above the photos */
.osx-project-gallery { margin-top: 44px; }
.osx-project-galhead { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.osx-project .osx-project-crumb { display: flex; flex-wrap: wrap; gap: 10px; font: 400 11px/1 var(--osx-label); letter-spacing: 2px; text-transform: uppercase; color: var(--osx-muted); }
.osx-project-crumb a { color: var(--osx-accent); }
.osx-project-count { flex: none; font: 400 11px/1 var(--osx-label); letter-spacing: 2px; text-transform: uppercase; color: var(--osx-muted); }

/* Photos: rows of one, two, then three (one, then two on phones); the last row always fills the width.
   The row sizes are worked out on the server: --osx-span / data-row for wide screens, --osx-pspan / data-prow for phones. */
.osx-project-gal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.osx-project-ph { position: relative; display: block; grid-column: span var(--osx-span, 2); aspect-ratio: 4 / 3; margin: 0; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--osx-card); cursor: zoom-in; transition: transform 160ms var(--osx-ease-out); }
.osx-project-ph[data-row="1"] { aspect-ratio: 21 / 9; }
.osx-project-ph[data-row="2"] { aspect-ratio: 3 / 2; }
.osx-project-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--osx-ease-out); }
.osx-project-ph:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .osx-project-ph:hover img { transform: scale(1.04); } }

/* The write-up (post content) beside the quote card */
.osx-project-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 70px; align-items: start; margin-top: 80px; }
.osx-project-text { min-width: 0; }
.osx-project-text > :first-child { margin-top: 0; }
.osx-project-text :is(h1, h2, h3, h4, h5, h6) { display: inline-block; margin: 44px 0 0; padding: 8px 13px; border-radius: 999px; background: color-mix(in srgb, var(--osx-accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--osx-accent) 35%, transparent); font: 700 11px/1 var(--osx-label); letter-spacing: 2px; text-transform: uppercase; color: var(--osx-accent); }
.osx-project-text > :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.osx-project .osx-project-text p { max-width: 680px; margin: 14px 0 0; font-size: 16px; line-height: 1.75; color: var(--osx-soft); }
.osx-project-text a { color: var(--osx-accent); text-decoration: underline; text-underline-offset: 3px; }
.osx-project-text strong, .osx-project-text b { font-weight: 600; color: var(--osx-text); }
.osx-project-text ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; margin: 20px 0 0; padding: 0; list-style: none; }
.osx-project-text ul li { position: relative; min-height: 22px; padding-left: 34px; font-size: 15px; line-height: 1.5; color: var(--osx-soft); }
.osx-project-text ul li::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--osx-accent) 16%, transparent); }
.osx-project-text ul li::after { content: ""; position: absolute; left: 4px; top: 4px; width: 14px; height: 14px; background: var(--osx-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.osx-project-text ol { margin: 20px 0 0; padding-left: 22px; color: var(--osx-soft); }
.osx-project-text ol li + li { margin-top: 8px; }
.osx-project-text img { height: auto; margin-top: 20px; border-radius: 18px; }
.osx-project-text figure { margin: 20px 0 0; }

.osx-project-aside { position: sticky; top: 112px; }
.osx-project-card { display: grid; gap: 16px; justify-items: start; padding: 32px 30px 28px; border-radius: 24px; background: var(--osx-card); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); }
.osx-project .osx-project-card h3 { font: 600 24px/1.2 var(--osx-head); color: var(--osx-text); }
.osx-project .osx-project-card p { font-size: 15px; line-height: 1.6; color: var(--osx-softer); }
.osx-project-card .osx-btn { margin-top: 6px; }
.osx-project-wa { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--osx-soft); transition: color 200ms ease; }
.osx-project-wa-ico { width: 18px; height: 18px; flex: none; color: var(--osx-accent); }
@media (hover: hover) and (pointer: fine) { .osx-project-wa:hover { color: var(--osx-accent); } }

/* Previous / next */
.osx-project-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 90px; }
.osx-project-pnl { display: flex; align-items: center; gap: 18px; padding: 12px; border-radius: 20px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: background-color 200ms ease, box-shadow 200ms ease; }
.osx-project-pnl.is-next { grid-column: 2; justify-content: flex-end; text-align: right; }
.osx-project-pnl img, .osx-project-pnl .osx-project-noimg { width: 96px; height: 72px; flex: none; border-radius: 12px; object-fit: cover; object-position: var(--osx-fx, 50%) var(--osx-fy, 50%); background: var(--osx-card); }
.osx-project-pnl > span { display: grid; gap: 6px; min-width: 0; }
.osx-project-pnl small { display: flex; align-items: center; gap: 6px; font: 400 10.5px/1 var(--osx-label); letter-spacing: 1.8px; text-transform: uppercase; color: var(--osx-muted); }
.osx-project-pnl small .osx-ico { width: 14px; height: 14px; }
.osx-project-pnl.is-next small { justify-content: flex-end; }
.osx-project-pnl b { font: 400 17px/1.25 var(--osx-head); color: var(--osx-text); }
@media (hover: hover) and (pointer: fine) { .osx-project-pnl:hover { background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px var(--osx-accent); } }

/* More projects */
.osx-project-more { margin-top: 80px; text-align: center; }
.osx-project-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 26px; text-align: left; }
.osx-project-tile { position: relative; display: block; height: 260px; border-radius: 22px; overflow: hidden; background: var(--osx-card); box-shadow: 0 0 10px rgba(0,0,0,.5); transition: box-shadow 300ms ease; }
.osx-project-tile img, .osx-project-tile .osx-project-noimg { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--osx-fx, 50%) var(--osx-fy, 50%); transition: transform 700ms var(--osx-ease-out); }
.osx-project-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.75)); pointer-events: none; }
.osx-project-cap { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; }
.osx-project-cap b { display: block; font: 400 21px/1.2 var(--osx-head); color: #fff; }
.osx-project-cap span { display: block; font: 400 13px/1.4 var(--osx-body); color: var(--osx-accent); }
.osx-project-more .osx-btn { margin-top: 30px; }
@media (hover: hover) and (pointer: fine) {
  .osx-project-tile:hover img { transform: scale(1.06); }
  .osx-project-tile:hover { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
}

/* Lightbox: one photo per screen, swipe or arrows, counter */
.osx-project-lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: color-mix(in srgb, var(--osx-dark) 25%, #000 75%); color: #fff; }
.osx-project-lb::backdrop { background: rgba(0,0,0,.85); }
.osx-project-lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: osx-project-in 260ms var(--osx-ease-out); }
@keyframes osx-project-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.osx-project-lb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.osx-project-lb-track::-webkit-scrollbar { display: none; }
.osx-project-lb-track figure { flex: none; width: 100%; height: 100%; margin: 0; padding: 70px 80px 10px; display: grid; place-items: center; scroll-snap-align: center; }
.osx-project-lb-track img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.osx-project-lb-ui { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 0 calc(20px + env(safe-area-inset-bottom, 0px)); }
.osx-project-lb-n { min-width: 70px; text-align: center; font: 400 15px/1 var(--osx-head); color: var(--osx-softer); }
.osx-project-lb-ar, .osx-project-lb-x { display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--osx-ease-out); }
.osx-project-lb-ar { width: 48px; height: 48px; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.osx-project-lb-ar:active { transform: scale(.94); }
.osx-project-lb-x { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; width: 40px; height: 40px; background: rgba(255,255,255,.08); }
@media (hover: hover) and (pointer: fine) {
  .osx-project-lb-ar:hover { background: var(--osx-accent); color: var(--osx-dark); box-shadow: none; }
  .osx-project-lb-x:hover { background: rgba(255,255,255,.18); }
}

@media (max-width: 980px) {
  .osx-project-body { grid-template-columns: minmax(0, 1fr); gap: 50px; }
  .osx-project-aside { position: static; }
}
@media (max-width: 760px) {
  .osx-project-top { padding-top: var(--osx-project-top-phone, 112px); }
  .osx-project .osx-project-h1 { font-size: clamp(28px, 8.4vw, 36px); } /* long place names stay on one line */
  .osx-project .osx-project-intro { font-size: 16px; }
  .osx-project-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; text-align: left; }
  .osx-project-facts div, .osx-project-facts div:last-child { display: flex; justify-content: space-between; gap: 16px; padding: 0 0 12px; margin: 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .osx-project-facts dd { margin: 0; text-align: right; font-size: 15px; }
  .osx-project-galhead, .osx-project-gal { margin-left: calc(-1 * var(--osx-gutter-l) + 6px); margin-right: calc(-1 * var(--osx-gutter-r) + 6px); }
  .osx-project-gal { gap: 8px; }
  .osx-project-ph { grid-column: span var(--osx-pspan, 3); border-radius: 12px; }
  .osx-project-ph[data-prow="1"] { aspect-ratio: 3 / 2; }
  .osx-project-ph[data-prow="2"] { aspect-ratio: 4 / 3; }
  .osx-project-tap { display: none; }
  .osx-project-text ul { grid-template-columns: minmax(0, 1fr); }
  /* Side by side like wide screens, photo on top: Previous reads left, Next reads right */
  .osx-project-pn { gap: 10px; margin-top: 60px; }
  .osx-project-pnl, .osx-project-pnl.is-next { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; padding: 8px 8px 14px; border-radius: 16px; }
  .osx-project-pnl.is-next { flex-direction: column-reverse; justify-content: flex-end; }
  .osx-project-pnl img, .osx-project-pnl .osx-project-noimg { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; }
  .osx-project-pnl > span { gap: 8px; padding-inline: 4px; }
  .osx-project-pnl small { gap: 4px; font-size: 10px; letter-spacing: 1.4px; }
  .osx-project-pnl b { font-size: 15px; }
  .osx-project-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .osx-project-tile { height: 160px; }
  .osx-project-tile:first-child { grid-column: span 2; height: 220px; }
  .osx-project-cap { left: 14px; right: 14px; bottom: 12px; }
  .osx-project-cap b { font-size: 16px; }
  .osx-project-lb-track figure { padding: 64px 0 6px; }
  .osx-project-lb-track img { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .osx-project-ph, .osx-project-ph img, .osx-project-tile img { transition: none; }
  .osx-project-lb[open] { animation: none; }
}
