/* Department case study. Same system as Lezza (statement bands, editorial meta rows,
   full-bleed media) in Department blue, with three chapters: campaign, offline, digital. */

/* Nav: transparent over the blue hero, glass capsules once the page scrolls. */
.project-page--department .dp-nav { position: fixed; inset: 0 0 auto; z-index: 50; background: transparent; border: 0; color: #fff; padding-block: 14px; align-items: center; }
.dp-nav a { color: inherit; }
.dp-nav .project-nav__mark img { filter: brightness(0) invert(1); }
.dp-nav .project-nav__mark { display: grid; place-items: center; height: 40px; padding: 0 16px; border-radius: 999px; }
.dp-nav nav { gap: 2px; padding: 4px; border-radius: 999px; }
.dp-nav nav a { display: grid; place-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; transition: background-color var(--t-hover) ease; }
.dp-nav nav a:hover { background: rgb(255 255 255 / .14); text-decoration: none; }
.dp-nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dp-nav .project-nav__mark, .dp-nav nav { transition: background-color .4s ease, box-shadow .4s ease; }
.dp-nav.is-floating .project-nav__mark, .dp-nav.is-floating nav { background: var(--glass-solid); box-shadow: var(--glass-edge), var(--glass-lift); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dp-nav.is-floating .project-nav__mark, .dp-nav.is-floating nav { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
}

.dp { --blue: var(--dept, #1212b2); --gut: clamp(20px, 4vw, 72px); --grey: #efefef; --night: #0c0c0c; }
.dp figure, .dp p, .dp h2, .dp h3, .dp dl, .dp dd, .dp ol, .dp ul { margin: 0; }
.dp ol, .dp ul { padding: 0; list-style: none; }
.dp img { display: block; width: 100%; height: auto; }
.dp h2, .dp h3 { font-weight: 400; }

/* Editorial meta row: name left, detail right. */
.dp-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0 0; font-size: 13px; line-height: 1.3; letter-spacing: -.01em; color: #5f5f5f; }
.dp-meta span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.dp-meta--media { padding-inline: var(--gut); padding-bottom: clamp(36px, 4.4vw, 72px); }

/* HERO */
.dp-hero { background: var(--blue); color: #fff; container-type: inline-size; }
.dp-hero__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: min(78svh, 46cqw); padding: 120px 4.1cqw 4.6cqw 2.6cqw; }
.dp-hero__mark { width: 20cqw; height: auto; margin-inline: auto; transform-origin: 30% 50%; }
.dp-hero__copy { padding-left: 3.2cqw; font-size: clamp(14px, 1.25cqw, 24px); line-height: 1.12; letter-spacing: -.035em; }
.dp-hero__head { display: flex; gap: 6cqw; margin-bottom: 2.65cqw; }
.dp-hero__head h1 { margin: 0; font: inherit; }
.dp-hero__head span, .dp-hero__copy > p { color: #c9c9f2; }
.dp-hero__copy > p + p { margin-top: 1.2cqw; }
.dp-hero__copy .dp-hero__summary { color: #fff; }
.dp-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 3.8cqw !important; }
.dp-stages a { display: flex; justify-content: center; gap: .6em; padding: .32em .5em; border-radius: 99px; background: #fff; color: #111; text-decoration: none; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.dp-stages a span { color: var(--blue); font-variant-numeric: tabular-nums; transition: color var(--t-hover) ease; }
.dp-stages a:hover { background: #0c0c0c; color: #fff; }
.dp-stages a:hover span { color: #8f8fff; }
.dp-hero__band { overflow: hidden; }
.dp-hero__band img { aspect-ratio: 1600 / 399; object-fit: cover; }

/* BRIEF */
.dp-brief { background: var(--grey); padding: clamp(28px, 3vw, 48px) var(--gut) clamp(56px, 7vw, 120px); }
.dp-brief > .dp-meta { padding: 0 0 clamp(24px, 2.6vw, 40px); color: #4a4a4c; }
.dp-brief__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2.4vw, 40px); }
.dp-brief__list li { border-top: 1px solid rgb(0 0 0 / .16); padding-top: 14px; }
.dp-brief__list span { display: block; font-size: 13px; color: var(--blue); font-variant-numeric: tabular-nums; }
.dp-brief__list h2 { margin-top: clamp(16px, 2vw, 32px) !important; font-size: clamp(22px, 2vw, 34px); letter-spacing: -.04em; line-height: 1; }
.dp-brief__list p { margin-top: 12px; max-width: 30ch; font-size: 15px; line-height: 1.4; color: #3d3d40; }

/* INDEX: three chapters as a list; a preview follows the pointer on hover. */
.dp-index { position: relative; display: block; padding: clamp(40px, 5vw, 80px) var(--gut); background: #fff; }
.dp-index a { display: grid; grid-template-columns: 4ch 1fr 10ch 5ch; align-items: baseline; gap: 16px; padding: clamp(14px, 1.6vw, 26px) 0; border-bottom: 1px solid rgb(0 0 0 / .12); color: #111; text-decoration: none; transition: color var(--t-hover) ease, padding var(--t-ui) var(--ease-out); }
.dp-index a:first-of-type { border-top: 1px solid rgb(0 0 0 / .12); }
.dp-index__n, .dp-index__k, .dp-index__y { font-size: 13px; color: #6b6b6e; font-variant-numeric: tabular-nums; }
.dp-index__y { text-align: right; }
.dp-index__t { font-size: clamp(28px, 4.6vw, 84px); line-height: .98; letter-spacing: -.05em; }
.dp-index a:hover, .dp-index a:focus-visible { color: var(--blue); padding-left: 12px; }
.dp-index__preview { position: absolute; left: 0; top: 0; z-index: 3; width: clamp(180px, 18vw, 300px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; pointer-events: none; opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(.92); transition: opacity .25s ease, transform .5s var(--ease-out); box-shadow: 0 24px 48px -24px rgb(0 0 0 / .5); }
.dp-index__preview img { height: 100%; object-fit: cover; }
.dp-index.is-previewing .dp-index__preview { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1); }
@media (hover: none), (pointer: coarse) { .dp-index__preview { display: none; } }

/* CHAPTERS */
.dp-chapter { scroll-margin-top: 72px; }
.dp-chapter__head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px clamp(24px, 4vw, 72px); align-items: end; padding: clamp(64px, 8vw, 140px) var(--gut) clamp(32px, 4vw, 64px); }
.dp-chapter__n { grid-column: 1 / -1; font-size: 13px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: inherit; opacity: .7; }
.dp-chapter__head h2 { font-size: clamp(40px, 6.4vw, 120px); line-height: .95; letter-spacing: -.055em; }
.dp-chapter__copy p { max-width: 46ch; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.38; }
.dp-chapter__copy dl { display: grid; gap: 6px; margin-top: 22px !important; font-size: 13px; }
.dp-chapter__copy dl div { display: grid; grid-template-columns: 11ch 1fr; gap: 12px; padding-top: 6px; border-top: 1px solid currentColor; border-color: rgb(127 127 127 / .3); }
.dp-chapter__copy dt { opacity: .6; }

/* 01 campaign */
.dp-chapter--campaign { background: var(--blue); color: #fff; }
.dp-chapter--campaign .dp-chapter__copy p { color: #dcdcf7; }
.dp-shoebox { width: min(100% - 2 * var(--gut), 720px); margin: 0 auto !important; border-radius: 4px; overflow: hidden; }
.dp-statement { display: grid; place-items: center; min-height: clamp(150px, 23vw, 360px); padding: 44px var(--gut); text-align: center; }
.dp-statement p { max-width: 30ch; font-size: clamp(25px, 3.1vw, 55px); line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
.dp-kv { background: var(--grey); color: #111; padding: clamp(18px, 2vw, 36px) var(--gut) clamp(48px, 6vw, 100px); }
.dp-kv > .dp-meta { padding: 0 0 clamp(14px, 1.6vw, 24px); color: #4a4a4c; }
.dp-kv__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.2vw, 22px); }
.dp-kv__grid img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; transition: opacity .35s ease, transform .6s var(--ease-out); }
.dp-kv__grid figcaption { display: flex; justify-content: space-between; padding-top: 8px; font-size: 13px; color: #4a4a4c; }
.dp-kv__grid figcaption span:last-child { font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .dp-kv__grid:hover img { opacity: .38; }
  .dp-kv__grid li:hover img { opacity: 1; transform: translateY(-4px); }
}

/* 02 offline */
.dp-chapter--offline { background: var(--night); color: #f2f2f0; }
.dp-chapter--offline .dp-meta { color: #9a9a9e; }
.dp-chapter--offline .dp-chapter__copy p { color: #c9c9c6; }
.dp-compare { position: relative; margin: 0 var(--gut) !important; aspect-ratio: 991 / 828; max-height: 86svh; margin-inline: auto !important; width: min(100% - 2 * var(--gut), 86svh * 991 / 828); overflow: hidden; border-radius: 6px; background: #000; user-select: none; touch-action: pan-y; }
.dp-compare .dp-compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dp-compare > .dp-compare__img { object-position: 50% 30%; }
.dp-compare__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.dp-compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.dp-compare__handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; translate: -50% -50%; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / .35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M17 16l-6 6 6 6M27 16l6 6-6 6' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dp-compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.dp-compare:has(.dp-compare__range:focus-visible) .dp-compare__handle::after { outline: 2px solid #fff; outline-offset: 4px; }
.dp-compare__tag { position: absolute; top: 14px; padding: 4px 10px; border-radius: 99px; font-size: 12px; background: rgb(0 0 0 / .55); color: #fff; pointer-events: none; }
.dp-compare__tag--a { left: 14px; }
.dp-compare__tag--b { right: 14px; }

.dp-making { padding: 0 var(--gut) clamp(36px, 4.4vw, 72px); }
.dp-making > .dp-meta { padding: 0 0 clamp(14px, 1.6vw, 24px); }
.dp-making__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1vw, 16px); }
.dp-making__row img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; filter: grayscale(.35); transition: filter .4s ease; }
.dp-making__row li:hover img { filter: none; }

.dp-built { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: clamp(8px, 1vw, 16px); padding: 0 var(--gut); align-items: end; }
.dp-built img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.dp-built__a img, .dp-built__b img { aspect-ratio: 4 / 5; }
.dp-built figcaption { padding-top: 8px; font-size: 13px; color: #9a9a9e; }

.dp-recog { display: flex; flex-direction: column; overflow: hidden; background: rgb(12 24 128); }
.dp-recog img { aspect-ratio: 1600 / 1042; object-fit: cover; }
.dp-recog figcaption { order: -1; padding: clamp(64px, 8vw, 140px) var(--gut) 0; text-align: center; color: #fff; }
.dp-recog__eyebrow { font-size: 13px; opacity: .7; margin-bottom: 14px !important; }
.dp-recog h3 { font-size: clamp(34px, 5.4vw, 100px); line-height: .98; letter-spacing: -.055em; }
.dp-recog figcaption p:last-child { margin-top: 12px; font-size: clamp(14px, 1.2vw, 20px); color: #d8dcff; }

/* 03 digital */
.dp-chapter--digital { background: var(--grey); color: #111; padding-bottom: clamp(56px, 7vw, 120px); }
.dp-chapter--digital .dp-chapter__n { color: var(--blue); opacity: 1; }
.dp-chapter--digital .dp-chapter__head h2 { color: var(--blue); }
.dp-web { display: grid; grid-template-columns: minmax(260px, 30%) 1fr; gap: clamp(24px, 4vw, 72px); padding: 0 var(--gut); align-items: start; }
.dp-web__sticky { position: sticky; top: 88px; }
.dp-phone { width: min(100%, 340px); margin-inline: auto; padding: 10px; border-radius: 42px; background: #111; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .5); }
.dp-phone__screen { position: relative; aspect-ratio: 9 / 19.5; overflow: hidden; border-radius: 32px; background: #fff; }
.dp-phone__page { position: absolute; inset: 0 0 auto; transform: translate3d(0, calc(var(--scroll, 0) * -1px), 0); will-change: transform; }
.dp-web__sticky > .dp-meta { width: min(100%, 340px); margin-inline: auto; }
.dp-web__pages { display: grid; gap: clamp(40px, 6vw, 96px); }
.dp-web__pages figure { overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 1px 0 rgb(0 0 0 / .06), 0 24px 50px -32px rgb(0 0 0 / .35); }
.dp-site { padding: clamp(48px, 6vw, 96px) var(--gut) 0; text-align: center; }
.dp-site a { display: inline-flex; gap: .4em; padding: 12px 22px; border-radius: 99px; background: #111; color: #fff; text-decoration: none; font-size: 15px; transition: background-color var(--t-hover) ease; }
.dp-site a:hover { background: var(--blue); }

/* Entrances (hero) */
@media (prefers-reduced-motion: no-preference) {
  .js .dp-hero__mark { animation: dp-mark 1.1s var(--ease-expo) both; }
  .js .dp-hero__copy > * { animation: dp-rise .9s var(--ease-out) both; }
  .js .dp-hero__copy > :nth-child(2) { animation-delay: .08s; }
  .js .dp-hero__copy > :nth-child(3) { animation-delay: .14s; }
  .js .dp-hero__copy > :nth-child(4) { animation-delay: .2s; }
  .js .dp-hero__copy > :nth-child(5) { animation-delay: .28s; }
  .js .dp-hero__band img { animation: dp-band 1.4s var(--ease-expo) .15s both; }
}
@keyframes dp-mark { from { opacity: 0; transform: scale(.82) rotate(-8deg); } }
@keyframes dp-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes dp-band { from { clip-path: inset(0 0 100% 0); transform: scale(1.06); } }

/* Shared ending sits flush */
.project-page--department .more-work, .project-page--department .site-contact, .project-page--department .case-footer { padding-inline: clamp(20px, 4vw, 72px); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .dp-brief__list { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .dp-kv__grid { grid-template-columns: repeat(2, 1fr); }
  .dp-making__row { grid-template-columns: repeat(2, 1fr); }
  .dp-built { grid-template-columns: 1fr 1fr; }
  .dp-built__c { grid-column: 1 / -1; }
  .dp-web { grid-template-columns: 1fr; }
  .dp-web__sticky { position: relative; top: 0; }
  .dp-phone { width: min(78vw, 320px); }
}
@media (max-width: 620px) {
  .dp-hero__grid { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 104px var(--gut) 40px; }
  .dp-hero__mark { width: min(36vw, 180px); margin-inline: 0; }
  .dp-hero__copy { padding: 0; font-size: 16px; line-height: 1.3; }
  .dp-hero__head { margin-bottom: 14px; }
  .dp-hero__copy > p + p { margin-top: 10px; }
  .dp-stages { margin-top: 20px !important; font-size: 13px; }
  .dp-hero__band img { aspect-ratio: 16 / 9; }
  .dp-brief__list { grid-template-columns: 1fr; }
  .dp-chapter__head { grid-template-columns: 1fr; }
  .dp-index a { grid-template-columns: 3ch 1fr auto; }
  .dp-index__k { display: none; }
  .dp-recog img { aspect-ratio: 4 / 3; }
  .dp-meta { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dp-phone__screen { overflow-y: auto; }
  .dp-phone__page { position: static; transform: none; }
  .dp-index__preview { transition: opacity .2s ease; }
}
