:root {
  --blue: #4F46E5;
  --blue-deep: #4338CA;
  --grey: #5A5E72;
  --ink: #0B0C1F;
  --paper: #F6F6F3;
  --card: #FFFFFF;
  --line: rgba(15, 23, 36, .09);
  --ease: cubic-bezier(.22, .8, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.blue { color: var(--blue); }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .75rem 1.35rem; font: 600 .95rem/1 var(--body); transition: transform .35s var(--ease), background-color .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

/* header: full width at the top, a floating pill once scrolled */
.hd { position: fixed; top: 0; left: 50%; z-index: 20; width: 100%; max-width: 100%; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; transition: max-width .8s var(--ease-inout), padding .8s var(--ease-inout), transform .8s var(--ease-inout); }
.hd::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 10px 30px rgba(15, 23, 36, .08); opacity: 0; transition: opacity .3s ease, border-radius .8s var(--ease-inout); }
.hd.is-scrolled { max-width: min(64rem, calc(100% - 1.5rem)); transform: translate(-50%, .75rem); padding: .45rem .5rem .45rem 1.25rem; }
.hd.is-scrolled::before { opacity: 1; border-radius: 999px; }
.hd-logo img { width: auto; height: 46px; transition: transform .8s var(--ease-inout); transform-origin: left center; }
.hd.is-scrolled .hd-logo img { transform: scale(.82); }
.hd-nav { display: flex; align-items: center; gap: 1.5rem; font: 500 .95rem/1 var(--body); }
.hd-nav > a:not(.btn):hover { color: var(--blue); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2rem; min-height: 100vh; min-height: 100svh; padding: 7rem 2rem 4rem; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 60vw; height: 60vw; right: -18vw; top: -12vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(79, 70, 229, .14), rgba(79, 70, 229, 0)); pointer-events: none; }
.kicker { margin: 0 0 1rem; font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
h1 { margin: 0; font: 700 clamp(2.6rem, 5.4vw, 4.6rem)/1.02 var(--display); letter-spacing: -.01em; max-width: 11ch; }
.lede { max-width: 32rem; margin: 1.5rem 0 0; font-size: 1.125rem; color: #3b4452; }
.hero-cta { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.count { color: var(--grey); font-size: .95rem; }
.count b { color: var(--ink); font: 700 1.25rem/1 var(--display); }

/* drifting phone reel (transform only, paused off-screen) */
.reel { min-width: 0; position: relative; display: flex; flex-direction: column; gap: 1rem; transform: rotate(-6deg); margin-right: -6rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reel-row { display: flex; gap: 1rem; width: max-content; animation: drift 60s linear infinite; }
.reel-row--rev { animation-direction: reverse; animation-duration: 70s; }
.reel-row img { width: 9.5rem; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 1.25rem; border: 4px solid #fff; box-shadow: 0 12px 30px rgba(15, 23, 36, .12); }
.hero.is-off .reel-row { animation-play-state: paused; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* work */
.work { padding: 5rem 2rem 6rem; }
.work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 2.5rem; }
h2 { margin: 0; font: 700 clamp(2rem, 3.6vw, 3rem)/1.05 var(--display); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .6rem 1.05rem; font: 500 .9rem/1 var(--body); transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.chip:hover { border-color: var(--blue); }
.chip.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem 2.5rem; }
.card { min-width: 0; }
.card.is-hidden { display: none; }
.shot { position: relative; display: block; border-radius: 1rem; background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(15, 23, 36, .07); margin-right: 2.5rem; }
.frame { display: flex; align-items: center; gap: .35rem; height: 2.1rem; padding: 0 .9rem; border-bottom: 1px solid var(--line); }
.frame i { width: .55rem; height: .55rem; border-radius: 50%; background: #dfe3ea; }
.frame em { margin-left: .75rem; font: 400 .75rem/1 var(--body); font-style: normal; color: var(--grey); }
.shot { overflow: visible; }
.shot-d { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 0 0 1rem 1rem; }
.shot-m { position: absolute; right: -2.5rem; bottom: -1.75rem; width: 24%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 1rem; border: 4px solid #fff; box-shadow: 0 16px 36px rgba(15, 23, 36, .18); transition: transform .6s var(--ease); }
.shot { transition: transform .6s var(--ease), box-shadow .6s ease; }
.shot:hover { transform: translateY(-6px); box-shadow: 0 28px 60px rgba(15, 23, 36, .12); }
.shot:hover .shot-m { transform: translateY(-14px) rotate(-3deg); }
.info { padding: 2.75rem .25rem 0; max-width: 34rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .6rem; font-size: .85rem; color: var(--grey); }
.tag { padding: .3rem .65rem; border-radius: 999px; background: rgba(79, 70, 229, .1); color: var(--blue-deep); font-weight: 600; font-size: .75rem; }
h3 { margin: 0 0 .5rem; font: 600 1.6rem/1.15 var(--display); }
.info p:not(.meta) { margin: 0; color: #3b4452; }
.go { display: inline-flex; gap: .35rem; margin-top: 1rem; font-weight: 600; color: var(--blue-deep); }
.go span { transition: transform .35s var(--ease); }
.go:hover span { transform: translate(3px, -3px); }
.empty { color: var(--grey); }

/* closing call to action */
.cta { padding: 0 2rem 6rem; }
.cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding: 3.5rem; border-radius: 2rem; background: var(--ink); color: #fff; }
.cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }

.ft { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding: 2rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--grey); }
.ft img { height: 36px; width: auto; }
.ft p { margin: 0; }
.ft p:first-of-type { flex: 1; min-width: 16rem; }

/* scroll reveal (only when JS is running) */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s ease var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .rv.is-in { opacity: 1; transform: none; }

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 7rem 1.25rem 3rem; }
  .reel { margin: 1rem -3rem 0; }
  .reel-row img { width: 7rem; }
  .grid { grid-template-columns: 1fr; }
  .work { padding: 3rem 1.25rem 4rem; }
  .cta { padding: 0 1.25rem 4rem; }
  .cta-in { padding: 2.25rem 1.5rem; }
}
@media (max-width: 560px) {
  .hd { padding: .8rem 1rem; }
  .hd-nav > a:not(.btn) { display: none; }
  .hd-nav .btn { padding: .6rem 1rem; font-size: .85rem; }
  .hd-logo img { height: 38px; }
  .shot { margin-right: 1.5rem; }
  .shot-m { right: -1.5rem; width: 28%; }
  .frame em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* two groups: client projects, then concepts */
.group + .group { margin-top: 6rem; }
.group.is-hidden { display: none; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.25rem; margin-bottom: 2.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.group-title { margin: 0; font: 600 1.5rem/1.1 var(--display); }
.group-head p { margin: 0; color: var(--grey); }
.tag--client { background: var(--ink); color: #fff; }
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 3rem; }
  .shot { margin-right: 1.75rem; }
  .shot-m { right: -1.75rem; width: 26%; }
  h3 { font-size: 1.4rem; }
}
@media (max-width: 899px) { .group + .group { margin-top: 4rem; } }

/* live site preview popup (native <dialog>; fades and scales with opacity/transform only) */
html.pv-lock { overflow: hidden; }
.pv { width: min(1500px, calc(100vw - 2.5rem)); height: calc(100vh - 2.5rem); height: calc(100dvh - 2.5rem); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 1.25rem; background: var(--ink); color: #fff; overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .35s ease, transform .45s var(--ease); }
.pv:not([open]) { display: none; }
.pv.is-in { opacity: 1; transform: none; }
.pv::backdrop { background: rgba(10, 15, 25, .72); }
.pv-bar { display: flex; align-items: center; gap: 1rem; padding: .7rem .8rem .7rem 1.25rem; }
.pv-title { display: flex; align-items: baseline; gap: .75rem; min-width: 0; flex: 1; }
.pv-title strong { font: 600 1.1rem/1.2 var(--display); white-space: nowrap; }
.pv-title span { color: #9aa4b5; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-size { display: flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.pv-sz { cursor: pointer; border: 0; border-radius: 999px; padding: .45rem .9rem; background: transparent; color: #c9d1de; font: 500 .85rem/1 var(--body); }
.pv-sz.is-on { background: #fff; color: var(--ink); }
.pv-actions { display: flex; align-items: center; gap: .5rem; }
.pv-open { padding: .6rem 1.1rem; font-size: .9rem; }
.pv-close { cursor: pointer; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font: 400 1.6rem/1 var(--body); }
.pv-close:hover { background: rgba(255, 255, 255, .2); }
.pv :focus-visible { outline: 3px solid #8fb6f5; outline-offset: 2px; }
.pv-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 0 .8rem .8rem; }
.pv-frame { position: relative; width: 100%; height: 100%; border-radius: .75rem; overflow: hidden; background: #fff; }
.pv-frame.is-phone { width: 402px; max-width: 100%; border-radius: 1.75rem; border: 6px solid #2a3344; }
.pv-frame iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.pv-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--grey); font-size: .95rem; }
.pv-frame.is-loaded .pv-loading { display: none; }
@media (max-width: 700px) {
  .pv { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .pv-size { display: none; }
  .pv-title span { display: none; }
  .pv-stage { padding: 0; }
  .pv-frame { border-radius: 0; }
}

/* XS One text logo (the logo file on xsoneconsultants.com could not be fetched: their certificate is broken) */
.wm { display: inline-flex; align-items: baseline; gap: .3rem; font: 600 1.35rem/1 var(--display); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.wm b { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .55rem; background: var(--ink); color: #A5ADFF; font-weight: 700; font-size: 1rem; align-self: center; }
.wm i { font-style: normal; font-weight: 500; color: var(--grey); }
.hd .wm { transition: transform .8s var(--ease-inout); transform-origin: left center; }
.hd.is-scrolled .wm { transform: scale(.9); }
@media (max-width: 560px) { .wm i { display: none; } }
