/* site.css — the front page (/) and Work with me (/work).

   One idea holds the layout together: the page is a slab of ink, and
   every section is a paper cell laid on it with a 2px gap. The rules
   between cells are the slab showing through, so they stay true at any
   width and however the cells wrap. No shadows, no tilt, no tape.

   Legacy pages (404, the-work, design-engineering, résumé) still use
   styles.css. Nothing here touches them. */

:root {
  /* the palette, unchanged */
  --bench: #cfd1ca;
  --paper: #e4e5e0;
  --ink: #191a16;
  --ink-soft: #33352e;
  --neg: #22231e;
  --rebate: #141410;
  --muted-lo: #9ea196;
  --amber: #e0a828;
  --amber-ink: #7a580c; /* a shade under the old #8a6410 so small mono text passes contrast on paper */
  --china: #bf2f2c;

  --display: "Big Shoulders Display", Impact, sans-serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --rule: 2px; /* the gap between cells = the weight of every rule */
  --pad: clamp(1.25rem, 3.2vw, 2.5rem); /* cell padding, left and right */
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bench);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: clamp(0.5rem, 1.25vw, 1rem);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--amber-ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- the slab ---------- */

.slab {
  max-width: 80rem;
  margin: 0 auto;
  background: var(--ink);
  border: var(--rule) solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: var(--rule);
}

.cell {
  background: var(--paper);
}

/* small mono label */
.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- top bar ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rule);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bar > * {
  background: var(--paper);
  min-height: 3.25rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 1 auto;
}

.bar > .bar__grow {
  flex: 1 1 12rem;
}

.bar > .bar__mark,
.bar > .bar__go {
  background: var(--ink);
  color: var(--amber);
  font-weight: 500;
}

.bar > a:hover {
  background: var(--ink);
  color: var(--amber);
}

.bar > a.bar__mark:hover,
.bar > a.bar__go:hover {
  background: var(--amber);
  color: var(--ink);
}

@media (max-width: 40rem) {
  /* on a phone the links share the row evenly instead of trailing off */
  .bar > a {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rule);
}

.hero__lead {
  flex: 5 1 22rem;
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible; /* never crop the letters */
}

.wordmark text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 96px;
  fill: var(--ink);
}

.wordmark .wordmark__sub {
  font-size: 34px;
  fill: var(--china);
}

/* the one button: black, with a hard china-red offset */
.go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0 1.5rem;
  margin: 0 6px 6px 0; /* room for the offset */
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 6px 6px 0 var(--china);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.go:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--china);
}

.go--inline {
  display: inline-flex;
  align-self: flex-start;
  min-height: 3.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

/* ---------- photographs ---------- */

.photos {
  display: flex;
  flex-direction: column;
  gap: var(--rule);
}

.photos__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rule);
}

/* A frame. The photo fills the cell and is cropped to fit; the click
   opens the whole, uncropped file in the lightbox. */
.shot {
  position: relative;
  display: block;
  min-width: 0;
  min-height: clamp(18.75rem, 40vw, 33.75rem);
  overflow: hidden;
  background: var(--rebate);
  color: var(--paper);
  text-decoration: none;
  cursor: zoom-in;
}

/* how much of a row a frame takes; rows wrap on their own when narrow */
.shot--wide {
  flex: 8 1 26rem;
}
.shot--seven {
  flex: 7 1 24rem;
}
.shot--half {
  flex: 6 1 21rem;
}
.shot--five {
  flex: 5 1 20rem;
}
.shot--narrow {
  flex: 4 1 17.5rem;
}

.shot--hero {
  flex: 7 1 26rem;
  min-height: clamp(24rem, 62vw, 46rem);
}

.shot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.25s ease;
}

.shot:hover img,
.shot:focus-visible img {
  filter: brightness(1.08) contrast(1.04);
}

.shot:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: -3px;
}

/* the edge print: frame number and title, on a tab of rebate */
.shot__edge {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  background: var(--rebate);
  padding: 0.625rem 1rem;
  display: flex;
  gap: 0.875rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

.shot__num {
  color: var(--amber);
}

.shot:hover .shot__title,
.shot:focus-visible .shot__title {
  color: var(--amber);
}

/* a keeper's frame number and star run in china red */
.shot.is-keeper .shot__num {
  color: #ff6b5e;
}

@media (prefers-reduced-motion: no-preference) {
  .shot img {
    animation: develop 0.85s cubic-bezier(0.25, 0.6, 0.3, 1) backwards;
    animation-delay: calc(0.1s + min(var(--i, 0), 4) * 0.08s);
  }
}

@keyframes develop {
  from {
    opacity: 0;
    filter: contrast(0.4) brightness(1.35);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

/* ---------- the black band (Work with me / next walk-up) ---------- */

.band {
  background: var(--rebate);
  color: var(--amber);
  text-decoration: none;
  padding: 1.5rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.625rem 2rem;
}

.band__what {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.band--notice .band__what {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.band:hover {
  background: var(--amber);
  color: var(--rebate);
}

/* ---------- section heads ---------- */

.block {
  display: flex;
  flex-direction: column;
  gap: var(--rule);
}

.head {
  padding: clamp(1.75rem, 3.4vw, 2.5rem) var(--pad) clamp(1.25rem, 2.4vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7.4vw, 6.5rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.head p {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.375rem;
}

/* three cells that wrap to two, then one */
.trio {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));
  gap: var(--rule);
}

/* ---------- elsewhere ---------- */

.out {
  padding: 1.75rem var(--pad) 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--ink);
}

.out__num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--amber-ink);
}

.out__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.25rem, 3.4vw, 2.75rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.out__blurb {
  color: var(--ink-soft);
  max-width: 30ch;
}

.out__dest {
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: var(--rule) solid currentColor;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.out:hover {
  background: var(--rebate);
  color: var(--paper);
}

.out:hover .out__num {
  color: var(--amber);
}

.out:hover .out__blurb {
  color: #c6c8be;
}

/* ---------- footer ---------- */

.foot {
  padding: 1.25rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.625rem 2rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.foot a {
  text-underline-offset: 4px;
}

.foot a:hover {
  color: var(--amber-ink);
}

/* ---------- Work with me: header ---------- */

.work-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rule);
}

.work-head h1 {
  flex: 7 1 26rem;
  min-width: 0;
  padding: clamp(1.75rem, 3.4vw, 2.5rem) var(--pad) clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.5rem, 12vw, 11rem);
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.work-head__body {
  flex: 5 1 22rem;
  min-width: 0;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.75rem;
}

.standfirst {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 36ch;
}

/* ---------- Work with me: walk-up steps ---------- */

.step {
  padding: 1.75rem var(--pad) 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.step__n {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(5.5rem, 9vw, 8rem);
  line-height: 0.8;
  color: var(--china);
}

.step h3 {
  margin-top: 0.75rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.125rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.step p {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 32ch;
}

.step p a {
  color: var(--amber-ink);
  white-space: nowrap;
}

/* ---------- Work with me: the price ledger ---------- */

.rate {
  padding: 1.75rem var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rate__kind {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

.rate__price {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(6rem, 11vw, 9.5rem);
  line-height: 0.8;
}

.spec {
  margin-top: 0.5rem;
  line-height: 1.4;
  border-bottom: var(--rule) solid currentColor;
}

.spec div {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: var(--rule) solid currentColor;
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.25rem;
}

.rate__blurb {
  font-style: italic;
  color: var(--ink-soft);
}

.rate__go {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rate__go:hover {
  background: var(--china);
  color: var(--paper);
}

/* The Last One sits apart: the sheet turned over. To make it match
   the other two, delete rate--last from its <article> in work.html. */
.rate--last {
  background: var(--rebate);
  color: var(--paper);
}

.rate--last .rate__kind {
  color: var(--amber);
}

.rate--last .rate__blurb {
  color: #c6c8be;
}

.rate--last .rate__go {
  background: var(--amber);
  color: var(--rebate);
}

.rate--last .rate__go:hover {
  background: var(--paper);
  color: var(--rebate);
}

/* ---------- lightbox, dressed to match ---------- */

.fslightbox-container {
  background: rgba(20, 20, 16, 0.96) !important;
  font-family: var(--mono) !important;
}

.fslightbox-container .fslightboxs {
  box-shadow: 0 0 0 clamp(6px, 1.1vw, 14px) var(--paper);
}

.fslightbox-container .fslightboxsn {
  color: var(--amber);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
}

.fslightbox-container .fslightboxsl {
  background: var(--amber);
}

.fslightbox-container .fslightboxb {
  background: transparent;
}

.fslightbox-container .fslightbox-svgp {
  fill: var(--muted-lo);
}

.fslightbox-container .fslightboxb:hover .fslightbox-svgp,
.fslightbox-container .fslightbox-slide-btn-container:hover .fslightbox-svgp {
  fill: var(--amber);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .go {
    transition: none;
  }
}
