/* Portkey Technologies — portkey.sg */
@property --dot {
  syntax: "<length>";
  inherits: false;
  initial-value: 2.9px;
}

:root {
  --bg: #000;
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, .72);
  --ink-faint: rgba(255, 255, 255, .38);
  --line: rgba(255, 255, 255, .14);
  --magenta: #b72286;
  --magenta-hot: #e0329f;
  --display: "Big Shoulders Stencil Display", "Impact", sans-serif;
  --body: "Inter Tight", -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--magenta); color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .4s var(--ease), backdrop-filter .4s, transform .4s var(--ease);
}
.nav.scrolled {
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-mark {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: .04em;
  color: var(--magenta); text-transform: uppercase;
  opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s var(--ease);
}
.nav.scrolled .nav-mark { opacity: 1; transform: none; }
.nav-mark img { width: 32px; height: auto; }
.nav nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.nav nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .02em;
  color: var(--ink-soft); position: relative; padding: 4px 0;
}
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--magenta); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav nav a:hover, .nav nav a.active { color: #fff; }
.nav nav a:hover::after, .nav nav a.active::after { transform: scaleX(1); }
/* shown only on browsers that can open an immersive-vr session (see main.js) */
.nav-vr {
  font: 600 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: #fff; cursor: pointer;
  background: var(--magenta); border: 0; border-radius: 999px; padding: 6px 14px; margin: -2px 0;
}
.nav-vr:hover { background: var(--magenta-hot); }
.nav-vr[hidden] { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden; isolation: isolate;
}
#field {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  display: block;
}
.hero::after { /* fade into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22vh; z-index: -1;
  background: linear-gradient(to bottom, transparent, #000);
  pointer-events: none;
}
.hero-inner {
  width: min(1240px, 100% - 2 * var(--gutter));
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.logo {
  display: flex; align-items: center; width: 100%;
  gap: clamp(8px, 2vw, 28px);
}
.wordmark { margin: 0; flex: 1 1 auto; min-width: 0; }
.wordmark img {
  width: 100%; height: auto;
  filter: drop-shadow(0 0 40px rgba(183, 34, 134, .25));
  animation: rise 1.4s var(--ease) both .15s;
}
.tagline {
  margin: 0; font-size: clamp(16px, 1.8vw, 22px); font-weight: 500;
  letter-spacing: .01em; text-align: center; color: rgba(255, 255, 255, .9);
  animation: rise 1.4s var(--ease) both .45s;
}

/* the cube */
.cube-stage {
  --s: clamp(64px, 17vw, 210px);
  flex: 0 0 auto; width: calc(var(--s) * 1.25); height: calc(var(--s) * 1.25);
  perspective: 900px; display: grid; place-items: center;
  cursor: grab; touch-action: pan-y;
  animation: rise 1.4s var(--ease) both;
}
.cube-stage:active { cursor: grabbing; }
.cube {
  position: relative; width: var(--s); height: var(--s);
  transform-style: preserve-3d;
  transform: rotateX(-24deg) rotateY(-38deg);
}
.face {
  position: absolute; inset: 0;
  background-size: cover;
  backface-visibility: hidden;
  outline: 1px solid rgba(0, 0, 0, .35);
}
.face canvas { width: 100%; height: 100%; display: block; }
.f-front  { transform: translateZ(calc(var(--s) / 2)); }
.f-back   { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f-right  { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.f-left   { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f-top    { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid var(--ink-faint); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--magenta); border-radius: 2px; animation: cue 1.8s infinite var(--ease);
}

@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 80%, 100% { transform: translateY(16px); opacity: 0 } }

/* ---------- shared ---------- */
section { position: relative; }
.kicker, .section-title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  color: var(--magenta); letter-spacing: .02em; line-height: .9; margin: 0;
}
.kicker { font-size: 22px; letter-spacing: .14em; margin-bottom: 28px; }
.section-title { font-size: clamp(64px, 12vw, 180px); margin-bottom: clamp(32px, 5vw, 64px); }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about { padding: clamp(96px, 16vw, 200px) var(--gutter) clamp(72px, 10vw, 140px); max-width: 1320px; margin: 0 auto; }
.statement {
  margin: 0; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.18; font-weight: 400;
  letter-spacing: -.015em; color: #fff;
}
.statement em { font-style: normal; color: var(--ink-faint); transition: color .5s; }
.statement:hover em { color: #fff; }
.statement .hl {
  background: linear-gradient(transparent 62%, rgba(183, 34, 134, .75) 62%);
  padding: 0 .08em;
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0;
  background: #050505;
}
.marquee-track {
  display: flex; align-items: center; gap: 36px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee span {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55);
}
.marquee span:nth-of-type(3n+1) { color: var(--magenta); -webkit-text-stroke: 0; }
.marquee i {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, transparent 32%) 0 0 / 6px 6px;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- services ---------- */
.services { padding: clamp(96px, 14vw, 180px) var(--gutter); max-width: 1440px; margin: 0 auto; }
.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.svc {
  position: relative; overflow: hidden;
  padding: clamp(28px, 3vw, 44px); min-height: 360px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  transition: background .5s var(--ease);
}
.svc .glyph {
  position: absolute; right: -10px; top: -10px; width: 190px; height: 190px;
  opacity: .5; transition: opacity .6s var(--ease), transform .8s var(--ease);
  pointer-events: none;
}
.svc:hover { background: #0b0b0b; }
.svc:hover .glyph { opacity: 1; transform: scale(1.08) rotate(-4deg); }
.svc .num { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--magenta); letter-spacing: .1em; }
.svc h3 {
  margin: 48px 0 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.01em; line-height: 1.1;
  max-width: 80%;
}
.svc p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }

/* ---------- projects ---------- */
.projects { padding: clamp(72px, 10vw, 140px) var(--gutter); max-width: 1440px; margin: 0 auto; }
.proj-grid {
  display: grid; gap: clamp(48px, 6vw, 88px) clamp(28px, 3vw, 44px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  align-items: start;
}
.proj { display: flex; flex-direction: column; }
.proj .media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0c0c0c;
  margin-bottom: 20px;
}
.proj .media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter .8s var(--ease);
  filter: grayscale(1) contrast(1.15);
  /* halftone mask: dots grow until the picture is whole */
  -webkit-mask-image: radial-gradient(circle, #000 var(--dot), transparent calc(var(--dot) + .6px));
  mask-image: radial-gradient(circle, #000 var(--dot), transparent calc(var(--dot) + .6px));
  -webkit-mask-size: 7px 7px; mask-size: 7px 7px;
  transition: --dot .9s var(--ease), transform 1.2s var(--ease), filter .8s var(--ease);
}
.proj:hover .media img, .proj:focus-within .media img {
  --dot: 6px; filter: none; transform: scale(1.04);
}
.proj .media::after { /* magenta wash under the dots */
  content: ""; position: absolute; inset: 0; background: var(--magenta);
  mix-blend-mode: multiply; opacity: .0; transition: opacity .6s;
}
.proj .logo-tile { display: grid; place-items: center; background: #0a0a0a; }
.proj .logo-tile img { object-fit: contain; width: 76%; height: 76%; }
.proj .logo-tile.light { background: #f3efe6; }
.proj-artist { margin: 0 0 2px; font-size: 14px; color: var(--magenta-hot); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.proj h3 { margin: 0 0 12px; font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
.proj-body {
  position: relative; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6;
  max-height: 7.9em; overflow: hidden; transition: max-height .8s var(--ease);
}
.proj-body::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3.2em;
  background: linear-gradient(transparent, #000); transition: opacity .4s;
}
.proj.open .proj-body { max-height: 200em; }
.proj.open .proj-body::after { opacity: 0; }
.proj-body p { margin: 0 0 .9em; }
.proj-body blockquote { margin: .4em 0 1em; padding-left: 14px; border-left: 2px solid var(--magenta); color: #fff; font-style: italic; }
.proj-body cite { display: block; font-style: normal; color: var(--ink-faint); font-size: 14px; margin-top: 4px; }
.more {
  align-self: flex-start; margin: 10px 0 14px; padding: 0; border: 0; background: none; cursor: pointer;
  color: #fff; font: 600 13px var(--body); letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.more::before { content: "+"; color: var(--magenta); font-size: 18px; line-height: 1; transition: transform .4s var(--ease); }
.proj.open .more::before { transform: rotate(45deg); }
.proj-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.proj-link {
  align-self: flex-start; font-size: 14px; color: var(--ink-faint); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .3s, border-color .3s;
}
.proj-link::after { content: " ↗"; }
.proj-link:hover { color: #fff; border-color: var(--magenta); }

/* ---------- team ---------- */
.team { padding: clamp(72px, 10vw, 140px) var(--gutter); max-width: 1440px; margin: 0 auto; }
.lede { max-width: 760px; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.4; color: var(--ink-soft); margin: -12px 0 clamp(40px, 5vw, 72px); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.person { margin: 0; }
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #111; margin-bottom: 14px; }
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); transition: transform 1s var(--ease), filter .6s;
}
.portrait::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, var(--magenta) 32%, transparent 34%) 0 0 / 6px 6px;
  mix-blend-mode: screen; opacity: 0; transition: opacity .6s var(--ease);
}
.person:hover .portrait img { transform: scale(1.05); filter: grayscale(1) contrast(1.25); }
.person:hover .portrait::after { opacity: .55; }
.person figcaption strong { display: block; font-weight: 500; font-size: 17px; line-height: 1.25; }
.person figcaption strong span { display: block; font-weight: 400; color: var(--ink-faint); font-size: 15px; }
.person .role { display: block; margin-top: 4px; font-size: 14px; color: var(--magenta-hot); }

/* ---------- contact ---------- */
.contact { min-height: 86svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; border-top: 1px solid var(--line); }
#contactField { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.contact-inner { padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(48px, 6vw, 80px); max-width: 1440px; width: 100%; margin: 0 auto; }
.contact-title {
  margin: 0 0 clamp(24px, 4vw, 48px);
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(88px, 20vw, 320px); line-height: .82; color: var(--magenta); letter-spacing: .01em;
}
.contact-cols { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px; }
address { font-style: normal; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.35; color: #fff; }
.mail {
  font-size: clamp(24px, 3.6vw, 52px); font-weight: 500; letter-spacing: -.02em; text-decoration: none;
  background: linear-gradient(var(--magenta), var(--magenta)) 0 100% / 0 3px no-repeat;
  transition: background-size .5s var(--ease); padding-bottom: 4px;
}
.mail:hover { background-size: 100% 3px; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 22px var(--gutter); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-faint);
}

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 13px; }
  .nav nav a:nth-child(2) { display: none; }
  .nav-mark span { display: none; }
  .svc { min-height: 0; }
  .svc h3 { margin-top: 28px; }
  .svc .glyph { width: 130px; height: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* logo tiles stay whole: no halftone mask, no grayscale */
.proj .logo-tile img, .proj:hover .logo-tile img {
  -webkit-mask-image: none; mask-image: none; filter: none;
}
.proj:hover .logo-tile img { transform: scale(1.05); }

/* team: three across, two on phones */
.team-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 720px) {
  .logo { flex-direction: column; gap: 22px; }
  .cube-stage { --s: 36vw; }
  .wordmark { width: 100%; }
}
