:root {
  --ink: #111111;
  --body: #444444;
  --muted: #767676;
  --rule: #cfcfcf;
  --line: #e4e4e4;
  --paper: #ffffff;
  --night: #000000;
  --night-text: #c8c8c8;
  --night-muted: #9a9a9a;
  --night-rule: #555555;
  --sky: #dce9f2;
  --sky-ink: #4f6372;
  --navy: #1b1f4a;
  --max: 1100px;
  --gutter: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }

a { color: var(--ink); }
a:hover { color: #555555; }

:focus-visible { outline: 2px solid #3b6fd8; outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--night);
  padding: 14px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
}
.home-btn {
  width: 44px; height: 44px; border: 1.5px solid #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 32px; font-size: 15px; font-weight: 400; }
.site-nav a { color: #fff; text-decoration: none; padding: 12px 0; }
.site-nav a[aria-current="page"] { color: var(--night-muted); }
.site-nav a:hover { color: #d8d8d8; }

/* ---------- Shared type ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0;
}
.dark .eyebrow { color: var(--night-muted); }

.ruled { position: relative; padding-left: 28px; display: flex; flex-direction: column; gap: 16px; }
.ruled::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--rule); transform-origin: top;
}
.dark .ruled::before { background: var(--night-rule); }

.title-bar {
  margin: 0 0 0 -29px; padding-left: 26px; border-left: 3px solid var(--ink);
  font-weight: 400; line-height: 1.25;
}
.dark .title-bar { border-color: #fff; }

h1, h2, h3 { font-weight: 400; margin: 0; }
h2 { font-size: 28px; line-height: 1.3; }
.lede { font-size: 16px; line-height: 1.8; color: var(--body); margin: 0; }
.copy { font-size: 15px; line-height: 1.75; color: var(--body); margin: 0; }
.dark .copy, .dark .lede { color: var(--night-text); }
.label { font-size: 18px; font-weight: 400; margin: 6px 0 0; }

.pill {
  align-self: flex-start; display: inline-block;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none;
  font-size: 15px; font-weight: 400; padding: 11px 28px; border-radius: 999px;
}
.pill:hover { background: var(--ink); color: #fff; }
.dark .pill, .pill.light { border-color: #fff; color: #fff; }
.dark .pill:hover, .pill.light:hover { background: #fff; color: var(--ink); }
.pill.muted { border-color: var(--rule); color: var(--muted); cursor: default; }
.pill.muted:hover { background: none; color: var(--muted); }

.dark { background: var(--night); color: #fff; }

/* ---------- Placeholders ---------- */
.ph {
  background: var(--sky); color: var(--sky-ink);
  font-size: 12px; letter-spacing: 0.02em; line-height: 1.5;
  padding: 14px; display: flex; align-items: flex-end;
}
.ph.navy { background: var(--navy); color: #c9cce8; }
.ph.outline { outline: 2px solid var(--ink); outline-offset: -2px; }
.r-1 { aspect-ratio: 1; }
.r-45 { aspect-ratio: 4 / 5; }
.r-34 { aspect-ratio: 3 / 4; }
.r-43 { aspect-ratio: 4 / 3; }
.r-32 { aspect-ratio: 3 / 2; }
.r-169 { aspect-ratio: 16 / 9; }
.r-168 { aspect-ratio: 16 / 8; }
.r-219 { aspect-ratio: 21 / 9; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.caption { font-size: 13px; color: var(--muted); margin: 0; }
.dark .caption { color: var(--night-muted); }

.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > * { flex: 1 1 340px; min-width: 0; }
.split > .wide { flex: 1.5 1 460px; }

.section { padding-bottom: 120px; }

/* ---------- Home ---------- */
.lockup { padding: 120px var(--gutter); display: flex; justify-content: center; }
.lockup-inner { display: flex; flex-direction: column; }
.lockup-name { font-size: 26px; font-weight: 400; }
.lockup h1 { font-size: clamp(48px, 9vw, 88px); line-height: 1; letter-spacing: 0.06em; }
.lockup-role { align-self: flex-end; font-size: 20px; font-weight: 400; }

.intro-card { display: flex; flex-direction: column; gap: 18px; max-width: 340px; }
.intro-card .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: none; }
.intro-card h2 { font-size: 26px; line-height: 1.35; letter-spacing: 0.02em; }
.intro-card .copy { font-size: 14px; line-height: 1.8; }
.intro-card .pill { font-size: 14px; padding: 10px 28px; margin-top: 8px; }

.panel { display: flex; flex-wrap: wrap; min-height: 640px; }
.panel > * { flex: 1 1 480px; min-width: 0; }
.panel-text { padding: 64px; display: flex; align-items: center; }
.panel-media { position: relative; overflow: hidden; min-height: 360px; }
.panel-media > img, .panel-media > video { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }

.bleed { position: relative; min-height: 760px; display: flex; align-items: center; padding: 64px; overflow: hidden; }
.bleed > img, .bleed > video { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }
.bleed .ph-note { position: absolute; right: 48px; bottom: 32px; text-align: right; font-size: 13px; color: var(--sky-ink); }
.overlay-card { position: relative; width: 420px; max-width: 100%; background: rgba(0, 0, 0, 0.86); color: #fff; padding: 56px 44px; }

.phones { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 48px; background: var(--sky); }
.phones img { position: static; width: 30%; max-width: 220px; height: auto; border-radius: 22px; box-shadow: 0 24px 48px rgba(17, 30, 45, 0.18); }

/* ---------- Page heads ---------- */
.page-head { padding: 96px 0 88px; display: flex; flex-direction: column; gap: 20px; max-width: 680px; }
.page-head h1 { font-size: 40px; line-height: 1.2; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 0; align-self: flex-start; }

.layout-demo { position: relative; overflow: hidden; border: 1px solid var(--rule); background: var(--sky); }
.layout-demo .bar { position: absolute; left: 0; right: 0; top: 0; height: 26px; background: var(--night); }
.layout-demo .copyblock { position: absolute; left: 8%; bottom: 14%; display: flex; flex-direction: column; gap: 10px; width: 40%; }
.layout-demo .copyblock span { display: block; height: 14px; background: var(--ink); }
.layout-demo .copyblock span.s { width: 65%; height: 10px; background: #8c8c8c; }
.layout-demo .copyblock span.cta { width: 46%; height: 34px; border-radius: 999px; background: var(--night); }
.layout-demo .focus { position: absolute; right: 22%; top: 42%; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; }
.layout-demo.phone { border-radius: 20px; aspect-ratio: 9 / 19; }
.layout-demo.phone .copyblock { left: 12%; right: 12%; width: auto; bottom: 8%; }

.sizes { display: flex; gap: 8px; align-items: flex-end; }
.sizes .ph { padding: 0; }

.tag {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--muted); color: #555555; padding: 4px 10px; border-radius: 999px;
}

.step { padding: 56px 0; border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 72px;
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); font-size: 14px; font-weight: 400;
}
.socials { display: flex; gap: 4px; }
.socials a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .panel-text, .bleed { padding: 40px 20px; }
  .bleed { min-height: 560px; align-items: flex-end; }
  .overlay-card { padding: 40px 28px; }
  .panel { min-height: 0; }
  .lockup { padding: 72px var(--gutter); }
  .page-head { padding: 56px 0 56px; }
  .page-head h1 { font-size: 30px; }
  .ruled { padding-left: 18px; }
  .title-bar { margin-left: -19px; padding-left: 16px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { gap: 32px; }
  .section { padding-bottom: 80px; }
  .site-nav { gap: 20px; }
}

/* =====================================================
   Motion
   ===================================================== */
:root { --ease: cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Page fade */
html.js body { animation: page-in 0.7s var(--ease) both; }
html.js body.leaving { opacity: 0; transition: opacity 0.25s ease; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* Scroll reveals: fade up */
html.js :is(.page-head > *, .ruled, .grid > *, .overlay-card, .stat, .reveal, .media-stack > *, .campaign-index > *) {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .overlay-card { transform: translateX(-48px); }
html.js :is(.page-head > *, .ruled, .grid > *, .overlay-card, .stat, .reveal, .media-stack > *, .campaign-index > *).in,
html.no-motion :is(.page-head > *, .ruled, .grid > *, .overlay-card, .stat, .reveal, .media-stack > *, .campaign-index > *) {
  opacity: 1; transform: none;
}

/* The thin vertical rule draws down */
html.js .ruled::before { transform: scaleY(0); transition: transform 1.2s var(--ease) 0.15s; }
html.js .ruled.in::before, html.no-motion .ruled::before { transform: scaleY(1); }

/* Centre-out title reveal (PORTFOLIO lockup, page titles) */
html.js .clip-reveal { clip-path: inset(0 50% 0 50%); animation: clip-open 1.5s var(--ease) 0.15s forwards; }
@keyframes clip-open { to { clip-path: inset(0 0 0 0); } }
html.js .fade-late { opacity: 0; animation: fade-in 1s var(--ease) forwards; animation-delay: var(--d, 1s); }
@keyframes fade-in { to { opacity: 1; } }

/* Parallax media */
[data-parallax] { will-change: transform; }

/* Image hover */
.zoom { overflow: hidden; display: block; }
.zoom img { transition: transform 0.8s var(--ease); }
.zoom:hover img, .zoom:focus-visible img { transform: scale(1.04); }
button.zoom { padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html.js body { animation: none; }
  html.js .clip-reveal, html.js .fade-late { animation: none; clip-path: none; opacity: 1; }
  .zoom img { transition: none; }
}

/* =====================================================
   Lightbox
   ===================================================== */
.lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.92); color: #fff;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: fade-in 0.25s ease both; opacity: 0; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox figcaption { position: absolute; left: 24px; bottom: 20px; font-size: 13px; color: #c8c8c8; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.4); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lb-btn:hover { background: #fff; color: #000; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* =====================================================
   Campaign pages
   ===================================================== */
.page-title { text-align: center; padding: 104px var(--gutter) 40px; }
.page-title h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: 0.04em; }
.page-title .sub { font-size: 22px; font-weight: 400; margin-top: 18px; }
.page-title .lede { max-width: 620px; margin: 22px auto 0; }

.campaign-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 48px 0 120px; }
.campaign-index a {
  background: var(--paper); padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 150px;
  transition: background 0.3s ease;
}
.campaign-index a:hover { background: #f4f7fa; }
.campaign-index .n { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.campaign-index .t { font-size: 17px; font-weight: 400; }
.campaign-index .k { margin-top: auto; font-size: 13px; color: var(--body); }
.campaign-index .k strong { font-weight: 500; color: var(--ink); }

.campaign { padding: 96px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.campaign-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 48px; max-width: 760px; }
.campaign-head h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.2; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin: 0 0 56px; }
.stat { border-top: 1px solid var(--ink); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat .num { font-size: clamp(32px, 4vw, 46px); font-weight: 400; line-height: 1; letter-spacing: -0.01em; }
.stat .what { font-size: 14px; color: var(--body); line-height: 1.6; }
.dark .stat { border-color: #fff; }
.dark .stat .what { color: var(--night-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 400; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; }
.dark .chip { border-color: var(--night-rule); }

.case { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.case > .case-text { flex: 1 1 320px; min-width: 0; }
.case > .case-media { flex: 1.6 1 480px; min-width: 0; }
.case.flip { flex-direction: row-reverse; }
.case-text .ruled { position: sticky; top: 96px; }

.media-stack { display: flex; flex-direction: column; gap: 12px; }
.tile { background: var(--sky); overflow: hidden; position: relative; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.navy { background: var(--navy); }
.tile .tlabel {
  position: absolute; left: 10px; bottom: 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6); color: #fff; padding: 4px 8px; border-radius: 4px; pointer-events: none;
}
.phase { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }

.video-frame { position: relative; background: #000; overflow: hidden; }
.video-frame video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

.reel {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 18px;
  scrollbar-width: thin;
}
.reel > * { flex: 0 0 auto; width: 200px; scroll-snap-align: start; }
.reel img { border-radius: 18px; box-shadow: 0 16px 32px rgba(17, 30, 45, 0.14); }

.center-head { text-align: center; max-width: 680px; margin: 0 auto 40px; display: flex; flex-direction: column; gap: 14px; align-items: center; }

.next-page { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding: 72px var(--gutter); }

@media (max-width: 900px) {
  .campaign-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case.flip { flex-direction: column; }
  .case-text .ruled { position: static; }
}
@media (max-width: 720px) {
  .page-title { padding: 64px var(--gutter) 24px; }
  .campaign { padding: 64px 0; }
  .campaign-index { margin-bottom: 72px; }
  .reel > * { width: 150px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: auto; right: 80px; }
}
.tile.contain img { object-fit: contain; }
.tile.pad { padding: 18px; }
.board { background: var(--navy); padding: 24px; }
.board.sky { background: var(--sky); }
.results { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.results li { font-size: 15px; line-height: 1.7; color: var(--body); }
.tile > .zoom { height: 100%; }
/* Header: name wordmark and stronger nav */
.brand { color: #fff; text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: 0.02em; min-height: 44px; display: inline-flex; align-items: center; }
.brand:hover { color: #fff; opacity: 0.85; }
.site-nav { gap: 36px; }
.site-nav a { position: relative; color: #fff; font-size: 16px; font-weight: 500; letter-spacing: 0.04em; }
.site-nav a:hover, .site-nav a[aria-current] { color: #fff; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
@media (max-width: 720px) { .brand { font-size: 16px; } .site-nav { gap: 22px; } .site-nav a { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .site-nav a::after { transition: none; } }
/* Performance */
html.js body { animation: none; }
html.js :is(.page-head > *, .ruled, .grid > *, .overlay-card, .stat, .reveal, .media-stack > *, .campaign-index > *) {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0s);
}
.set, .campaign, .step, .cv-section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.panel-media > img, .panel-media > video, .bleed > img, .bleed > video, .hero-video video { top: 0; height: 100%; }

/* Snappier reveals */
html.js :is(.page-head > *, .ruled, .grid > *, .overlay-card, .stat, .reveal, .media-stack > *, .campaign-index > *) {
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .overlay-card { transform: translateX(-32px); }
html.js .ruled::before { transition: transform 0.8s var(--ease) 0.1s; }

.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Keep the heading bar in front of the vertical rule */
.title-bar, .cv-name { position: relative; z-index: 1; }

/* Portfolio lockup: name and role slide in towards PORTFOLIO */
.lockup { overflow-x: clip; }
html.js .lockup .lockup-name.fade-late { animation: lockup-from-left 1.2s var(--ease) 0.85s both; }
html.js .lockup .lockup-role.fade-late { animation: lockup-from-right 1.2s var(--ease) 0.95s both; }
@keyframes lockup-from-left { from { opacity: 0; transform: translateX(-72px); } to { opacity: 1; transform: none; } }
@keyframes lockup-from-right { from { opacity: 0; transform: translateX(72px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .lockup .lockup-name.fade-late, html.js .lockup .lockup-role.fade-late { animation: none; opacity: 1; transform: none; }
}

/* Lockup: line the name up with the P and the role with the O (optical, Montserrat side bearings) */
.lockup { --h: clamp(48px, 9vw, 88px); }
.lockup h1 { font-size: var(--h); }
.lockup-name { margin-left: calc(var(--h) * 0.1143 - 2.97px); }
.lockup-role { margin-right: calc(var(--h) * 0.1116 - 0.75px); }

/* Floating cards: soft corners */
.overlay-card { border-radius: 12px; }

/* Portfolio UI/UX: split, one half per case study */
.uxs { display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(90deg, #101114 50%, #0b0f4f 50%); }
.uxs-intro { grid-column: 1 / -1; justify-self: center; margin: 72px var(--gutter) 0; width: 560px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px rgba(10, 14, 30, 0.22); z-index: 2; }
html.js .uxs-intro.overlay-card { transform: translateY(24px); }
html.js .uxs-intro.overlay-card.in, html.no-motion .uxs-intro.overlay-card { transform: none; }
.uxs-intro .intro-card { max-width: none; }
.uxs-case { position: relative; display: flex; flex-direction: column; gap: 40px; padding: 64px 64px 0; overflow: hidden; text-decoration: none; color: inherit; min-height: 620px; }
.uxs-cc { background: #101114; color: #fff; }
.uxs-app { background: #0b0f4f; color: #fff; }
.uxs-text { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.uxs-text .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: none; }
.uxs-cc .eyebrow { color: var(--night-muted); }
.uxs-t { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; font-weight: 500; }
.uxs-text .copy { font-size: 15px; line-height: 1.7; }
.uxs-cc .copy { color: var(--night-text); }
.uxs-text .pill { margin-top: 6px; transition: background 0.3s ease, color 0.3s ease; }
.uxs-cc:hover .pill { background: #fff; color: var(--ink); }
.uxs-app:hover .pill { background: var(--ink); color: #fff; }
.uxs-media { position: relative; flex: 1; min-height: 300px; }
.uxs-shot { position: absolute; left: 0; top: 0; width: 128%; max-width: none; height: auto; border-radius: 12px; border: 1px solid #2c2c2c; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); transform-origin: 0 0; transform: perspective(1800px) rotateY(-9deg) rotateX(5deg); transition: transform 0.8s var(--ease); }
.uxs-cc:hover .uxs-shot { transform: perspective(1800px) rotateY(-3deg) rotateX(2deg) translateY(-8px); }
.uxs-phones { display: flex; justify-content: center; align-items: flex-start; gap: 4%; }
.uxs-phones img { width: 30%; max-width: 210px; height: auto; border-radius: 22px; border: 5px solid #fff; box-shadow: 0 24px 50px rgba(60, 45, 25, 0.18); transition: transform 0.8s var(--ease); }
.uxs-phones img:nth-child(1), .uxs-phones img:nth-child(3) { margin-top: 56px; }
.uxs-app:hover .uxs-phones img:nth-child(2) { transform: translateY(-12px); }
.uxs-app:hover .uxs-phones img:nth-child(1), .uxs-app:hover .uxs-phones img:nth-child(3) { transform: translateY(-6px); }
.uxs-case:focus-visible { outline: 3px solid #5b8def; outline-offset: -6px; }
@media (max-width: 900px) {
  .uxs { grid-template-columns: 1fr; background: var(--paper); }
  .uxs-intro { width: auto; margin: 40px 20px; box-shadow: none; border: 1px solid var(--line); }
  .uxs-case { padding: 40px 20px 0; min-height: 520px; }
}
@media (prefers-reduced-motion: reduce) { .uxs-shot, .uxs-phones img { transition: none; } }

/* UI/UX case pages: switcher and next case */
.case-switch { position: sticky; top: 72px; z-index: 40; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: flex-end; padding: 14px 0; margin-top: 8px; background: var(--paper); }
.cs-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cs-tabs { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.cs-tabs a { font-size: 14px; padding: 8px 18px; border-radius: 999px; color: var(--ink); text-decoration: none; transition: background 0.3s ease, color 0.3s ease; }
.cs-tabs a:hover { background: var(--sky); }
.cs-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 720px) { .case-switch { position: static; justify-content: flex-start; } .cs-label { display: none; } }
.next-case { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 72px var(--gutter); background: var(--sky); color: var(--ink); text-decoration: none; overflow: hidden; }
.nc-text { display: flex; flex-direction: column; gap: 14px; max-width: 520px; justify-self: end; }
.nc-text .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: none; }
.nc-t { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; font-weight: 500; }
.nc-go { font-size: 15px; border-bottom: 1px solid var(--ink); align-self: flex-start; padding-bottom: 2px; }
.nc-go span { display: inline-block; transition: transform 0.4s var(--ease); }
.next-case:hover .nc-go span { transform: translateX(6px); }
.nc-media img { width: 100%; max-width: 560px; height: auto; display: block; border-radius: 12px; box-shadow: 0 24px 50px rgba(20, 30, 70, 0.18); transition: transform 0.8s var(--ease); }
.next-case:hover .nc-media img { transform: translateY(-6px); }
@media (max-width: 720px) { .next-case { grid-template-columns: 1fr; padding: 48px 20px; gap: 28px; } .nc-text { justify-self: start; } }

/* Full-bleed image shown whole on wide screens (flat background matches the section) */
@media (min-width: 901px) { .bleed > img.fit-contain { object-fit: contain; object-position: 100% 50%; } }

/* App half: deep navy with soft circles, matching the app showcase art */
.uxs-app { isolation: isolate; }
.uxs-app::before, .uxs-app::after { content: ""; position: absolute; border-radius: 50%; background: #181e72; z-index: -1; pointer-events: none; }
.uxs-app::before { width: 520px; height: 520px; right: -280px; top: 48px; }
.uxs-app::after { width: 640px; height: 640px; left: -300px; bottom: -380px; }
.uxs-app .eyebrow { color: #a3a8de; }
.uxs-app .copy { color: #c9cce8; }
.uxs-app:hover .pill { background: #fff; color: #0b0f4f; }
.uxs-phones img { border-radius: 26px; border-width: 6px; box-shadow: 0 28px 60px rgba(3, 5, 30, 0.45); }

/* UI/UX intro: a dark section header instead of a floating card */
.uxs-intro { justify-self: stretch; width: auto; margin: 0; padding: 88px 64px 16px; background: #101114; color: #fff; box-shadow: none; border: 0; }
.uxs-intro .intro-card { max-width: 620px; }
@media (max-width: 900px) { .uxs-intro { margin: 0; padding: 56px 20px 8px; border: 0; } }

/* UI/UX intro on a light row, so the split below starts clean */
.uxs-intro { background: var(--paper); color: var(--ink); padding: 96px 64px 64px; }
@media (max-width: 900px) { .uxs-intro { padding: 56px 20px 40px; } }

/* UI/UX: giant headline across the split */
.uxs-intro.uxs-big { background: transparent; padding: 104px 64px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.uxs-big .eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: none; color: #a3a8de; margin: 0; }
.uxs-big h2 { margin: 0; color: #fff; font-size: clamp(84px, 11vw, 164px); font-weight: 600; line-height: 0.95; letter-spacing: -0.01em; }
.uxs-cc, .uxs-app { padding-top: 56px; }
@media (max-width: 900px) {
  .uxs { background: #101114; }
  .uxs-intro.uxs-big { padding: 64px 20px 8px; }
  .uxs-cc, .uxs-app { padding-top: 40px; }
}

/* Portfolio: sections as inset rounded blocks with white gaps */
.pf-blocks > section:not(.lockup) { position: relative; margin: 0 16px 16px; border-radius: 16px; overflow: hidden; }
@media (max-width: 720px) { .pf-blocks > section:not(.lockup) { margin: 0 10px 10px; border-radius: 12px; } }

/* Portfolio: Illustration | Key visuals, big type over two images */
.ikv { display: grid; grid-template-columns: 1fr 1fr; }
.ikv-half { position: relative; display: flex; flex-direction: column; min-height: 860px; padding: 72px 64px 0; overflow: hidden; text-decoration: none; isolation: isolate; }
.ikv-ill { background: #6dcff4; color: var(--ink); }
.ikv-kv { background: #11162c; color: #fff; }
.ikv-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ikv-text .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: none; margin: 0; }
.ikv-ill .eyebrow { color: rgba(17, 17, 17, 0.7); }
.ikv-kv .eyebrow { color: #a3a8de; }
.ikv-big { margin: 0; font-size: clamp(48px, 5.4vw, 88px); font-weight: 600; line-height: 0.95; letter-spacing: -0.01em; }
.ikv-text .pill { margin-top: 6px; transition: background 0.3s ease, color 0.3s ease; }
.ikv-ill:hover .pill { background: var(--ink); color: #fff; }
.ikv-kv:hover .pill { background: #fff; color: #11162c; }
.ikv-img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; z-index: 1; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); transition: transform 1s var(--ease); transform-origin: 50% 100%; }
.ikv-half:hover .ikv-img { transform: scale(1.03); }
.ikv-half:focus-visible { outline: 3px solid #5b8def; outline-offset: -6px; }
@media (max-width: 900px) {
  .ikv { grid-template-columns: 1fr; }
  .ikv-half { min-height: 0; padding: 48px 20px 0; }
  .ikv-img { position: relative; margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { .ikv-img { transition: none; } }

/* Illustration | Key visuals: one section, one link */
.ikv { position: relative; color: inherit; text-decoration: none; }
.ikv:hover .ikv-img { transform: scale(1.03); }
.ikv:focus-visible { outline: 3px solid #5b8def; outline-offset: -6px; }
.ikv-cta { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 4; background: #fff; color: var(--ink); border-color: #fff; white-space: nowrap; box-shadow: 0 14px 34px rgba(5, 10, 30, 0.28); transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.ikv:hover .ikv-cta { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 900px) { .ikv-cta { bottom: 24px; } }

/* Clearer single button: solid dark pill with a white ring and arrow */
.ikv-cta { bottom: 48px; font-size: 16px; font-weight: 500; padding: 16px 30px; background: var(--ink); color: #fff; border: 0; box-shadow: 0 0 0 2px #fff, 0 18px 40px rgba(5, 10, 30, 0.35); display: inline-flex; align-items: center; gap: 10px; }
.ikv-arrow { display: inline-block; transition: transform 0.4s var(--ease); }
.ikv:hover .ikv-cta { background: var(--ink); color: #fff; }
.ikv:hover .ikv-arrow { transform: translateX(5px); }
@media (max-width: 900px) { .ikv-cta { bottom: 28px; font-size: 15px; padding: 14px 24px; } }
/* mobile pass */
body { overflow-x: clip; }
@media (max-width: 720px) {
  .site-footer a[href^="mailto:"] { display: inline-block; padding: 12px 0; margin: -8px 0; }
}
/* mobile portfolio blocks: picture first, caption below */
@media (max-width: 720px) {
  .pf-blocks .bleed { display: flex; flex-direction: column; align-items: stretch; padding: 0; min-height: 0; }
  .pf-blocks .bleed > img, .pf-blocks .bleed > video { position: relative; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .pf-blocks .bleed .ph-note { display: none; }
  .pf-blocks .bleed .overlay-card { width: auto; max-width: none; border-radius: 0; background: #111; padding: 28px 22px 32px; transform: none; }
  .pf-blocks .panel { flex-direction: column; flex-wrap: nowrap; }
  .pf-blocks .panel > * { flex: none; }
  .pf-blocks .panel > .panel-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .pf-blocks .panel > .panel-text { padding: 28px 22px 32px; }
}
/* mobile media framing */
.bleed > img.m-only { display: none; }
@media (max-width: 720px) {
  .pf-blocks .bleed > img.d-only { display: none; }
  .pf-blocks .bleed > img.m-only { display: block; }
  .pf-blocks section[aria-labelledby="dd-title"] .panel-media > video { transform-origin: 60% 55%; transform: translateX(-10%) scale(1.4); }
}
