:root {
  --bg: #f5f4f1;
  --surface: #ebe9e4;
  --ink: #161615;
  --muted: #64625d;
  --line: #d9d6cf;
  --dark: #121211;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.05; }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; color: #fff; transition: background .35s var(--ease), color .35s var(--ease); }
.top__row { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: block; }
.brand__logo { height: 30px; width: auto; transition: filter .35s; }
.top.is-solid { background: rgba(245, 244, 241, .94); color: var(--ink); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top.is-solid .brand__logo { filter: invert(1) brightness(.1); }
.nav { display: flex; gap: 34px; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; position: relative; padding: 12px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.nav__cta { border: 1px solid currentColor; padding: 9px 18px !important; border-radius: 999px; transition: background .25s, color .25s; }
.nav__cta::after { display: none; }
.nav__cta:hover { background: currentColor; }
.nav__cta:hover { color: var(--bg); }
.top:not(.is-solid) .nav__cta:hover { color: var(--ink); background: #fff; }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 26px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 15; background: var(--bg); padding: 110px var(--pad) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu[hidden] { display: none; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a { font-size: 40px; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu__foot { color: var(--muted); font-size: 15px; }
body.menu-open { overflow: hidden; }
body.menu-open .top { background: var(--bg); color: var(--ink); }
body.menu-open .brand__logo { filter: invert(1) brightness(.1); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; transition: transform .2s var(--ease), background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--light { background: #fff; color: var(--ink); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; color: #fff; overflow: hidden; background: #2a2723; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroIn 1.6s var(--ease) both; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.38) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%); }
.hero__text { position: absolute; left: 0; right: 0; bottom: clamp(36px, 7vh, 80px); margin: 0 auto; animation: textIn 1s .35s var(--ease) both; }
.hero h1 { font-size: clamp(38px, 6vw, 84px); line-height: 1; max-width: 13em; }
.hero__lead { margin-top: 20px; max-width: 34em; font-size: clamp(16px, 1.4vw, 19px); color: rgba(255,255,255,.88); }
.hero__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes textIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- work ---------- */
.work { padding: clamp(72px, 11vw, 140px) 0 clamp(56px, 8vw, 100px); }
.work__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 500 14px var(--font); color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; min-height: 44px; padding: 0 18px; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.grid { display: flex; gap: 16px; align-items: stretch; }
.grid__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
/* the last image of each column grows to the bottom line of the longest column */
.grid__col > .tile:last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.grid__col > .tile:last-child img { flex: 1 1 auto; min-height: 0; object-fit: cover; }
.tile { display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: var(--surface); cursor: zoom-in; overflow: hidden; break-inside: avoid; position: relative; }
.tile img { width: 100%; height: auto; transition: transform .6s var(--ease), opacity .5s; opacity: 0; }
.tile img.is-loaded { opacity: 1; }
.tile:hover img { transform: scale(1.025); }
.tile::after { content: ""; position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161615' stroke-width='1.6'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center/18px no-repeat; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; transform: none; }
.tile[hidden] { display: none; }
.work__hint { margin-top: 20px; color: var(--muted); font-size: 14px; }

/* ---------- services ---------- */
.services { padding: clamp(72px, 10vw, 130px) 0; border-top: 1px solid var(--line); }
.svc { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); counter-reset: s; }
.svc li { padding: 24px 24px 8px 0; counter-increment: s; }
.svc li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.svc li::before { content: "0" counter(s); display: block; color: var(--muted); font-size: 13px; margin-bottom: 36px; }
.svc p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.steps { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; background: var(--surface); padding: 28px; }
.steps p { font-size: 15px; display: flex; gap: 14px; }
.steps span { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font-size: 13px; }

/* ---------- about ---------- */
.about { padding: clamp(72px, 10vw, 130px) 0; background: var(--surface); }
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__lead { font-size: clamp(20px, 2vw, 26px); line-height: 1.35; margin: 28px 0 20px; letter-spacing: -0.01em; }
.about p:not(.about__lead) { color: var(--muted); max-width: 34em; }
.about__link { display: inline-block; margin-top: 28px; font-weight: 500; text-decoration: none; padding: 10px 0; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 100% 1px no-repeat; transition: background-size .3s var(--ease); }
.about__link::after { content: " →"; }
.about__link:hover { background-size: 0 1px; }
.about__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- about page ---------- */
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.intro { padding: calc(76px + clamp(48px, 8vw, 110px)) 0 clamp(64px, 9vw, 120px); }
.intro__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.intro h1 { font-size: clamp(38px, 5.4vw, 76px); line-height: 1.02; max-width: 11em; animation: textIn 1s .1s var(--ease) both; }
.intro__lead { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.4; margin: 32px 0 18px; max-width: 30em; letter-spacing: -0.01em; }
.intro__text p:last-child { color: var(--muted); max-width: 34em; }
.intro__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; background: var(--surface); animation: heroIn 1.4s var(--ease) both; }
.team { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.team__grid { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; }
.team__grid img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface); margin-bottom: 16px; transition: transform .5s var(--ease); }
.team__grid li:hover img { transform: translateY(-2px); }
.team__grid p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.studio { padding: clamp(64px, 9vw, 120px) 0; background: var(--surface); }
.studio__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.studio__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; }
.studio__cols p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.studio__cols a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.studio__cols a:hover { background-size: 100% 1px; color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- contact ---------- */
.contact { padding: clamp(90px, 13vw, 170px) 0; background: var(--dark); color: #f5f4f1; }
.contact__lead { margin-top: 20px; color: rgba(245,244,241,.7); max-width: 30em; }
.contact__mail { display: inline-block; margin-top: 36px; font-size: clamp(26px, 4vw, 52px); letter-spacing: -0.02em; font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); padding-bottom: 4px; word-break: break-word; }
.contact__mail:hover { background-size: 100% 1px; }
.contact__meta { display: flex; gap: 40px; margin-top: 40px; color: rgba(245,244,241,.7); flex-wrap: wrap; }
.contact__meta a { text-decoration: none; display: inline-block; padding: 10px 0; }
.contact__meta a:hover { color: #fff; }
.contact__meta p { padding: 10px 0; }
.contact__meta p:has(a) { padding: 0; }

.foot { padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot__logo { height: 20px; width: auto; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 40; background: #0d0d0c; color: #eee; display: grid; grid-template-rows: 1fr auto; animation: lbIn .25s ease both; }
.lb[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb__stage { position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; }
.lb__stage.is-zoomed { cursor: grab; }
.lb__stage.is-dragging { cursor: grabbing; }
.lb__img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; transition: opacity .25s; }
.lb__img.is-swapping { opacity: 0; }
.lb__img.is-anim { transition: transform .3s var(--ease), opacity .25s; }
.lb__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px var(--pad) 16px; font-size: 14px; }
.lb__cap { color: #bdbbb5; display: flex; gap: 18px; min-width: 0; }
.lb__cap span:first-child { color: #fff; font-variant-numeric: tabular-nums; flex: none; }
.lb__tools { display: flex; gap: 8px; }
.lb__btn, .lb__nav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(20,20,19,.6); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.lb__btn:hover, .lb__nav:hover { background: rgba(255,255,255,.14); }
.lb__btn:active, .lb__nav:active { transform: scale(.94); }
.lb__btn[aria-pressed="true"] { background: #fff; color: #111; }
.lb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lb__nav { position: absolute; top: calc(50% - 40px); }
.lb__nav--prev { left: 16px; }
.lb__nav--next { right: 16px; }
body.lb-open { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .svc { grid-template-columns: repeat(2, 1fr); }
  .svc li:nth-child(3) { padding-left: 0; border-left: 0; }
  .svc li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .team__grid { grid-template-columns: repeat(3, 1fr); }
  .studio__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .top__row { height: 64px; }
  .brand__logo { height: 24px; }
  .tile::after { opacity: 1; transform: none; width: 34px; height: 34px; background-size: 15px; }
  .svc { grid-template-columns: 1fr; }
  .svc li, .svc li + li { padding: 20px 0 16px; border-left: 0; }
  .svc li + li { border-top: 1px solid var(--line); }
  .svc li::before { margin-bottom: 12px; }
  .steps { grid-template-columns: 1fr; padding: 22px; }
  .about__grid { grid-template-columns: 1fr; }
  .intro { padding-top: calc(64px + 40px); }
  .intro__grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .team__grid h3 { font-size: 17px; }
  .studio__cols { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .lb__nav { display: none; }
  .lb__cap { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
