/* A photographer's dark room: near-black olive from the event, one signal-yellow accent. */
:root {
  --night: #0c0e0b;
  --panel: #161914;
  --line: #2a2e26;
  --mute: #8d9187;
  --paper: #eeede6;
  --signal: #f2b705;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --row: 240px;
  color-scheme: dark;
}
@media (min-width: 900px) { :root { --row: 320px; } }

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 1.0625rem/1.55 var(--text);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand .logo img { height: 2rem; width: auto; }
.handle { font-weight: 600; text-decoration: none; font-stretch: 110%; }
.handle:hover, .back:hover { color: var(--signal); }

/* Hero: one full-bleed frame from the day, seen through the viewfinder. */
.hero {
  position: relative;
  min-height: min(92svh, 64rem);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1.5rem 1.75rem 2.25rem;
  isolation: isolate;
  overflow: hidden;
}
.hero.bare { min-height: 70svh; }
.cover { position: absolute; inset: 0; z-index: -2; }
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: develop 2.2s cubic-bezier(.3, .6, .2, 1) both;
}
/* The print coming up in the tray, once, on arrival. */
@keyframes develop {
  from { filter: brightness(.1) contrast(1.8) saturate(0); transform: scale(1.06); }
  60% { filter: brightness(.8) contrast(1.15) saturate(.6); }
}
/* Scrim so the text over the photo stays legible. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--night) 0, rgb(12 14 11 / .75) 28%, transparent 60%),
    linear-gradient(to bottom, rgb(12 14 11 / .6), transparent 22%);
}
.frame {
  --c: rgb(238 237 230 / .7);
  --l: 1.75rem;
  position: absolute;
  inset: .75rem;
  pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--l) 1.5px,
    linear-gradient(var(--c) 0 0) 0 0 / 1.5px var(--l),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--l) 1.5px,
    linear-gradient(var(--c) 0 0) 100% 0 / 1.5px var(--l),
    linear-gradient(var(--c) 0 0) 0 100% / var(--l) 1.5px,
    linear-gradient(var(--c) 0 0) 0 100% / 1.5px var(--l),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--l) 1.5px,
    linear-gradient(var(--c) 0 0) 100% 100% / 1.5px var(--l);
  background-repeat: no-repeat;
}
.intro { align-self: end; max-width: 46rem; }
.title {
  margin: 0 0 .75rem -.04em;
  font: 800 clamp(3rem, 14vw, 11rem)/.86 var(--text);
  font-stretch: 125%;
  letter-spacing: -.045em;
}
.intro p { margin: 0 0 1.5rem; max-width: 36ch; font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.4; color: rgb(238 237 230 / .88); }
.intro p a { text-decoration-color: var(--signal); text-underline-offset: .2em; }
@media (min-width: 900px) {
  .hero { padding: 2.25rem 3rem 3.5rem; }
  .frame { inset: 1.25rem; --l: 2.25rem; }
}

/* Justified wall: every row is full width, every photo keeps its shape. */
.wall {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 4px;
}
.wall::after { content: ""; flex-grow: 99999999; }
.tile {
  /* ×100: flex hands out only part of the free space when grows sum below 1 */
  flex-grow: calc(var(--w) / var(--h) * 100);
  flex-basis: calc(var(--w) / var(--h) * var(--row));
  background: var(--panel);
  overflow: hidden;
}
.tile img { width: 100%; height: auto; aspect-ratio: var(--w) / var(--h); transition: filter .3s; }
@media (hover: hover) { .tile:hover img { filter: brightness(1.1); } }
.tile:focus-visible { outline-offset: -3px; position: relative; z-index: 1; }

.empty { margin: 0; padding: 3rem 1.75rem 6rem; max-width: 40ch; color: var(--mute); }
@media (min-width: 900px) { .empty { padding-inline: 3rem; } }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: end;
  padding: 4rem 1.75rem 3rem;
  color: var(--mute);
}
.foot p { margin: 0; max-width: 52ch; }
.who-shot { color: var(--paper); font: 700 clamp(1.5rem, 4vw, 2.25rem)/1.1 var(--text); font-stretch: 115%; letter-spacing: -.02em; }
.foot .who-shot { margin-bottom: .6rem; }
.who-shot a { text-decoration-color: var(--signal); text-underline-offset: .15em; text-decoration-thickness: 2px; }
.hire { color: var(--paper); font-weight: 500; text-decoration-color: var(--line); text-underline-offset: .25em; }
.hire:hover { text-decoration-color: var(--signal); }
@media (min-width: 900px) { .foot { padding-inline: 3rem; } }

/* Photo viewer: true black so the picture is the only thing lit. */
.viewer {
  background: #000;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: .85rem 1.25rem;
}
.bar .handle { justify-self: end; }
.back { text-decoration: none; font-weight: 600; padding: .25rem 0; }
.back::before { content: ""; display: inline-block; width: .5em; height: .5em; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); margin-right: .45em; vertical-align: .08em; }
.counter { color: var(--mute); font-variant-numeric: tabular-nums; }
.stage {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 0 .5rem;
}
.stage img {
  max-width: 100vw;
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.step {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 1;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.step.prev { left: 0; justify-content: flex-start; padding-left: 1.25rem; }
.step.next { right: 0; justify-content: flex-end; padding-right: 1.25rem; }
.step::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border: solid var(--paper);
  border-width: 0 0 2px 2px;
  opacity: 0;
  transition: opacity .15s;
}
.step.prev::after { transform: rotate(45deg); }
.step.next::after { transform: rotate(-135deg); }
@media (hover: hover) { .step:hover::after, .step:focus-visible::after { opacity: .9; } }
.actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  padding: .75rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
}

.btn {
  display: inline-block;
  font: 600 1rem/1 var(--text);
  padding: .9rem 1.5rem;
  border: 1.5px solid rgb(238 237 230 / .35);
  background: rgb(238 237 230 / .04);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--paper); background: rgb(238 237 230 / .1); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #14130c; }
.btn.primary:hover { background: #ffc81f; border-color: #ffc81f; }

/* Admin */
.panel { padding: 1.5rem 1rem 4rem; max-width: 72rem; margin: 0 auto; }
.panel.narrow { max-width: 22rem; padding-top: 18vh; }
.panel-head { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.panel-head h1 { margin-right: auto; }
.panel-title { font: 800 2.5rem/1 var(--text); font-stretch: 125%; letter-spacing: -.035em; margin: 0 0 1.5rem; }
.panel-head .panel-title { margin: 0; }
.panel-sub { font-weight: 600; font-size: 1.25rem; margin: 2.5rem 0 1rem; }
.login { display: grid; gap: .6rem; }
.login input {
  font: inherit;
  padding: .7rem .8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 2px;
}
.login .btn { margin-top: .5rem; }
.error { color: #ff8a66; margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.danger { color: #ff8a66; }
.drop {
  display: grid;
  gap: .35rem;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--mute);
  text-align: center;
  cursor: pointer;
}
.drop.over { border-color: var(--signal); background: rgb(242 183 5 / .06); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 2px solid var(--signal); outline-offset: 3px; }
.drop span { color: var(--mute); }
.queue progress { width: 100%; accent-color: var(--signal); }
.queue .status { margin: 1rem 0 .4rem; }
.errors { color: #ff8a66; padding-left: 1.2rem; }
.admin-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }
.admin-grid li { display: grid; gap: .3rem; font-size: .95rem; }
.admin-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--panel); }
.admin-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .cover img { animation: none; }
  html { scroll-behavior: auto; }
}

/* People: face crops as the way in to "find yourself". */
.find { padding: 3rem 1.75rem 2.5rem; }
.find h2, .here h2 { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--text); font-stretch: 125%; letter-spacing: -.035em; margin: 0 0 .5rem; }
.find p { margin: 0 0 1rem; color: var(--mute); max-width: 48ch; }
.faces {
  list-style: none;
  margin: 0;
  padding: 0 0 .5rem;
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--line) transparent;
}
.faces li { flex: none; scroll-snap-align: start; }
.faces a { display: grid; gap: .4rem; justify-items: center; text-decoration: none; color: var(--mute); font-size: .95rem; }
.faces img { width: 6rem; height: 6rem; border: 2px solid var(--line); border-radius: 50%; background: var(--panel); transition: border-color .15s; }
.faces a:hover img { border-color: var(--signal); }
.faces a:hover span { color: var(--paper); }
.here { padding: .25rem 1rem 1.5rem; }
.here h2 { font-size: 1.35rem; }
.here .faces { justify-content: safe center; }
.here { text-align: center; }
.here .faces img { width: 4.5rem; height: 4.5rem; }
@media (min-width: 900px) { .find { padding-inline: 3rem; } }

.person-head { padding: 1.25rem 1.75rem 2.5rem; }
.person-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.person-bar .brand { gap: 1.5rem; }
.who { display: flex; gap: 1.5rem; align-items: end; margin-top: 2.5rem; }
.who img { width: 8rem; height: 8rem; flex: none; border-radius: 50%; }
.who h1 { font: 800 clamp(2.25rem, 7vw, 4.5rem)/.95 var(--text); font-stretch: 125%; letter-spacing: -.04em; margin: 0 0 .6rem; }
.who p { margin: 0; color: var(--mute); max-width: 48ch; }
@media (min-width: 900px) { .person-head { padding: 2rem 3rem 3rem; } .who img { width: 10rem; height: 10rem; } }

.scan p { max-width: 60ch; }
.scan-status { color: var(--mute); min-height: 1.5em; }
.panel-note { color: var(--mute); max-width: 60ch; }
.people-grid { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; }
.people-grid label { display: grid; gap: .3rem; cursor: pointer; position: relative; }
.people-grid input { position: absolute; top: .4rem; left: .4rem; width: 1.2rem; height: 1.2rem; accent-color: var(--signal); }
.people-grid img { width: 100%; height: auto; aspect-ratio: 1; border: 3px solid transparent; }
.people-grid label:has(input:checked) img { border-color: var(--signal); }
.people-grid span { color: var(--mute); font-size: .95rem; }
.people-grid .is-hidden img { opacity: .4; }
