:root {
  /* EQNX palette (eqnx.space) */
  --bg: #efefef;
  --ink: #2f2f2f;
  --body: #4a4a4a;
  --muted: #77777a;
  --line: #d6d2c6;
  --accent: #b5a475;
  --silver: #b5b5b5;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 2vw, 20px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.site-head { text-align: center; padding: 28px var(--gutter) 22px; }
.logo {
  display: inline-block; color: var(--ink); text-transform: uppercase;
  font-size: clamp(15px, 1.2vw + 9px, 22px); letter-spacing: .18em; line-height: 1.3;
}
.logo b { font-weight: 700; }
.logo span { font-weight: 300; color: var(--accent); }
.logo:hover { color: var(--ink); }
.site-head nav { margin-top: 18px; display: flex; justify-content: center; gap: 26px; }
.site-head nav a {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}
.site-head nav a.on { color: var(--accent); }

/* Work grid */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto;
}
.tile { position: relative; display: block; overflow: hidden; background: #e4e4e4; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.tile span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  font-size: clamp(18px, 1.8vw, 24px); font-weight: 700; letter-spacing: -.01em; color: var(--ink);
  background: rgba(239, 239, 239, .86); opacity: 0; transition: opacity .3s;
}
.tile:hover span, .tile:focus-visible span { opacity: 1; }
.tile:hover img { transform: scale(1.08); }
@media (hover: none) {
  .tile span { opacity: 1; inset: auto 0 0 0; justify-content: flex-start; text-align: left; padding: 10px 12px;
    font-size: 14px; background: linear-gradient(transparent, rgba(239,239,239,.92) 40%); }
}
/* Lone last tile in a row of three becomes a full-width banner */
.tile:last-child:nth-child(3n+1) { grid-column: 1 / -1; aspect-ratio: 3 / 1; }
@media (max-width: 760px) {
  .tile:last-child:nth-child(3n+1) { grid-column: auto; aspect-ratio: 1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile:last-child:nth-child(odd) { grid-column: span 2; aspect-ratio: 2 / 1; }
}

/* Text pages + project intros */
.intro { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(32px, 6vw, 56px); text-align: left; }
.intro > * { max-width: 680px; }
.intro h1 {
  margin: 0 0 6px; color: var(--ink);
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em;
}
.tagline { margin: 0 0 28px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.intro p { margin: 0 0 1em; }
.lede { font-size: clamp(19px, 1.9vw, 22px); line-height: 1.5; color: var(--ink); }
.disc {
  margin-top: 28px !important; padding-top: 18px; border-top: 1px solid var(--accent);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.site-link { margin-top: 14px !important; font-size: 14px; }
.site-link a { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
blockquote { margin: 30px 0 0; padding-left: 20px; border-left: 2px solid var(--accent); }
blockquote p { font-size: 18px; line-height: 1.55; color: var(--ink); font-style: italic; }
cite { font-style: normal; font-size: 14px; color: var(--muted); }

/* Project images */
.images { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: var(--gutter); }
.images img { width: 100%; background: #e4e4e4; }
.images figure { margin: 0; }
.images h2.group { margin: 40px 0 0; font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.images h2.group:first-child { margin-top: 0; }
figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
figcaption strong { color: var(--ink); margin-right: 6px; }

.pager {
  max-width: 1100px; margin: 0 auto; padding: 56px var(--gutter) 24px;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.pager a:nth-child(2) { color: var(--muted); }
@media (max-width: 560px) { .pager a:nth-child(2) { display: none; } }

/* About */
.links { list-style: none; padding: 0; margin: 36px 0 0; text-align: left; border-top: 1px solid var(--line); }
.links li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.links a { white-space: nowrap; font-weight: 700; }
@media (max-width: 560px) { .links li { flex-direction: column; gap: 2px; } }
.clients { max-width: 1100px; margin: 0 auto 48px; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
@media (max-width: 640px) { .clients { grid-template-columns: 1fr; } }
.photos { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
@media (max-width: 640px) { .photos { grid-template-columns: 1fr; } }

/* Contact */
.big { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.5; margin: 24px 0 28px !important; }
address { font-style: normal; margin-bottom: 1em; }

/* Footer */
.site-foot {
  margin-top: 72px; max-width: 1100px; margin-left: auto; margin-right: auto; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 8px 28px;
  font-size: 13px; color: var(--muted);
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }

/* Logos: full width, one per row; white behind transparent marks */
.p-logos .images { row-gap: 40px; }
.p-logos .images img { background: #fff; }

/* Fade-in (only when JS is running) */
.js .tile, .js .clients img, .js .photos img {
  opacity: 0; transform: translateY(18px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
/* Case studies: slower, softer, a slight settle from scale */
.js .images > * {
  opacity: 0; transform: translateY(28px) scale(1.015);
  transition: opacity 1.6s cubic-bezier(.25,.1,.25,1), transform 1.8s cubic-bezier(.16,.8,.24,1);
}
.js .project .intro > * {
  opacity: 0; transform: translateY(12px);
  transition: opacity 1.1s ease, transform 1.2s cubic-bezier(.16,.8,.24,1);
}
.js .in { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js .tile, .js .images > *, .js .clients img, .js .photos img, .js .project .intro > * { opacity: 1; transform: none; transition: none; }
  .tile img { transition: none; }
}
