/* Guy Waxman, conference & corporate event photography.
   White, black, one grey, hairlines. The only colour on the page comes from the photographs. */

@font-face { font-family: "Bodoni Display"; src: url("../fonts/bodoni-moda-display.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bodoni Text"; src: url("../fonts/bodoni-moda-text.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Hebrew"; src: url("../fonts/plex-hebrew-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Plex Hebrew"; src: url("../fonts/plex-hebrew-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #fff;
  --ink: #000;
  --graphite: #5e5e5e;
  --hair: #e3e3e3;
  --viewer: #121212;
  --f-display: "Bodoni Display", "Didot", "Bodoni 72", Georgia, serif;
  --f-serif: "Bodoni Text", "Didot", Georgia, serif;
  --f-body: "Plex Hebrew", "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 3.4vw, 48px);
  --gap: 4px;
  --row: 235px;
}
@media (max-width: 1100px) { :root { --row: 190px; } }
@media (max-width: 700px) { :root { --row: 118px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 18px/1.65 var(--f-body); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  height: 88px; padding: 0 var(--gutter);
}
.top .brand { display: block; color: var(--ink); line-height: 0; }
.top .brand img, .top .brand svg { height: 21px; width: auto; }
.link-line {
  font: 400 15px/1 var(--f-body); color: var(--ink); text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid currentColor; background: none; border-top: 0; border-inline: 0; cursor: pointer;
}
.top { left: 50%; }   /* desktop: the header lives on the white half, so nothing sits on the photograph */

/* ---------- Hero: white half with the title, photograph edge to edge ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(100svh, 1000px); }
.hero__text { display: flex; flex-direction: column; justify-content: flex-end; padding: 140px var(--gutter) clamp(56px, 9vh, 110px) clamp(32px, 5vw, 88px); }
.hero__title {
  margin: 0; font: 400 clamp(40px, 4.9vw, 80px)/1.02 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
  text-align: right; font-kerning: normal;
}
.hero__title span { display: block; }
.hero__sub { margin: clamp(28px, 4vh, 44px) 0 0; max-width: 31ch; font-size: clamp(17px, 1.35vw, 20px); color: var(--graphite); }
.hero__img { position: relative; background: var(--c, #222); overflow: hidden; }
.hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 899px) {
  .top { height: 64px; }
  .top .brand img, .top .brand svg { height: 15px; }
  .top { left: 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 64px; }
  .hero__img { order: -1; aspect-ratio: 3 / 2; }
  .hero__text { padding: 30px var(--gutter) 40px; }
  .hero__title { font-size: clamp(28px, 8.6vw, 48px); }
}

/* ---------- Gallery: justified rows that keep the order (flex-grow = aspect ratio) ---------- */
.gallery { padding: var(--gap); }
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.grid::after { content: ""; flex-grow: 1e6; }
.ph {
  position: relative; display: block; overflow: hidden; background: var(--c, #ddd);
  flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--row));
  cursor: zoom-in;
}
.ph::before { content: ""; display: block; padding-bottom: calc(100% / var(--r)); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph--breath { flex-basis: 100%; }
@media (max-width: 700px) { .ph--breath { margin-inline: calc(var(--gap) * -1); flex-basis: calc(100% + var(--gap) * 2); } }

/* ---------- Sections after the gallery ---------- */
.sec { padding: clamp(80px, 12vw, 160px) var(--gutter) 0; }
.sec__head { display: flex; align-items: baseline; gap: 18px 28px; flex-wrap: wrap; margin: 0 0 clamp(28px, 4vw, 48px); }
.sec__title { margin: 0; font: 400 clamp(40px, 5vw, 76px)/1 var(--f-display); letter-spacing: .01em; }
.sec__note { margin: 0; color: var(--graphite); font-size: 17px; }

.portraits { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); margin-inline: calc(var(--gutter) * -1 + var(--gap)); }
.portraits .ph { flex: none; }
@media (max-width: 900px) { .portraits { grid-template-columns: repeat(3, 1fr); } }

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: end; max-width: 1240px; }
.about__img { background: #e9e9e9; aspect-ratio: 4 / 5; overflow: hidden; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__body p { margin: 0 0 1em; max-width: 36ch; font-size: clamp(18px, 1.5vw, 21px); }
.about__body p:first-of-type { color: var(--ink); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about__img { max-width: 420px; } }

.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 0 30px;
  font: 400 17px/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  transition: background-color .18s ease, color .18s ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #333; border-color: #333; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn bdi { font-family: var(--f-body); letter-spacing: .01em; }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px var(--gutter) 32px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--graphite); }
.foot svg, .foot img { height: 12px; width: auto; color: var(--ink); }

/* ---------- Always-available contact: floating on desktop, bar on mobile ---------- */
.float {
  position: fixed; z-index: 20; inset-inline-end: 24px; bottom: 24px;
  display: flex; gap: 0; background: var(--paper); border: 1px solid var(--ink);
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .25s ease, translate .25s ease;
}
.float.is-on { opacity: 1; translate: 0 0; pointer-events: auto; }
.float a, .float button {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px;
  font: 400 15px/1 var(--f-body); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.float > * + * { border-inline-start: 1px solid var(--ink); }
.float a:hover, .float button:hover { background: var(--ink); color: var(--paper); }
.float svg { width: 18px; height: 18px; }
@media (max-width: 899px) {
  .float { inset: auto 0 0 0; border: 0; border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .float > * { flex: 1; justify-content: center; height: 56px; }
  body { padding-bottom: 0; }
  .foot { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .float { transition: none; } }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  translate: -50% 12px; margin: 0; padding: 14px 22px; background: var(--ink); color: var(--paper);
  font: 400 16px/1.3 var(--f-body); opacity: 0; pointer-events: none; transition: opacity .2s ease, translate .2s ease;
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Viewer ---------- */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--viewer); color: #fff; overflow: hidden; }
.viewer::backdrop { background: var(--viewer); }
.viewer__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 72px; touch-action: pan-y; }
.viewer__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer button { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; opacity: .75; }
.viewer button:hover, .viewer button:focus-visible { opacity: 1; }
.viewer button:focus-visible { outline-color: #fff; }
.viewer svg { width: 28px; height: 28px; }
.viewer__close { top: 8px; inset-inline-end: 8px; }
.viewer__prev { top: 50%; translate: 0 -50%; inset-inline-start: 8px; }
.viewer__next { top: 50%; translate: 0 -50%; inset-inline-end: 8px; }
.viewer__count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; font: 400 13px/1 var(--f-body); color: #9a9a9a; }
@media (max-width: 700px) {
  .viewer__stage { padding: 56px 0; }
  .viewer__prev, .viewer__next { display: none !important; }
}
