/* Sam Lipscomb — site styles, from the Identity (Direction B, film-title capitals).
   Display: Bragado capitals → stand-in Fraunces until the licensed webfont is added.
   Text: Meditera → stand-in Barlow Semi Condensed. */

:root {
  --stone: #EDEBE7;
  --plaster: #E2DED7;
  --ink: #1A1917;
  --muted: #5B5751;
  --night: #151412;
  --night-ink: #ECE9E3;
  --night-muted: #ABA69D;
  --green: #56654D;
  --green-ink: #FFFFFF;

  --display: "Bragado", "Fraunces", Georgia, serif;
  --text: "Meditera", "Barlow Semi Condensed", "Arial Narrow", sans-serif;

  --s-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --s-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --s-statement: clamp(1.375rem, 1.1rem + 1vw, 2.125rem);
  --s-head: clamp(2.125rem, 1.2rem + 3.6vw, 4.5rem);

  --m: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--stone); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--s-body);
  line-height: 1.5;
  letter-spacing: -0.012em;
  word-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
::selection { background: var(--green); color: var(--green-ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.display {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.01em;
  word-spacing: 0;
}

.statement { font-size: var(--s-statement); letter-spacing: -0.025em; line-height: 1.25; max-width: 32ch; text-wrap: pretty; }
.muted { color: var(--muted); }

/* ---------- Lockup: mark + name ---------- */
.mark { display: block; fill: currentColor; aspect-ratio: 15 / 12; height: auto; flex: none; }

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.01em;
  word-spacing: 0;
  text-decoration: none;
}
.lockup .mark { width: 0.92em; margin-top: -0.06em; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(32px, 4vw, 48px) var(--m) clamp(40px, 5vw, 64px);
}

.site-header .lockup { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); padding: 4px 0; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--s-small);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.site-nav a {
  display: inline-block;
  padding: 10px 0;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--green); }



main { padding: 0 var(--m) clamp(96px, 11vw, 180px); }

/* ---------- Home: intro + masonry ---------- */
.intro {
  max-width: 1080px;
  margin: clamp(0px, 1vw, 16px) auto clamp(48px, 6vw, 88px);
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.intro h1 {
  margin: 0 0 clamp(12px, 2vw, 24px);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  word-spacing: 0;
  text-wrap: balance;
}
.intro p { color: var(--muted); font-size: var(--s-body); }
.intro a { text-decoration: none; padding: 6px 0; display: inline-block; }
.intro a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.masonry { columns: 3; column-gap: var(--m); }
@media (max-width: 900px) { .masonry { columns: 2; } }
.masonry.is-rows { columns: auto; display: flex; gap: var(--m); align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; }
.masonry-item {
  display: block;
  margin-bottom: var(--m);
  break-inside: avoid;
  overflow: hidden;
  background: var(--plaster);
}
.masonry img { width: 100%; transition: opacity .6s var(--ease); }

/* ---------- Section heads (Projects / Travel) ---------- */
.page-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m);
  row-gap: 20px;
  align-items: end;
  margin: clamp(40px, 6vw, 96px) 0 clamp(48px, 6vw, 88px);
}
.page-head h1 { grid-column: 1 / span 6; margin: 0; font-size: var(--s-head); line-height: 0.95; }
.page-head p { grid-column: 8 / span 5; }
@media (max-width: 760px) { .page-head h1, .page-head p { grid-column: 1 / -1; } }

/* ---------- Project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 80px) var(--m);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.card { display: grid; gap: 12px; text-decoration: none; }
.grid { max-width: 1180px; margin: 0 auto; }
.card-media { aspect-ratio: 3 / 4; overflow: hidden; background: var(--plaster); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card-title { margin: 0; font-size: 1.1rem; line-height: 1; }
.card-intro { font-size: var(--s-small); color: var(--muted); max-width: 40ch; }

.empty { color: var(--muted); text-align: center; }

/* ---------- Project page ---------- */
.project-head {
  max-width: 640px;
  margin: 0 auto clamp(56px, 7vw, 96px);
  text-align: center;
  display: grid;
  gap: 12px;
}
.project-head h1 { margin: 0; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1; }
.project-head p { color: var(--muted); }
.project-head .project-note { font-style: italic; margin-top: -4px; }

.project-hero { max-width: 1240px; margin: 0 auto clamp(72px, 10vw, 140px); }
.project-hero img { width: 100%; }

.rows { display: flex; flex-direction: column; gap: clamp(64px, 10vw, 140px); }
.row { display: grid; gap: var(--m); margin: 0; align-items: start; }
.row.single { width: min(100%, 760px); margin: 0 auto; }
.row.single.wide { width: 100%; }
.row.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1240px; width: 100%; margin: 0 auto; }
@media (max-width: 640px) { .row.pair { grid-template-columns: minmax(0, 1fr); } }
.row img { width: 100%; background: var(--plaster); }

.project-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(96px, 12vw, 180px);
  padding-top: 24px;
  border-top: 1px solid var(--plaster);
  font-size: var(--s-small);
}
.project-nav a { text-decoration: none; padding: 10px 0; color: var(--muted); }
.project-nav a:hover { color: var(--ink); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m);
  row-gap: 48px;
  align-items: start;
  margin-top: clamp(32px, 5vw, 80px);
}
.about figure { grid-column: 1 / span 5; margin: 0; }
.about figure img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; }
.about-text { grid-column: 7 / span 6; display: grid; gap: 28px; align-content: start; }
.about h1 { margin: 0; font-size: var(--s-head); line-height: 0.95; }
.about .body { max-width: 52ch; }
.contact-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.contact-list a { text-underline-offset: 4px; }
@media (max-width: 760px) { .about figure, .about-text { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px var(--m) 32px;
  font-size: var(--s-small);
  color: var(--muted);
}
.site-footer .lockup { color: var(--ink); font-size: 1rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer ul a { text-decoration: none; padding: 8px 0; display: inline-block; }
.site-footer ul a:hover { color: var(--ink); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  main { animation: rise .8s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, 20px, 0); } to { opacity: 1; transform: none; } }

/* ---------- Documentary field (layout: "field") ---------- */
.field {
  position: relative;
  margin: 0 calc(var(--m) * -1);
  background: var(--night);
  color: var(--night-ink);
}
.field-stage {
  position: relative;
  height: calc(100vh - 140px);
  height: calc(100svh - 140px);
  min-height: 520px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.field-stage.is-dragging { cursor: grabbing; }
.is-field .site-header { display: none; }
.is-field .field-stage { height: 100vh; height: 100svh; }
.field-back {
  position: absolute;
  top: clamp(16px, 2.5vw, 28px);
  left: clamp(16px, 2.5vw, 32px);
  z-index: 300;
  padding: 8px 4px;
  color: var(--night-ink);
  font-size: var(--s-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}
.field-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.field-map {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  height: min(88%, 92vw);
  aspect-ratio: 1020 / 966;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.field-map svg { display: block; width: 100%; height: 100%; }
.field-item {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0;
  border: 0;
  background: #24221F;
  cursor: zoom-in;
  will-change: transform;
  transition: filter .3s, opacity .3s, box-shadow .3s;
}
.field-stage.is-dragging .field-item { cursor: grabbing; }
.field-item img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.field-item:hover { filter: none !important; opacity: 1 !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.field-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 200;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 2 * var(--m)));
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 14px;
  text-align: center;
  background: rgba(21, 20, 18, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.field-copy h1 { margin: 0; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1; }
.field-copy p { font-size: var(--s-body); }
.field-copy .field-hint { font-size: var(--s-small); color: var(--night-muted); }

.field-index { max-width: 1240px; margin: clamp(64px, 8vw, 120px) auto 0; }
.field-index h2 { margin: 0 0 24px; font-size: 1.1rem; text-align: center; }
.field-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.field-sheet button { display: block; width: 100%; padding: 0; border: 0; background: var(--plaster); cursor: zoom-in; aspect-ratio: 3 / 4; overflow: hidden; }
.field-sheet img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.field-sheet button:hover img { opacity: .85; }

/* ---------- Lightbox ---------- */
html.lb-open { overflow: hidden; }
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--night);
  color: var(--night-ink);
}
.lightbox::backdrop { background: var(--night); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-figure { margin: 0; min-height: 0; display: grid; place-items: center; padding: clamp(56px, 6vw, 72px) var(--m) 0; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; }
.lb-bar { display: flex; justify-content: center; align-items: center; gap: 24px; padding: 12px var(--m) 20px; }
.lb-count { font-size: var(--s-small); color: var(--night-muted); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.lightbox button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--night-ink);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}
.lightbox button:hover { color: #fff; }
.lb-close { position: absolute; top: 12px; right: var(--m); font-size: var(--s-small) !important; text-transform: uppercase; letter-spacing: 0.14em; }
.lightbox :focus-visible { outline: 2px solid var(--night-ink); outline-offset: 2px; }

@media (max-width: 440px) {
  .site-nav ul { gap: 4px 16px; letter-spacing: 0.08em; font-size: 0.8125rem; }
}

.about-other { margin-top: 32px; }
.about-more { color: var(--green); font-weight: 500; text-underline-offset: 4px; }
.nowrap { white-space: nowrap; }
