/* Work showcase. --accent comes from _source/site.mjs; --bg / --ink from each project. */
@font-face { font-family: "Bricolage"; src: url(fonts/display.woff2) format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/body.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
	--ink-1: #12151c; --ink-2: #555c69; --paper: #f3f5f8; --line: #dce0e7; --accent: #0e5a4a;
	--display: "Bricolage", "Segoe UI", sans-serif; --body: "Instrument", "Segoe UI", sans-serif;
	--gap: clamp(1.25rem, 2.6vw, 2.5rem); --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink-1); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p, figure, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -.022em; word-spacing: .05em; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.wrap { width: min(100% - clamp(2rem, 7vw, 8rem), 1440px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 9; padding: .6rem 1rem; background: var(--ink-1); color: #fff; border-radius: 8px; }
.skip:focus { top: 1rem; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 84px; }
.brand { font: 700 1.3rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.top__nav { display: flex; gap: 1.5rem; align-items: center; font-weight: 500; }
.top__nav a:not(.btn) { padding: .6rem 0; text-decoration: none; }
.top__nav a:not(.btn):hover, .top__nav [aria-current] { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 2px; }
.btn { display: inline-flex; gap: .55rem; align-items: center; padding: .95rem 1.5rem; font-weight: 600; line-height: 1.2; text-decoration: none; color: #fff; background: var(--ink-1); border-radius: 12px; transition: transform .25s var(--ease), background .25s; }
.btn:hover { background: var(--accent); }
.btn:active { transform: scale(.98); }
.btn--sm { padding: .7rem 1.1rem; }
.btn--light { color: var(--ink-1); background: #fff; }
.btn--light:hover { color: #fff; background: var(--ink-1); }

/* Work page */
.hero { display: grid; gap: 1.5rem var(--gap); align-items: end; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 4.5vw, 4rem); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 6rem); }
.hero p { max-width: 34rem; font-size: clamp(1.1rem, 1.4vw, 1.25rem); color: var(--ink-2); }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.7fr 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.filters[hidden] { display: none; }
.filters button { min-height: 44px; padding: .55rem 1.1rem; font: 500 1rem/1.2 var(--body); color: var(--ink-1); background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.filters button span { margin-left: .3rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.filters button:hover { border-color: var(--ink-1); }
.filters [aria-pressed="true"] { color: #fff; background: var(--ink-1); border-color: var(--ink-1); }
.filters [aria-pressed="true"] span { color: #c3c8d2; }
.grid { display: grid; gap: clamp(2.25rem, 4vw, 4rem) var(--gap); }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } }
.work { padding-bottom: clamp(4rem, 8vw, 8rem); }

/* Stage: browser frame + phone on the project's own colour */
.stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); border-radius: 20px; }
.frame { position: absolute; left: 7%; top: 13%; width: 78%; overflow: hidden; background: #fff; border-radius: 12px; box-shadow: 0 30px 60px -22px rgb(0 0 0 / .55); transition: transform .6s var(--ease); }
.frame__bar { display: flex; gap: 6px; align-items: center; height: 30px; padding-inline: 12px; background: #fff; border-bottom: 1px solid #e6e8ec; }
.frame__bar i { width: 8px; height: 8px; background: #d4d8df; border-radius: 50%; }
.frame__bar span { margin-left: .5rem; overflow: hidden; font-size: .72rem; color: #626a77; text-overflow: ellipsis; white-space: nowrap; }
.frame__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.frame__screen img { width: 100%; }
.frame__long { position: absolute; inset: 0 0 auto; opacity: 0; transition: opacity .3s; will-change: transform; }
.phone { position: absolute; right: 6%; bottom: -6%; width: 18.5%; overflow: hidden; background: #12151c; border: clamp(3px, .45vw, 6px) solid #12151c; border-radius: clamp(12px, 1.7vw, 24px); box-shadow: 0 24px 44px -16px rgb(0 0 0 / .6); transition: transform .6s var(--ease); }
.phone img { width: 100%; border-radius: clamp(9px, 1.3vw, 18px); }

/* Cards */
.card { position: relative; }
.card[hidden] { display: none; }
.card__link { display: block; text-decoration: none; }
.card__link:focus-visible { outline-offset: 8px; border-radius: 20px; }
.card__view { position: absolute; left: 7%; bottom: 4%; display: inline-flex; gap: .5rem; align-items: center; padding: .65rem 1rem; font-weight: 600; font-size: .95rem; line-height: 1.2; color: var(--ink-1); background: #fff; border-radius: 10px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.card__foot { display: grid; gap: .35rem 1.5rem; padding-top: 1.1rem; }
.card__main { display: grid; gap: .15rem; }
.card__name { font: 700 clamp(1.3rem, 1.9vw, 1.75rem)/1.15 var(--display); letter-spacing: -.02em; }
.card__cat { color: var(--ink-2); }
.card__hl { display: flex; flex-wrap: wrap; gap: .1rem 1rem; color: var(--accent); font-weight: 500; }
@media (min-width: 1100px) { .card__foot { grid-template-columns: 1fr auto; } .card__hl { flex-direction: column; padding-top: .25rem; text-align: right; } }
@media (hover: hover) {
	.card__link:hover .frame { transform: translateY(-6px); }
	.card__link:hover .phone { transform: translateY(-14px); }
	.card__link:hover .card__view, .card__link:focus-visible .card__view { opacity: 1; transform: none; }
}

/* Case study */
.case-hero { padding-block: 1rem 0; color: var(--ink); background: linear-gradient(var(--bg) 0 calc(100% - clamp(5rem, 14vw, 13rem)), var(--paper) 0); }
.case-hero .back { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none; }
.case-hero .back:hover { text-decoration: underline; text-underline-offset: .3em; }
.case-hero :focus-visible { outline-color: currentColor; }
.case-hero__head { display: grid; gap: 2rem; align-items: end; padding-block: clamp(1.5rem, 3.5vw, 3rem) clamp(2rem, 4vw, 3.5rem); }
.case-hero__cat { margin-bottom: .75rem; font-weight: 500; }
.case-hero h1 { font-size: clamp(2.5rem, 6vw, 5.25rem); }
.case-hero__intro { max-width: 40rem; margin-top: 1.1rem; font-size: clamp(1.1rem, 1.5vw, 1.3rem); }
.btn--case { justify-self: start; color: var(--bg); background: var(--ink); }
.btn--case:hover { color: var(--bg); background: var(--ink); transform: translateY(-2px); }
@media (min-width: 900px) { .case-hero__head { grid-template-columns: 1fr auto; } }
.case-hero .stage { aspect-ratio: auto; overflow: visible; background: none; padding-bottom: 1rem; }
.case-hero .frame { position: relative; left: auto; top: auto; width: 92%; }
.case-hero .phone { right: 0; bottom: 0; width: 17%; }
.case { display: grid; gap: clamp(2.5rem, 5vw, 5rem); padding-block: clamp(3rem, 7vw, 6rem); }
@media (min-width: 960px) { .case { grid-template-columns: minmax(230px, 300px) 1fr; } .facts { order: 0; } }
@media (max-width: 959px) { .facts { order: 2; } }
.facts dl { display: grid; gap: 1.25rem; }
.facts dt { font-size: .95rem; color: var(--ink-2); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts dd ul { columns: 2; column-gap: 1rem; font-weight: 400; }
.facts dd li { break-inside: avoid; }
.facts dd a { color: var(--accent); text-underline-offset: .25em; }
@media (min-width: 960px) { .facts dl { position: sticky; top: 2rem; } .facts dd ul { columns: 1; } }
.story { max-width: 800px; }
.story h2 { margin: clamp(2.25rem, 4vw, 3.25rem) 0 .9rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.story > p { max-width: 64ch; font-size: 1.125rem; }
.stats { display: grid; gap: 1.25rem; padding-bottom: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line); }
.stats li { display: grid; grid-template-columns: 4.5rem 1fr; align-items: baseline; }
.stats strong { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); letter-spacing: -.03em; color: var(--accent); }
.stats span { color: var(--ink-2); line-height: 1.4; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } .stats li { grid-template-columns: 1fr; gap: .5rem; } }
.feats { display: grid; gap: 0 2.5rem; }
.feats li { padding-block: .8rem; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .feats { grid-template-columns: 1fr 1fr; } }
.gallery { padding-block: clamp(3rem, 6vw, 6rem); background: var(--bg); }
.gallery .wrap { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .gallery .wrap { grid-template-columns: 1fr 1fr; } .gallery .is-wide { grid-column: 1 / -1; } }
.gallery img { width: 100%; border-radius: 14px; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .5); }
.gallery figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.more { padding-block: clamp(3.5rem, 7vw, 7rem); }
.more__head { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; }
.more__head h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.more__head a { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; text-underline-offset: .3em; }

/* Closing band + footer */
.cta { padding-block: clamp(3.5rem, 8vw, 7rem); color: #fff; background: var(--accent); }
.cta h2 { max-width: 16ch; font-size: clamp(2.2rem, 5.2vw, 4.5rem); }
.cta p { max-width: 36rem; margin-top: 1.25rem; font-size: 1.2rem; }
.cta .btn { margin-top: 2rem; }
.foot { display: flex; flex-wrap: wrap; gap: .75rem 3rem; justify-content: space-between; padding-block: 2rem 2.5rem; font-size: .95rem; color: var(--ink-2); }
.foot p:first-child { max-width: 46rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; } }
