/* Obras · the catalogue. Paper ground, navy ink, museum labels. */
:root {
  --ink: #0A0B0D; --ink-soft: #4A525E; --navy: #003362; --navy-900: #051F40;
  --accent: #0A5CFF; --paper: #FFFFFF; --paper-2: #F7F8FA; --line: #E2E5EA;
  --display: "League Spartan", "Futura", sans-serif;
  --text: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --ease: cubic-bezier(.2,.8,.2,1);
  --skew: -12deg;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.n { font-family: var(--mono); font-weight: 500; font-size: 0.94em; white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: var(--navy-900); color: #fff; transform: translateY(-160%); transition: transform 160ms var(--ease); }
.skip:focus-visible { transform: none; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px;
  font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; line-height: 1;
  color: var(--navy); border: 2px solid var(--navy); border-radius: 2px; background: transparent;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.btn::after { content: ""; width: 14px; height: 2px; background: currentColor; transform: skewX(var(--skew)); transition: transform 160ms var(--ease); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
  .btn--accent:hover { background: #0047D6; border-color: #0047D6; }
  .btn:hover::after { transform: translateX(4px) skewX(var(--skew)); }
}
.btn:active { transform: translateY(1px); }

/* bar */
.top {
  position: sticky; top: 0; z-index: 20; height: 72px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.top__mark { display: flex; align-items: center; gap: 12px; }
.top__mark img { height: 34px; width: auto; }
.top__mark .top__word { height: 17px; }
.top__nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.top__nav > a:not(.btn) { font-family: var(--display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
@media (hover: hover) and (pointer: fine) { .top__nav > a:not(.btn):hover { border-bottom-color: var(--accent); } }
.top__nav > a[aria-current="page"] { border-bottom-color: var(--accent); }

/* title page */
.title { padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 6rem); align-items: start; border-bottom: 2px solid var(--ink); }
.title h1 { grid-column: 1 / -1; margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(4.5rem, 2rem + 13vw, 15rem); line-height: 0.82; letter-spacing: -0.02em; color: var(--navy-900); }
.title__lede { margin: 0; max-width: 46ch; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); line-height: 1.5; text-wrap: pretty; }

/* an obra: label first, then the photographs */
.obra { padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter) 0; display: grid; grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); scroll-margin-top: 72px; }
.obra__label { position: sticky; top: 104px; align-self: start; }
.obra__label h2 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); line-height: 0.95; letter-spacing: -0.005em; text-wrap: balance; color: var(--navy-900); }
.obra__facts { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-soft); }
.obra__facts span:not(:last-child)::after { content: "·"; margin: 0 0.55em; color: var(--accent); }
.obra__note { margin: 12px 0 0; max-width: 32ch; }
.obra__photos { min-width: 0; }
/* a contact sheet that reads left to right, so "the third photo" means the
   same thing to everyone; portraits are cropped here and shown whole in the viewer */
.obra__rest { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ph { margin: 0; overflow: hidden; background: var(--paper-2); }
.ph a { display: block; height: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .ph a:hover img { transform: scale(1.04); } }
.ph--lead { aspect-ratio: 16 / 9; clip-path: polygon(0 0, 100% 0, 100% 100%, 3% 100%); }
.ph--lead img { object-position: 50% 45%; }
.ph--th { aspect-ratio: 3 / 2; }
.ph--th.ph--tall img { object-position: 50% 35%; }

/* clients */
.cl { margin-top: clamp(4rem, 9vw, 8rem); padding: clamp(3rem, 6vw, 5rem) var(--gutter); background: var(--navy-900); color: #fff; }
.cl h2 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); line-height: 0.95; }
.cl__lede { margin: 16px 0 0; max-width: 52ch; color: #C3CEDD; }
.cl__grid { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 3rem); }
.cl__group h3 { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid rgb(255 255 255 / 0.25); font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: #9DBBFF; }
.cl__group ul { list-style: none; margin: 0; padding: 0; }
.cl__group li { padding: 3px 0; font-weight: 500; }

/* close */
.close { padding: clamp(4rem, 9vw, 8rem) var(--gutter) 2rem; }
.close h2 { margin: 0 0 28px; max-width: 16ch; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(2.4rem, 1.4rem + 4vw, 5rem); line-height: 0.92; text-wrap: balance; color: var(--navy-900); }
.foot { margin-top: clamp(4rem, 8vw, 6rem); padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-soft); }
.foot a { min-height: 32px; display: inline-flex; align-items: center; }

/* lightbox */
.lb { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgb(3 20 43 / 0.94); color: #fff; }
.lb::backdrop { background: rgb(3 20 43 / 0.72); }
.lb[open] { display: grid; place-items: center; }
.lb__fig { margin: 0; display: grid; gap: 12px; justify-items: center; padding: 64px 72px; }
.lb__fig img { max-width: min(92vw, 1600px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; }
.lb__fig figcaption { font-family: var(--mono); font-size: 0.8rem; color: #C3CEDD; }
.lb__btn { position: fixed; width: 48px; height: 48px; display: grid; place-items: center; background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / 0.4); border-radius: 2px; font-size: 1.3rem; cursor: pointer; }
.lb__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb__next { right: 16px; top: 50%; translate: 0 -50%; }
.lb__close { right: 16px; top: 16px; }
@media (hover: hover) and (pointer: fine) { .lb__btn:hover { background: rgb(255 255 255 / 0.12); } }

@media (max-width: 420px) { .top .btn .long { display: none; } }
@media (max-width: 860px) {
  .top { height: 60px; }
  /* the whole mark stays: isotype with the name beside it */
  .top__mark { gap: 8px; }
  .top__mark img { height: 28px; }
  .top__mark .top__word { height: 13px; }
  .top__nav { gap: 12px; }
  .top__nav > a:not(.btn) { font-size: 0.72rem; letter-spacing: 0.08em; }
  .top__nav > a.top__home { display: none; }
  .top .btn { padding: 0 12px; font-size: 0.74rem; }
  .top .btn::after { display: none; }
  .title { grid-template-columns: 1fr; }
  .obra { grid-template-columns: 1fr; }
  .obra__label { position: static; }
  .obra__rest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
  .ph--lead { aspect-ratio: 4 / 3; }
  .lb__fig { padding: 64px 12px 88px; }
  .lb__prev, .lb__next { top: auto; bottom: 16px; translate: none; }
}
@media (prefers-reduced-motion: reduce) { .ph img { transition: none; } }
