/* Portfolio (/portfolio/) and case studies: shared pieces */

/* Browser chrome */
.bbar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: var(--birch); flex: none; }
.bbar i { width: 8px; height: 8px; border-radius: 50%; background: #D9D6CE; }
.burl { margin-left: 8px; flex: 1; max-width: 55%; height: 18px; padding: 0 10px; border-radius: 9px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; line-height: 18px; color: #8A877F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.burl:empty { visibility: hidden; }

/* Yellow "Case study" tag */
.cs-tag { position: absolute; top: 16px; left: 16px; z-index: 2; padding: 6px 14px 6px 12px; background: var(--yellow); color: var(--ink); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 0 0 16px 0; }

/* "Read the case study" with indigo arrow */
.read { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.read i { position: relative; width: 34px; height: 11px; color: var(--indigo); transition: transform 0.2s ease; }
.read i::before { content: ""; position: absolute; top: 2px; right: 0; width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.read i::after { content: ""; position: absolute; top: 5px; right: 0; width: 34px; border-bottom: 1.5px solid; }

/* ---- Hero ---- */
.pf-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.pf-hero--solo { grid-template-columns: minmax(0, 820px); }
.pf-intro { display: flex; flex-direction: column; gap: 24px; }
.pf-intro .wm-h1, .pf-intro .wm-eyebrow { margin: 0; }
.pf-intro .wm-lead { max-width: 64ch; }
.pf-facts { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 14px; line-height: 21px; color: var(--muted); }
.pf-facts strong { color: var(--ink); }

.stack { position: relative; height: 480px; }
.dv { position: absolute; display: flex; flex-direction: column; overflow: hidden; background: var(--white); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(31, 31, 31, 0.3); }
.dv-scr { position: relative; flex: 1; overflow: hidden; }
.dv-scr img { display: block; width: 100%; height: auto; max-width: none; }
.dv-back { left: 0; top: 0; width: 66%; height: 300px; }
.dv-front { right: 0; top: 96px; width: 72%; height: 340px; z-index: 2; }
.dv-phone { left: 10%; bottom: 0; width: 136px; height: 272px; padding: 8px; border-radius: 22px; box-sizing: border-box; z-index: 3; box-shadow: 0 0 0 2px var(--ink), 0 24px 40px -20px rgba(31, 31, 31, 0.45); }
.dv-phone .dv-scr { border-radius: 13px; }
.notch { width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: var(--ink); flex: none; }
.sc-a, .sc-b, .sc-c { will-change: transform; }
/*
 * Slow page-scroll loop. assets/js/scroll-shots.js sets --dist (how far each
 * screenshot travels) and the duration, so every site moves at the same speed
 * however long its page is. Without the script nothing moves.
 */
.js-shots .sc-a, .js-shots .sc-b, .js-shots .sc-c, .js-shots .shot { animation: wm-shot var(--dur, 60s) linear infinite; animation-delay: var(--delay, 0s); animation-fill-mode: backwards; }
@keyframes wm-shot { 0%, 4% { transform: translateY(0); } 48%, 52% { transform: translateY(calc(-1 * var(--dist, 0px))); } 96%, 100% { transform: translateY(0); } }

/* ---- Project grid ---- */
.pf-work-intro { margin: 0; max-width: 44ch; color: var(--muted); }
.show { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 32px; }
.scard { display: flex; flex-direction: column; gap: 20px; color: var(--ink); text-decoration: none; }
.scard[hidden] { display: none; }
.scard:hover { color: var(--ink); }
.sframe { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 20px 40px -26px rgba(31, 31, 31, 0.35); transition: box-shadow 0.3s ease, transform 0.3s ease; }
a.scard:hover .sframe { transform: translateY(-4px); box-shadow: 0 0 0 1px #D9D6CE, 0 28px 48px -26px rgba(31, 31, 31, 0.45); }
.sscr { position: relative; height: 356px; overflow: hidden; background: var(--line); }
.sscr img { display: block; width: 100%; height: auto; max-width: none; transform: translateY(0); transition: transform 1.2s ease; }
/* Hover scroll: duration set per card by scroll-shots.js so all cards move at the same speed. */
.scard:hover .sscr img { transform: translateY(calc(-1 * var(--dist, 0px))); transition: transform var(--hover-dur, 20s) linear; }
.sbody { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.sbody h3 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 700; }
.sbody > div { flex: 1 1 100%; }
.sbody p { margin: 4px 0 0; max-width: 62ch; color: var(--muted); }
.stags, .cs-tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stags li, .cs-tags li { padding: 4px 10px; border-radius: 6px; background: var(--white); box-shadow: inset 0 0 0 1px #D9D6CE; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.sbody .read, .ext { padding-top: 4px; }
.ext { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ext svg { color: var(--indigo); }
.scard:hover .ext { color: var(--indigo-deep); }
.scard:hover .read i { transform: translateX(6px); }
.more { display: flex; justify-content: center; margin-top: 56px; }
.more .wm-sec { font-family: inherit; border: 0; border-radius: 0; cursor: pointer; }

/* ---- Quote band ---- */
.pf-voice { border-radius: 0 80px 0 0; }
.tq { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.tq--solo { grid-template-columns: minmax(0, 820px); }
.tq figure { margin: 0; }
.q-mark { display: block; color: var(--indigo); }
.tq blockquote { margin: 20px 0 0; max-width: 30ch; font-family: var(--font-display); font-size: 28px; line-height: 38px; font-weight: 600; color: var(--ink); }
.tq figcaption, .quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 15px; line-height: 22px; color: var(--muted); }
.tq figcaption strong, .quote figcaption strong { color: var(--ink); }
.q-av { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; }
.q-av--initials { display: flex; align-items: center; justify-content: center; background: var(--white); color: var(--indigo-deep); font-size: 15px; font-weight: 700; }
.rate { display: flex; flex-direction: column; gap: 12px; padding: 32px; background: var(--white); border-radius: 12px; box-shadow: 0 12px 24px -20px rgba(23, 59, 61, 0.16); }
.rate-n { font-family: var(--font-display); font-size: 60px; line-height: 60px; font-weight: 700; color: var(--ink); }
.stars { display: flex; gap: 3px; color: var(--ink); }
.rate p { margin: 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	.js-shots .sc-a, .js-shots .sc-b, .js-shots .sc-c, .js-shots .shot { animation: none; }
	.sframe, .sscr img, .scard:hover .sscr img, .read i { transition: none; }
	a.scard:hover .sframe, .scard:hover .sscr img, .scard:hover .read i { transform: none; }
}
@media (max-width: 900px) {
	.pf-hero, .tq { grid-template-columns: 1fr; gap: 40px; }
	.show { grid-template-columns: 1fr; gap: 40px; }
	.stack { height: 420px; }
}
@media (max-width: 600px) {
	.stack { height: 320px; }
	.dv-back { height: 200px; }
	.dv-front { top: 70px; height: 220px; }
	.dv-phone { width: 100px; height: 200px; }
	.sscr { height: 240px; }
	.tq blockquote { font-size: 22px; line-height: 31px; }
	.pf-voice { border-radius: 0 48px 0 0; }
}
