.projects-page { background: #fff; }
.projects-hero { position: relative; height: 74vh; overflow: hidden; color: #fff; background: radial-gradient(circle at 82% 35%, rgba(79,19,19,.18), transparent 38%), #141414; }
.projects-noise { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 180px; pointer-events: none; }
.projects-corner { position: absolute; width: 40px; height: 40px; }
.projects-corner-top { top: 32px; left: 32px; border-top: 1px solid rgba(255,255,255,.08); border-left: 1px solid rgba(255,255,255,.08); }
.projects-corner-bottom { right: 32px; bottom: 32px; border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.projects-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1104px; height: 100%; margin: 0 auto; padding: 96px 0 64px; display: flex; flex-direction: column; justify-content: flex-end; }
.projects-hero-inner > .mono-label { margin: 0 0 22px; font-size: 10px; letter-spacing: .45em; }
.projects-hero h1 { margin: 0; font-family: Syne, sans-serif; font-size: 64px; font-weight: 700; line-height: 1.03; letter-spacing: -.025em; }
.projects-hero h1 em { color: rgba(255,255,255,.55); font-style: normal; }
.projects-hero-inner > p:not(.mono-label) { max-width: 550px; margin: 24px 0 0; color: rgba(255,255,255,.42); font-size: 16px; line-height: 32px; }
.projects-hero-actions { margin-top: 30px; display: flex; gap: 12px; }
.projects-hero-actions a { height: 48px; padding: 0 28px; display: inline-flex; align-items: center; gap: 10px; border-radius: 14px; font-size: 14px; font-weight: 600; transition: color .15s, background .15s, border-color .15s; }
.projects-primary-button { color: #fff; background: var(--button-red); }
.projects-primary-button:hover { background: var(--button-red-hover); }
.projects-secondary-button { color: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
.projects-secondary-button:hover { color: #fff; border-color: rgba(255,255,255,.20); background: rgba(255,255,255,.08); }
.projects-secondary-button svg { width: 15px; height: 15px; }

.projects-gallery-section { padding: 80px max(40px, calc((100vw - 1104px) / 2)); background: #fff; }
.projects-section-heading { padding-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; border-bottom: 1px solid rgba(214,211,209,.70); }
.projects-section-heading h2 { margin: 12px 0 0; color: #1c1917; font-family: Syne; font-size: 36px; line-height: 42px; letter-spacing: -.02em; }
.projects-section-heading h2 sup { margin-left: 10px; color: #a8a29e; font-family: var(--font-ui); font-size: 16px; font-weight: 400; vertical-align: .45em; }
.projects-section-heading > p { max-width: 520px; margin: 0; color: #737373; font-size: 14px; line-height: 24px; }
.project-filters { padding: 24px 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.project-filters button { height: 32px; padding: 0 14px; border: 1px solid #e7e5e4; border-radius: 999px; color: #78716c; background: #fff; font-family: "DM Mono"; font-size: 9px; text-transform: uppercase; letter-spacing: .20em; cursor: pointer; transition: color .15s, border-color .15s, background .15s;  font-weight: 500;}
.project-filters button:hover, .project-filters button.active { color: #fff; border-color: #141414; background: #141414; }
.project-filter-grid { padding: 25px 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 10px; }
.project-filter-grid label { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.project-filter-grid label > span { color: #a8a29e; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .18em; text-transform: uppercase;  font-weight: 500;}
.project-filter-grid select { width: 100%; height: 44px; padding: 0 38px 0 13px; overflow: hidden; color: #44403c; border: 1px solid #e7e5e4; border-radius: 12px; background: #fff; font-family: Syne, sans-serif; font-size: 12px; text-overflow: ellipsis; outline: 0; }
.project-filter-grid select:focus-visible { border-color: #a8a29e; box-shadow: 0 0 0 3px rgba(20,20,20,.06); }
.project-filter-grid > button { height: 44px; padding: 0 15px; color: #78716c; border: 1px solid #e7e5e4; border-radius: 12px; background: #fafaf9; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .08em; cursor: pointer; white-space: nowrap;  font-weight: 500;}
.project-filter-grid > button:hover { color: #fff; border-color: #141414; background: #141414; }
.projects-results-line { min-height: 27px; display: flex; align-items: center; gap: 7px; color: #78716c; font-family: "DM Mono", monospace;  font-weight: 500;}
.projects-results-line span { color: #991b1b; font-size: 11px; }
.projects-results-line small { font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.projects-masonry { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; grid-auto-rows: 260px; gap: 20px; }
.project-gallery-card { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 0; border-radius: 16px; color: #fff; background: #141414; cursor: pointer; text-align: left; }
.project-gallery-card.wide { grid-column: span 2; }
.project-gallery-card.tall { grid-row: span 2; }
.project-gallery-card > img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: .82; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.project-gallery-card:hover > img { transform: scale(1.045); opacity: .94; }
.projects-partner-context { margin: 24px 0 0; min-height: 76px; padding: 13px 15px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1px solid #e7e5e4; border-radius: 15px; background: #fafaf9; }
.projects-partner-context > span { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; color: #fff; border-radius: 12px; background: #171717; }
.projects-partner-context > span img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.projects-partner-context > span b { font: 650 20px Syne, sans-serif; }
.projects-partner-context > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.projects-partner-context small { color: #a8a29e; font:500 8px "DM Mono", monospace; letter-spacing: .2em; text-transform: uppercase; }
.projects-partner-context strong { overflow: hidden; color: #292524; font: 650 15px Syne, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.projects-partner-context > a { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; color: #78716c; border: 1px solid #e7e5e4; border-radius: 10px; background: #fff; font: 600 10px "DM Mono", monospace; letter-spacing: .04em; transition: color .18s ease, border-color .18s ease; }
.projects-partner-context > a:hover { color: #991b1b; border-color: #fecaca; }
.project-partner-badge { position: absolute; z-index: 2; top: 18px; right: 18px; min-height: 36px; max-width: calc(100% - 92px); padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 8px; overflow: hidden; color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: rgba(16,16,16,.72); backdrop-filter: blur(14px); }
.project-partner-badge img { width: 25px; height: 25px; flex: 0 0 auto; display: block; object-fit: contain; border-radius: 7px; background: #fff; }
.project-partner-badge i, .project-partner-badge b { overflow: hidden; font-family: "DM Mono", monospace; font-size: 8px; font-style: normal; font-weight: 500; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.projects-empty { margin-top: 20px; padding: 38px 20px; color: #78716c; border: 1px dashed #d6d3d1; border-radius: 16px; background: #fafaf9; font-size: 14px; text-align: center; }
.project-card-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.92), rgba(10,10,10,.08) 65%); }
.project-card-number { position: absolute; top: 20px; left: 20px; color: rgba(255,255,255,.42); font-family: "DM Mono"; font-size: 9px; letter-spacing: .28em;  font-weight: 500;}
.project-card-copy { position: absolute; right: 24px; bottom: 24px; left: 24px; display: flex; flex-direction: column; }
.project-card-copy small { color: var(--red); font-family: "DM Mono"; font-size: 9px; text-transform: uppercase; letter-spacing: .30em;  font-weight: 500;}
.project-card-copy strong { margin-top: 9px; color: rgba(255,255,255,.92); font-family: Syne; font-size: 21px; line-height: 27px; }
.project-card-meta { margin-top: 6px; overflow: hidden; color: rgba(255,255,255,.48); font-family: "DM Mono", monospace; font-size: 8px; line-height: 15px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap;  font-weight: 500;}
.project-card-copy i { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.38); font-family: "DM Mono"; font-size: 9px; font-style: normal; text-transform: uppercase; letter-spacing: .22em;  font-weight: 500;}
.project-card-copy i em { margin-left: auto; padding-right: 12px; color: rgba(255,255,255,.55); font-size: 7px; font-style: normal; letter-spacing: .10em; }
.project-card-copy i b { color: rgba(255,255,255,.70); font-size: 14px; font-weight:500; }

.project-lightbox { position: fixed; z-index: 140; inset: 0; width: 100%; height: 100vh; height: 100dvh; padding: 42px 100px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 24px; overflow: hidden; background: rgba(8,8,8,.96); backdrop-filter: blur(24px); }
.project-modal-open { overflow: hidden; }
.project-lightbox figure { width: min(1180px, 100%); height: min(82vh, 790px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); overflow: hidden; border: 1px solid rgba(255,255,255,.10); border-radius: 18px; background: #141414; }
.project-lightbox-image { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: #0d0d0d; }
.project-lightbox-image > img { width: 100%; height: 100%; display: block; object-fit: contain; }
.project-lightbox-image > span { position: absolute; left: 18px; bottom: 18px; padding: 8px 11px; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(12,12,12,.74); backdrop-filter: blur(14px); font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .15em; text-transform: uppercase;  font-weight: 500;}
.project-lightbox figcaption { min-width: 0; min-height: 0; padding: 28px; overflow-y: auto; color: #fff; border-left: 1px solid rgba(255,255,255,.08); }
.project-lightbox figcaption header { padding-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.project-lightbox figcaption header > span { min-width: 0; display: flex; flex-direction: column; }
.project-lightbox figcaption small { color: var(--red); font-family: "DM Mono"; font-size: 8px; text-transform: uppercase; letter-spacing: .22em;  font-weight: 500;}
.project-lightbox figcaption strong { margin-top: 7px; font-family: Syne; font-size: 20px; line-height: 27px; }
.project-lightbox figcaption header > em { flex: 0 0 auto; color: rgba(255,255,255,.35); font-family: "DM Mono"; font-size: 9px; font-style: normal; letter-spacing: .16em; white-space: nowrap;  font-weight: 500;}
.project-lightbox figcaption > p { margin: 20px 0 0; color: rgba(255,255,255,.48); font-size: 12px; line-height: 21px; }
.project-lightbox-facts { margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.08); }
.project-lightbox-facts > div { min-width: 0; min-height: 74px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; background: #171717; }
.project-lightbox-facts dt { color: rgba(255,255,255,.29); font-family: "DM Mono", monospace; font-size: 7px; letter-spacing: .13em; text-transform: uppercase;  font-weight: 500;}
.project-lightbox-facts dd { margin: 0; overflow-wrap: anywhere; color: rgba(255,255,255,.73); font-size: 11px; }
.project-lightbox figcaption > section { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.project-lightbox figcaption > section > div { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.project-lightbox figcaption > section > div span { padding: 7px 9px; color: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.10); border-radius: 8px; background: rgba(255,255,255,.035); font-family: "DM Mono", monospace; font-size: 7px; letter-spacing: .06em;  font-weight: 500;}
.project-lightbox figcaption > section > p { margin: 10px 0 0; color: rgba(255,255,255,.45); font-size: 11px; line-height: 19px; }
.lightbox-close, .lightbox-arrow { border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.65); background: rgba(255,255,255,.04); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.lightbox-close:hover, .lightbox-arrow:hover { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.lightbox-close { position: absolute; top: 28px; right: 28px; width: 40px; height: 40px; border-radius: 12px; }
.lightbox-close span { position: absolute; top: 19px; left: 10px; width: 18px; height: 1px; background: currentColor; transform: rotate(45deg); }
.lightbox-close span:last-child { transform: rotate(-45deg); }
.lightbox-arrow { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; }
.lightbox-arrow svg { width: 19px; height: 19px; }
.lightbox-close:focus-visible, .lightbox-arrow:focus-visible { outline: 2px solid #fa2d37; outline-offset: 3px; }

.projects-process { padding: 80px max(40px, calc((100vw - 1104px) / 2)); color: #fff; background: #141414; }
.projects-process-heading { padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.07); }
.projects-process-heading .mono-label { margin: 0; }
.projects-process-heading h2 { max-width: 700px; margin: 15px 0 0; font-family: Syne; font-size: 36px; line-height: 42px; }
.projects-process-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.projects-process-grid article { min-height: 220px; padding: 24px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; }
.projects-process-grid small { color: var(--red); font-family: "DM Mono"; font-size: 9px;  font-weight: 500;}
.projects-process-grid h3 { margin: 38px 0 12px; color: rgba(255,255,255,.82); font-family: Syne; font-size: 18px; }
.projects-process-grid p { margin: 0; color: rgba(255,255,255,.36); font-size: 13px; line-height: 22px; }

.projects-cta { padding: 72px max(40px, calc((100vw - 1104px) / 2)); display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; color: #fff; background: radial-gradient(circle at 80% 20%, rgba(147,15,23,.12), transparent 42%), #101010; }
.projects-cta .mono-label { margin: 0; }
.projects-cta h2 { margin: 16px 0 0; font-family: Syne; font-size: 36px; line-height: 42px; }
.projects-cta div > span { max-width: 610px; margin-top: 14px; display: block; color: rgba(255,255,255,.38); font-size: 14px; line-height: 24px; }
.projects-cta > a { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; color: rgba(255,255,255,.65); background: rgba(255,255,255,.04); font-size: 13px; }
.projects-cta > a:hover { color: #fff; border-color: rgba(255,255,255,.20); }
.projects-cta > a svg { width: 15px; height: 15px; }

@media (max-width: 1180px) { .projects-hero-inner { padding-left: 64px; padding-right: 64px; } }
@media (max-width: 1023px) {
  .projects-hero { height: auto; min-height: 620px; }
  .projects-hero-inner { min-height: 620px; padding: 72px 48px; justify-content: center; }
  .projects-process-grid { grid-template-columns: 1fr 1fr; }
  .project-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-filter-grid > button { grid-column: 1 / -1; justify-self: start; }
  .project-lightbox { padding: 70px 32px 32px; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 14px; }
  .project-lightbox figure { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); }
}
@media (max-width: 767px) {
  .projects-section-heading, .projects-cta { align-items: flex-start; flex-direction: column; }
  .projects-masonry { grid-template-columns: 1fr 1fr; }
  .project-gallery-card.wide { grid-column: span 2; }
}
@media (max-width: 639px) {
  .project-filters button { min-height: 44px; }
  .projects-hero { min-height: 620px; }
  .projects-hero-inner { min-height: 620px; padding: 56px 24px 48px; justify-content: flex-start; }
  .projects-hero-inner > .mono-label { margin-top: 18px; }
  .projects-hero h1 { font-size: 44px; line-height: 1.03; }
  .projects-hero-inner > p:not(.mono-label) { font-size: 16px; line-height: 30px; }
  .projects-hero-actions { align-items: flex-start; flex-direction: column; }
  .projects-gallery-section, .projects-process, .projects-cta { padding: 80px 24px; }
  .projects-section-heading h2, .projects-process-heading h2, .projects-cta h2 { font-size: 30px; line-height: 36px; }
  .project-filter-grid { grid-template-columns: 1fr; padding-top: 22px; }
  .project-filter-grid > button { grid-column: auto; width: 100%; }
  .projects-masonry { grid-template-columns: 1fr; grid-auto-rows: 290px; }
  .projects-partner-context { grid-template-columns: 44px minmax(0,1fr); }
  .projects-partner-context > span { width: 44px; height: 44px; }
  .projects-partner-context > a { grid-column: 1 / -1; width: 100%; }
  .project-partner-badge { top: 14px; right: 14px; max-width: calc(100% - 76px); }
  .project-gallery-card.wide { grid-column: auto; }
  .project-gallery-card.tall { grid-row: auto; }
  .projects-process-grid { grid-template-columns: 1fr; }
  .project-lightbox { padding: max(68px, calc(54px + env(safe-area-inset-top))) 14px max(16px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr; place-items: center; }
  .project-lightbox figure { width: 100%; height: calc(100dvh - max(92px, calc(74px + env(safe-area-inset-top)))); max-height: none; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 47%) minmax(0, 1fr); }
  .project-lightbox-image > img { width: 100%; min-width: 0; max-width: 100%; min-height: 0; height: 100%; object-fit: contain; }
  .project-lightbox figcaption { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; padding: 18px; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.08); border-left: 0; }
  .project-lightbox figcaption header { padding-bottom: 16px; }
  .project-lightbox figcaption strong { overflow: hidden; display: -webkit-box; font-size: 17px; line-height: 22px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .project-lightbox figcaption > p { margin-top: 15px; }
  .project-lightbox-facts { margin-top: 15px; }
  .lightbox-close { top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; }
  .lightbox-close span { top: 21px; left: 12px; }
  .lightbox-arrow { position: absolute; z-index: 2; top: 50%; width: 44px; height: 44px; transform: translateY(-50%); }
  .lightbox-arrow.previous { left: 20px; }
  .lightbox-arrow.next { right: 20px; }
  .projects-cta > a { flex: none; }
}

/* Fit mobile galleries to their content and keep the full project title readable. */
.project-lightbox figure { grid-column: 2; }
.project-lightbox .lightbox-arrow[hidden], .project-lightbox-facts[hidden] { display: none; }
@media (max-width: 767px) {
  .project-lightbox figure { grid-column: 1; height: auto; max-height: calc(100dvh - 100px); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .project-lightbox-image { height: min(40dvh, 62vw); min-height: 120px; flex: 0 0 auto; }
  .project-lightbox figcaption { flex: 0 0 auto; overflow: visible; }
  .project-lightbox figcaption strong { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .project-lightbox figcaption header { padding-bottom: 0; border-bottom: 0; }
}
