/* Inter Tight, hosted on this site (no Google connection — faster, GDPR-friendly). Licence: SIL Open Font License. */
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #FAF9F7;
  --ink: #141414;
  --muted: #5F5B55;
  --line: #E4E0D9;
  --gutter: 24px;
  --gap: 6px;
  --font: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; transition: color .25s ease, opacity .25s ease; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.caps { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

/* ——— Header ——— */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px var(--gutter);
  background: var(--paper);
}
.wordmark {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: 1;
}
.wordmark:hover { color: var(--ink); opacity: .7; }
.header-right { display: flex; align-items: center; gap: 24px; }
.header-right .section { color: var(--muted); }
.menu-btn {
  width: 44px; height: 44px; margin-right: -10px;
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink);
}
.menu-btn span { display: block; width: 26px; height: 2px; background: currentColor; transition: transform .3s ease, opacity .3s ease; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 15;
  background: var(--paper);
  padding: 120px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
body.menu-open .menu { opacity: 1; visibility: visible; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.menu ul a {
  font-size: clamp(26px, 3.6vw, 46px); font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; line-height: 1.1;
}
.menu ul a[aria-current="page"] { color: var(--muted); }
.menu .menu-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

/* ——— Clients: magazine spreads ——— */
.spreads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 28px;
  padding: 24px 40px 0;
  max-width: 1600px; margin: 0 auto;
}
.spread a { cursor: zoom-in; }

/* Computers: dense grid; a clicked spread grows in place (3×3 tiles) and the rest flow around it */
@media (min-width: 901px) {
  /* Each spread = 2 narrow columns; a single portrait takes 1, so no tile is ever half empty */
  .spreads {
    --sub: 8; --pad: 32px; --g: 12px;  /* --sub = narrow columns = 2 × spreads per row */
    --sub-w: calc((min(100vw, 1920px) - 2 * var(--pad) - (var(--sub) - 1) * var(--g)) / var(--sub));
    grid-template-columns: repeat(var(--sub), minmax(0, 1fr));
    grid-auto-rows: calc((2 * var(--sub-w) + var(--g)) * 2 / 3);
    grid-auto-flow: dense;
    gap: var(--g);
    padding: 16px var(--pad) 0;
    max-width: 1920px;
  }
  .spread { grid-column: span 2; }
  .spread.half { grid-column: span 1; }
  /* Fill the grid cell by positioning, not % heights (some browsers ignore % heights here) */
  .spreads .spread { position: relative; }
  .spreads .spread a { position: absolute; inset: 0; }
  .spreads .spread .pages { position: absolute; inset: 0; aspect-ratio: auto; }
  .spread.is-big a { cursor: zoom-out; }
  .spread.is-big figcaption { opacity: 1; }
}
@media (min-width: 1200px) { .spreads { --sub: 10; } }
@media (min-width: 1440px) { .spreads { --sub: 12; } }

/* Tablets & phones: a single portrait gets a portrait-shaped tile instead of a half-empty one */
@media (max-width: 900px) {
  .spread.half .pages { aspect-ratio: 3 / 4; }
}
@media (max-width: 600px) {
  .spread.half { width: 60%; justify-self: center; }
}

/* ——— Lightbox (click a spread to see it large) ——— */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: var(--paper);
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); }
.lb-close {
  width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.lb-stage {
  position: relative; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 72px;
}
.lb-pages { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lb-pages img { max-height: calc(100vh - 160px); max-width: calc((100vw - 144px) / var(--n, 1)); width: auto; height: auto; object-fit: contain; }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; background: none; border: 0; cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.lb-arrow:hover, .lb-close:hover { opacity: .6; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 22px; color: var(--muted); }
.lb-bottom a { color: var(--ink); }
.spread { margin: 0; }
.spread a { display: block; position: relative; }
.spread .pages {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
/* Photos are never cropped: each keeps its own shape, sized to the tile's height, centred */
.spread .pages .row {
  position: absolute; inset: 0;
  display: flex; justify-content: center; align-items: center;
}
.spread .pages img {
  height: 100%; width: auto; min-width: 0; max-width: 100%;
  flex: 0 1 auto;
  object-fit: contain;
}
.spread figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.35));
  opacity: 0; transition: opacity .3s ease;
}
.spread a:hover figcaption, .spread a:focus-visible figcaption { opacity: 1; }
.spread a:hover .pages img { opacity: .94; }

/* ——— Personal: loose collage ——— */
.collage {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-auto-rows: 4.6vw;
  grid-auto-flow: dense;
  gap: 10px;
  padding: 24px var(--gutter) 0;
}
.tile {
  grid-column: span var(--c); grid-row: span var(--r);
  position: relative; overflow: hidden; display: block;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.tile.inset { padding: 6% 10%; }
.tile.inset img { object-fit: contain; }
.tile .cap {
  position: absolute; left: 12px; bottom: 10px; right: 12px;
  color: #fff; font-size: 13px; text-shadow: 0 1px 8px rgba(0,0,0,.45);
  opacity: 0; transition: opacity .3s ease;
}
.tile.inset .cap { color: var(--ink); text-shadow: none; left: 10%; bottom: 0; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.tile:hover img { opacity: .92; }
.spacer { grid-column: span 2; grid-row: span 3; }

/* Touch screens: no hover, so show captions under spreads */
@media (hover: none) {
  .spread figcaption {
    position: static; opacity: 1; background: none; color: var(--muted);
    padding: 10px 0 0;
  }
}

/* ——— Client list + footer ——— */
.client-list {
  padding: 120px var(--gutter) 0;
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: baseline;
}
.client-list h2 { margin: 0; font-weight: 500; flex: 0 0 200px; }
.client-list p { margin: 0; flex: 1 1 400px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; text-transform: uppercase; line-height: 1.25; }

.site-footer {
  padding: 120px var(--gutter) 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.site-footer .label { display: block; color: var(--muted); margin-bottom: 10px; }
.site-footer .email { font-size: 15px; letter-spacing: .02em; text-transform: none; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 28px; color: var(--muted); }
.site-footer .links a { color: var(--muted); }

/* ——— About ——— */
.about-page { padding: 80px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 40px 64px; }
.about-page .lede { flex: 2 1 520px; max-width: 900px; margin: 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 400; line-height: 1.3; letter-spacing: -.01em; }
.about-page aside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 28px; }
.about-page aside p { margin: 0; font-size: 15px; line-height: 1.6; }
.about-page .label { display: block; color: var(--muted); margin-bottom: 8px; }

/* ——— Story page ——— */
.story-head { padding: 64px var(--gutter) 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.story-head .kicker { margin: 0 0 12px; color: var(--muted); }
.story-head h1 { margin: 0; font-size: clamp(32px, 5vw, 64px); font-weight: 700; letter-spacing: -.03em; text-transform: uppercase; line-height: 1; }
.credits { display: grid; grid-template-columns: auto auto; gap: 6px 24px; margin: 0; font-size: 13px; align-content: start; }
.credits dt { color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: 10px; padding-top: 3px; }
.credits dd { margin: 0; }
.sequence { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 24px; align-items: center; }
.sequence .frame { width: 100%; max-width: 960px; }
.sequence .frame img { width: auto; height: auto; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.sequence .pair { width: 100%; max-width: 960px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: center; }
.story-nav { padding: 96px var(--gutter) 0; display: flex; justify-content: space-between; gap: 16px; }

/* Fade-in */
.reveal { opacity: 0; transition: opacity .9s ease; }
.reveal.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transition: none; }
  .menu, .menu-btn span { transition: none; }
}

/* ——— Tablet ——— */
@media (max-width: 900px) {
  .spreads { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px var(--gutter) 0; gap: 28px 20px; }
}
@media (max-width: 900px) {
  .collage { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 10vw; gap: 6px; }
  .tile { grid-column: span var(--mc); grid-row: span var(--mr); }
  .spacer { display: none; }
  .header-right .section { display: none; }
}

/* ——— Phone ——— */
@media (max-width: 600px) {
  :root { --gutter: 16px; --gap: 4px; }
  .site-header { padding: 16px var(--gutter); }
  .spreads { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 40px; padding-right: 40px; }
  .lb-stage { padding: 0 8px; }
  .lb-pages img { max-height: calc(100vh - 150px); max-width: calc(100vw - 16px); }
  .lb-arrow { top: auto; bottom: -62px; transform: none; }
  .lb-prev { left: auto; right: 64px; } .lb-next { right: 8px; }
  .lb-bottom { padding-right: 140px; }
  .sequence .pair { grid-template-columns: minmax(0, 1fr); }
  .client-list, .site-footer { padding-top: 88px; }
  .menu { padding-top: 96px; }
}

/* ——— Contact page: email + Instagram, one photo ——— */
.contact-page {
  padding: 80px var(--gutter) 120px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 48px;
  max-width: 1600px; margin: 0 auto;
}
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.contact-page a { font-size: 15px; font-weight: 400; letter-spacing: .02em; }
.contact-photo { margin: 0; width: min(32vw, 460px); }
.contact-photo img { width: 100%; height: auto; }
.contact-photo figcaption { margin-top: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8A857E; }
@media (max-width: 700px) {
  .contact-page { flex-direction: column-reverse; gap: 28px; padding-top: 32px; }
  .contact-photo { width: 100%; }
}

/* ——— Ranked layout: feature tiles for the strongest images ——— */
@media (min-width: 901px) {
  .spreads .spread.feature { grid-column: span 4; grid-row: span 2; }
}
@media (max-width: 900px) {
  .spreads .spread.feature { grid-column: 1 / -1; }
}
/* small rank number, mock preview only */
.spread .rank {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20,20,20,.78); color: #fff; font-size: 11px; font-weight: 600;
}

/* ——— Equal tiles: one photo per tile, every tile the same portrait shape ——— */
@media (min-width: 901px) {
  .spreads.singles { --sub: 5; grid-auto-rows: calc(var(--sub-w) * 1.25); }
  .spreads.singles .spread.half { grid-column: span 1; }
}
@media (min-width: 1200px) { .spreads.singles { --sub: 6; } }
@media (min-width: 1440px) { .spreads.singles { --sub: 7; } }
@media (max-width: 900px) {
  .spreads.singles .spread.half .pages { aspect-ratio: 4 / 5; }
}
@media (max-width: 600px) {
  .spreads.singles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding-left: 16px; padding-right: 16px; }
  .spreads.singles .spread.half { width: auto; justify-self: stretch; }
}

/* 404 page: heading always above the link */
.contact-page.not-found { flex-direction: column; justify-content: flex-start; gap: 16px; }

/* A photo that is always shown large (like a clicked one) */
@media (min-width: 901px) {
  .spreads .spread.keep-big { grid-column: span 3; grid-row: span 3; }
  .spreads .spread.keep-big a { cursor: default; }
}
@media (max-width: 900px) {
  .spreads .spread.keep-big { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .spreads .spread.keep-big { width: 100%; }
}

/* Line photos up along the top of their tiles, so each row starts on a straight line */
.spreads .spread .pages .row { align-items: flex-start; }
.spreads .spread .pages img { object-position: 50% 0; }


/* ——— Lower rows: justified (even height, edge to edge, photos at their true shape) ——— */
.justified {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 32px 0; max-width: 1920px; margin: 0 auto; box-sizing: border-box;
}
.jrow { display: flex; gap: 12px; justify-content: center; }
.justified .spread { position: relative; flex: none; margin: 0; }
.justified .spread a { position: absolute; inset: 0; cursor: zoom-in; }
.justified .spread.is-big a { cursor: zoom-out; }
.justified .spread .pages { position: absolute; inset: 0; aspect-ratio: auto; }
.justified .spread .pages .row { gap: 0; align-items: flex-start; justify-content: flex-start; }
.justified .spread .pages img { flex: none; max-width: none; max-height: none; object-fit: contain; }

.jblock { display: flex; gap: 12px; align-items: flex-start; }
.jcol { display: flex; flex-direction: column; gap: 12px; }
.jrow-big { margin: 4px 0; }
.justified .spread .pages img { object-fit: contain; }   /* exact fit — never cropped */

/* Photographer credit: small, subtle, only on an enlarged photo */
.spread .credit {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.spread.is-big .credit { opacity: 1; }
.lb-bottom span:first-child { font-size: 10px; letter-spacing: .14em; }
.spread.show-credit .credit { opacity: 1; }
/* keep captions inside their photo (wrap rather than stick out) */
.spread .credit { right: 12px; line-height: 1.5; }
.spread a { overflow: hidden; }

/* small privacy line on About */
.about-page .privacy-note { margin-top: 24px; font-size: 11px; line-height: 1.6; color: var(--muted); max-width: 420px; }
