:root {
	color-scheme: light;
	--ground: #FFFFFF;
	--ink: #1A223C;
	--soft: #5A6485;
	--line: #D9E2F2;
	--accent: #FE01A9;
	--on-accent: #1A223C;
	--panel: #FFFFFF;
	--display: 'Funnel Display', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--display); font-size: 15px; line-height: 1.5; overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.page { height: 100%; min-height: 560px; display: flex; flex-direction: column; }
.top { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding: 20px clamp(16px, 3.4vw, 48px); }
.logo { display: block; width: 148px; height: 27px; background: var(--ink); -webkit-mask: url(../img/logo.svg) left center / contain no-repeat; mask: url(../img/logo.svg) left center / contain no-repeat; }
.top nav { display: flex; align-items: center; gap: 4px 30px; flex-wrap: wrap; font-size: 15px; }
.top nav a, .top nav button { padding: 11px 0; background: none; border: 0; text-decoration: none; }
.top nav .cta { padding: 9px 18px; border: 1px solid var(--ink); }
.top nav .cta:hover { background: var(--ink); color: var(--ground); }
.top nav .mode { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; }
.top nav .mode i { width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.top nav a:hover, .top nav button:hover { color: var(--accent); }

.intro { text-align: center; padding: clamp(4px, 1.5vh, 20px) 16px 0; }
.kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--soft); }
h1 { margin: 10px auto 0; font-family: var(--display); font-weight: 500; font-size: clamp(38px, 7vw, 104px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
.sub { display: none; margin: 14px auto 0; max-width: 52ch; color: var(--soft); font-size: clamp(15px, 1.25vw, 17px); text-wrap: pretty; }

.reel { position: relative; flex: 1; min-height: 220px; perspective: 1100px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; }
.reel.dragging { cursor: grabbing; }
.card { position: absolute; left: 50%; top: 50%; padding: 0; border: 0; background: var(--line); overflow: hidden; will-change: transform; backface-visibility: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.card .tag { display: none; position: absolute; left: 0; bottom: 0; padding: 4px 10px; background: var(--ground); color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: 0; transition: opacity .25s; }
.card.active .tag, .card:hover .tag, .card:focus-visible .tag { opacity: 1; }

.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px 24px; align-items: center; margin: 0 clamp(16px, 3.4vw, 48px); padding: 16px 0 22px; border-top: 1px solid var(--line); }
.foot .ctrl { justify-self: end; }
.prog { display: flex; gap: 6px; align-items: center; }
.prog i { width: 22px; height: 2px; background: var(--line); transition: background .3s, width .3s; }
.prog i.on { width: 44px; background: var(--ink); }
.now { min-width: 0; }
.now b { display: block; margin-top: 2px; font-family: var(--display); font-weight: 500; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.15; letter-spacing: -0.015em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now span { font-family: var(--mono); color: var(--soft); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.ctrl { display: flex; align-items: center; gap: 8px; }
.ctrl button { min-width: 44px; min-height: 44px; padding: 0 12px; background: none; border: 1px solid var(--line); font-size: 14px; transition: border-color .2s, background .2s, color .2s; }
.ctrl button:hover { border-color: var(--ink); }
.ctrl .go { background: var(--ink); border-color: var(--ink); color: var(--ground); padding: 0 22px; }
.ctrl .go:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sheet .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.sheet .cols h3 { margin: 0 0 8px; font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--soft); }
.sheet .cols p { margin: 0 0 10px; }
.sheet .cols small { display: block; color: var(--soft); font-size: 14px; }

dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--ink); overflow-y: auto; }
dialog[open] { animation: rise .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog::backdrop { background: var(--ground); }
.bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px clamp(16px, 3.4vw, 48px); background: var(--ground); border-bottom: 1px solid var(--line); }
.bar .x { padding: 0 16px; }
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4.5vw, 80px); align-items: start; padding: clamp(28px, 4.5vw, 64px) clamp(16px, 3.4vw, 48px); }
.case-text { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }
.case-num { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--soft); }
.case h2, .aboutp h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(38px, 5.2vw, 84px); line-height: .96; letter-spacing: -0.04em; text-wrap: balance; }
.lede { margin: 0; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35; letter-spacing: -0.01em; text-wrap: pretty; }
.about { margin: 0; max-width: 58ch; color: var(--soft); text-wrap: pretty; }
.meta { margin: 0; border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.meta dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--soft); padding-top: 3px; }
.meta dd { margin: 0; }
.case-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--line); }
.case-media img.full { grid-column: 1 / -1; height: auto; }
.nextp { position: relative; display: block; width: 100%; height: clamp(300px, 52vh, 560px); margin-top: clamp(16px, 3vw, 48px); padding: 0; overflow: hidden; background: #1A223C; color: #FFFFFF; border: 0; text-align: left; }
.nextp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.nextp:hover img, .nextp:focus-visible img { transform: scale(1.04); }
.nextp .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26, 34, 60, .35) 0%, rgba(26, 34, 60, .5) 45%, rgba(26, 34, 60, .92) 100%); }
.nextp .txt { position: absolute; left: clamp(16px, 3.4vw, 48px); right: clamp(84px, 12vw, 180px); bottom: clamp(20px, 3.4vw, 48px); }
.nextp small { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: #BAD8FD; }
.nextp b { display: block; margin-top: 12px; font-family: var(--display); font-weight: 500; font-size: clamp(34px, 6.4vw, 104px); line-height: .96; letter-spacing: -0.04em; text-wrap: balance; }
.nextp .arr { position: absolute; right: clamp(16px, 3.4vw, 48px); bottom: clamp(20px, 3.4vw, 48px); display: flex; align-items: center; justify-content: center; width: clamp(48px, 5vw, 72px); height: clamp(48px, 5vw, 72px); border: 1px solid #FFFFFF; font-size: clamp(18px, 1.8vw, 26px); transition: background .2s, color .2s, border-color .2s; }
.nextp:hover .arr, .nextp:focus-visible .arr { background: var(--accent); border-color: var(--accent); color: #1A223C; }
@media (prefers-reduced-motion: reduce) { .nextp img { transition: none; } }
.aboutp { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 5vw, 80px) clamp(16px, 3.4vw, 48px); display: flex; flex-direction: column; gap: 26px; }
.case-media img { cursor: zoom-in; }
.case-media .full { grid-column: 1 / -1; }
.vid { position: relative; background: #1A223C; overflow: hidden; }
.vid video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; cursor: pointer; }
.vid-ui { position: absolute; left: 14px; bottom: 18px; display: flex; gap: 8px; }
.vid-ui button { min-height: 40px; padding: 0 14px; background: #FFFFFF; color: #1A223C; border: 0; font-size: 13px; }
.vid-ui button:hover { background: var(--accent); }
.vid-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .35); }
.vid-bar i { display: block; width: 0; height: 100%; background: var(--accent); }
.lb { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; background: var(--ground); }
.lb-view { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: clamp(12px, 3vw, 40px) clamp(12px, 6vw, 96px); touch-action: none; cursor: zoom-in; user-select: none; }
.lb-view.zoomed { cursor: grab; }
.lb-view img { max-width: 100%; max-height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; left: clamp(8px, 2vw, 28px); width: 48px; height: 48px; margin-top: -24px; background: var(--ground); border: 1px solid var(--line); font-size: 16px; }
.lb-nav:hover { border-color: var(--ink); }
.contactp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 112px); align-items: start; max-width: 1280px; margin: 0 auto; padding: clamp(28px, 5vw, 80px) clamp(16px, 3.4vw, 48px); }
.contactp h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(38px, 5.2vw, 84px); line-height: .96; letter-spacing: -0.04em; text-wrap: balance; }
.form { display: flex; flex-direction: column; gap: 26px; }
.form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.f label, .f legend { padding: 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--soft); }
.f input, .f textarea { width: 100%; padding: 10px 0 12px; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; font: inherit; font-size: 18px; color: var(--ink); resize: none; }
.f input:focus, .f textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.f .err { min-height: 18px; font-size: 13px; color: #B00074; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips button { min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--line); font-size: 15px; transition: border-color .2s, background .2s, color .2s; }
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.form .send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form .send .go { min-height: 54px; padding: 0 30px; background: var(--ink); border: 1px solid var(--ink); color: var(--ground); font-size: 16px; transition: background .2s, border-color .2s, color .2s; }
.form .send .go:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.form .send span { color: var(--soft); font-size: 14px; }
.sent { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: clamp(20px, 3vw, 40px); border: 1px solid var(--line); }
.sent h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.03em; }
.sent p { margin: 0; color: var(--soft); max-width: 46ch; }
.about-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); align-items: end; }
.about-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 66% 40%; display: block; background: var(--line); }
.about-copy { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 860px) {
	.contactp, .form .two { grid-template-columns: 1fr; }
	.about-top { grid-template-columns: 1fr; }
	.about-img { aspect-ratio: 4 / 3; }
	.case { grid-template-columns: 1fr; }
	.case-text { position: static; }
}
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
@media (max-width: 640px) {
	.top nav { font-size: 14px; gap: 0 18px; }
	.shots, .sheet .cols { grid-template-columns: 1fr; }
	.foot { grid-template-columns: 1fr; }
	.foot .ctrl { justify-self: start; }
	.prog { order: 3; }
	.sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.card .tag { transition: none; }
}

/* ---------- Server-rendered pages (single projects, ordinary pages) ---------- */
body.plain { overflow: auto; }
body.plain .page { height: auto; min-height: 100vh; }
.plain-main { flex: 1; }
.plain-body { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 80px) clamp(16px, 3.4vw, 48px); }
.plain-body h1 { margin: 0 0 20px; font-family: var(--display); font-weight: 500; font-size: clamp(34px, 5vw, 72px); line-height: 1; letter-spacing: -0.035em; }
.plain-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin: 0 clamp(16px, 3.4vw, 48px); padding: 18px 0 24px; border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
a.nextp { text-decoration: none; }
.about p { margin: 0 0 12px; }
.about p:last-child { margin-bottom: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form .hp { position: absolute; left: -9999px; }
