/* ============================================================
   MERCER & GRAND — design studio, NYC
   Visual language after bennettandclive.com:
   pure black/white Swiss type, media-only color, fixed studio
   watermark, difference-blend text over media
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --gutter: clamp(14px, 2.6vw, 40px);
  --font: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.loader-mark {
  color: var(--paper);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.04em;
}

/* ---------- Fixed chrome (inverts over media) ---------- */
.nav {
  position: fixed; top: 0; right: 0; z-index: 500;
  display: flex; gap: clamp(12px, 1.6vw, 26px);
  padding: clamp(12px, 1.6vw, 22px) var(--gutter);
  mix-blend-mode: difference;
}
.nav-link {
  color: #fff;
  font-weight: 800;
  font-size: clamp(12px, 1.15vw, 17px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav-link.is-active { border-color: #fff; }

.watermark {
  position: fixed; left: 0; right: 0; top: 50%; z-index: 490;
  transform: translateY(-50%);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--gutter);
  mix-blend-mode: difference;
  pointer-events: none;
}
.watermark span {
  color: #fff;
  font-weight: 800;
  font-size: clamp(11px, 1.1vw, 16px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.watermark .amp { font-size: clamp(12px, 1.2vw, 18px); }

/* ---------- Work deck ---------- */
.deck {
  position: relative;
  height: 100svh; min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.deck-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
/* optional per-project photo layer: sits over the shader, under the type.
   A veil keeps the huge white names readable on any client photo. */
.deck-photos { position: absolute; inset: 0; z-index: 1; }
.deck-photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
}
.deck-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(5, 5, 8, 0.38);
}
.deck-names { position: absolute; inset: 0; z-index: 2; }
.deck-name {
  position: absolute; top: 0; left: 0;
  color: #fff;
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}
.deck-count {
  position: absolute; left: var(--gutter); bottom: 18px; z-index: 3;
  color: #fff;
  font-weight: 700;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.08em;
  mix-blend-mode: difference;
}

/* ---------- Tagline / about ---------- */
.tagline {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(80px, 12vw, 180px) var(--gutter) clamp(90px, 13vw, 200px);
}
.tag-title {
  font-weight: 800;
  font-size: clamp(3.4rem, 10.5vw, 12rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.tw { display: block; overflow: hidden; }
.tw > i { display: block; font-style: normal; }
.tag-side {
  display: flex; flex-direction: column; gap: 28px;
  justify-content: center;
  max-width: 460px;
}
.tag-manifesto {
  font-weight: 800;
  font-size: clamp(1.15rem, 1.9vw, 1.8rem);
  line-height: 1.22;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.pill {
  align-self: flex-start;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}
.pill:hover { background: var(--ink); color: var(--paper); }

/* ---------- Services: scroll-shifting gradient letters ---------- */
.services {
  position: relative;
  padding: clamp(60px, 9vw, 140px) var(--gutter);
  overflow: hidden;
}
.svc {
  list-style: none;
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 5.4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  will-change: transform;
}
/* letters start INK-BLACK; the colour spectrum lives in the middle of the
   gradient and is slid through the letters by scroll */
.svc li {
  background-image: linear-gradient(100deg,
    #0a0a0a 0%, #0a0a0a 20%,
    #1b3df0 31%, #7a16e8 42%, #e42313 52%, #ff6a00 62%, #d8127d 71%,
    #0a0a0a 82%, #0a0a0a 100%);
  background-size: 500% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.svc--a { text-align: left; }
.svc--b { text-align: right; margin-top: clamp(28px, 4vw, 64px); }

/* ---------- Clients ---------- */
.clients { padding: clamp(70px, 10vw, 160px) var(--gutter); }
.clients-label {
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 70px);
}
.cloud {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 0.35em 0.7em;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.cl { letter-spacing: -0.03em; line-height: 1.15; }
.cl.w9 { font-weight: 900; font-size: clamp(1.9rem, 4.4vw, 4.2rem); }
.cl.w8 { font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 3.4rem); }
.cl.w7 { font-weight: 700; font-size: clamp(1.7rem, 3.9vw, 3.7rem); }
.cl.w5 { font-weight: 500; font-size: clamp(1.4rem, 3vw, 2.8rem); }

/* ---------- Footer ---------- */
.footer {
  padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(28px, 4vw, 48px);
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.clocks { display: flex; flex-direction: column; gap: 18px; }
.clock { display: flex; justify-content: space-between; align-items: baseline; max-width: 340px; }
.clock-city { font-weight: 800; font-size: clamp(1.2rem, 1.8vw, 1.7rem); }
.clock-time {
  font-weight: 700;
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  font-variant-numeric: tabular-nums;
}
.foot-label { font-size: 13px; font-weight: 500; opacity: 0.6; margin-top: 14px; }
.foot-label:first-child { margin-top: 0; }
.foot-mail {
  font-weight: 800;
  font-size: clamp(1.1rem, 1.7vw, 1.6rem);
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--ink);
}
.foot-name { font-weight: 800; font-size: clamp(1.1rem, 1.7vw, 1.6rem); }
.foot-links {
  display: flex; flex-direction: column; gap: 10px;
  justify-self: end; text-align: right;
}
.foot-links a { font-weight: 700; font-size: 15px; }
.foot-links a:hover { text-decoration: underline; }
.foot-copy { font-size: 12px; opacity: 0.55; margin-top: 18px; }

/* ---------- Mobile / tablet ---------- */
@media (max-width: 900px) {
  .tagline { grid-template-columns: 1fr; }
  .tag-side { max-width: 560px; }

  .svc { font-size: clamp(1.5rem, 6.4vw, 3rem); }

  .footer { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; text-align: left; }
}

@media (max-width: 560px) {
  .nav { gap: 14px; padding: 12px var(--gutter); }
  .deck-name { font-size: clamp(2rem, 10.5vw, 3.4rem); }
  .deck { min-height: 480px; }
  .watermark span { font-size: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
