/* Shoot To Change — shared styles
   Colours, type and spacing match the original prototype. Edit the
   custom properties below to adjust the palette in one place. */

:root {
  --ink: #242321;
  --red: #cf252e;
  --focus: #cb272a;
  --line: #e6e5e2;
  --wash: #f7f7f5;
  --hover: #f0eeea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 1rem/1.55 "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 5px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

h1, h2, p { margin-top: 0; }

.wrap { width: min(89%, 1440px); margin: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header and navigation ------------------------------------------------ */

header { border-bottom: 1px solid var(--line); }

.bar,
footer,
footer div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.6vw, 46px);
}

.bar { padding-block: 15px; }

.brand img { width: 108px; display: block; }

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(4px, 1.2vw, 22px);
  margin-right: -12px;
}

/* Padding gives each link a comfortable tap target without changing the look. */
nav a { padding: 10px 12px; text-decoration: none; }
nav a:hover,
nav [aria-current] { text-decoration: underline; }

/* Homepage intro ------------------------------------------------------- */

.intro,
.contact {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 7%;
  padding-block: clamp(38px, 5vw, 80px);
}

.intro h1 {
  font-size: clamp(58px, 8.4vw, 146px);
  line-height: .86;
  letter-spacing: -.075em;
  margin: 0 0 28px;
  font-weight: 750;
}
.intro h1 span { color: var(--red); }

.intro p,
.lead { font-size: clamp(18px, 1.45vw, 24px); letter-spacing: -.022em; }

.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.action {
  display: inline-block;
  border: 1px solid #282723;
  padding: 10px 19px;
  text-decoration: none;
  font-size: 15px;
}
.action:hover { background: var(--hover); }

/* Collection cards ----------------------------------------------------- */

.wash { padding: 42px 0 55px; background: var(--wash); }

h2 {
  letter-spacing: -.045em;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.1;
  margin-bottom: 26px;
}

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { text-decoration: none; }
.card img,
.resources img { width: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.card span { display: block; padding-top: 9px; font-weight: 600; font-size: 20px; }
.card:hover span { text-decoration: underline; }

/* Inner pages ---------------------------------------------------------- */

.inner { padding-block: 50px 72px; }
.inner h1 {
  font-size: clamp(40px, 6.5vw, 102px);
  line-height: 1.1;
  margin-bottom: 30px;
  letter-spacing: -.065em;
}

.back { display: inline-block; padding-block: 10px; margin-block: -10px; }

/* Gallery: justified rows.
   Each photo carries its aspect ratio (--ar = width / height) so rows fill the
   width at a shared height, photos are never cropped, and they read
   left-to-right in the same order as the HTML (and the keyboard Tab order).
   --row sets the target row height. */

.gallery {
  --row: clamp(160px, 26vw, 400px);
  --gap: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.gallery::after { content: ""; flex-grow: 999999; } /* stops the last row stretching */

.photo {
  display: block;
  flex: var(--ar, 1.5) 1 calc(var(--ar, 1.5) * var(--row));
}
.photo img { display: block; width: 100%; height: auto; }

/* Lightbox ------------------------------------------------------------- */

html:has(.lightbox[open]) { overflow: hidden; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--wash);
}
.lightbox::backdrop { background: var(--wash); }

.lightbox[open] {
  display: grid;
  grid-template:
    ". . close" auto
    "prev photo next" minmax(0, 1fr)
    / 64px minmax(0, 1fr) 64px;
  align-items: center;
}

.lightbox figure {
  grid-area: photo;
  margin: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 12px;
}

.lightbox img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.lightbox figcaption { padding-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }

.lightbox button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
}
.lightbox button:hover { background: var(--hover); }

.lightbox .close { grid-area: close; justify-self: end; margin: 8px 12px 4px; font-size: 16px; padding: 0 12px; }
.lightbox .step { font-size: 36px; line-height: 1; justify-self: center; }
.lightbox .prev { grid-area: prev; }
.lightbox .next { grid-area: next; }

/* Resources ------------------------------------------------------------ */

.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.resources h2 { font-size: clamp(24px, 2.4vw, 39px); margin: 19px 0 10px; }
.resources article,
.resources article div { display: flex; flex-direction: column; }
.resources article div { flex: 1; align-items: flex-start; }
.resources .action { margin-top: auto; }

/* Free-download signup pages ------------------------------------------- */

.signup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7%;
  align-items: start;
}
.signup-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.signup h1 { font-size: clamp(40px, 4.6vw, 76px); margin-bottom: 20px; }
.signup .lead { margin-bottom: 30px; }

.signup-form { max-width: 560px; }
.signup-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.signup-form .field { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-form input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #8a8883;
  border-radius: 0;
  font: inherit;
  color: inherit;
  background: #fff;
}
.signup-form input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.signup-form button.action {
  min-height: 46px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.signup-form button.action:hover { background: #000; }
.signup-form [aria-disabled="true"] { opacity: .7; cursor: progress; }
.form-status { margin: 10px 0 0; font-weight: 600; color: var(--focus); }
.form-status:empty { display: none; }
.signup-form .note { margin-top: 12px; font-size: 14px; color: #5c5a56; }

.signup .more { font-size: 20px; letter-spacing: -.02em; margin: 44px 0 6px; }
.more-list { margin: 0; padding: 0; list-style: none; }
.more-list a { display: inline-block; padding-block: 8px; }

.thanks { max-width: 720px; }
.thanks .action { margin-top: 12px; }

/* Long text pages (Terms of Service) ----------------------------------- */

.prose > * { max-width: 760px; }
.prose h2 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; margin: 40px 0 12px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 10px; }
.prose a { overflow-wrap: anywhere; }

/* Footer --------------------------------------------------------------- */

footer {
  font-size: 14px;
  border-top: 1px solid #ddd;
  padding-block: 14px;
}
footer div { gap: 0 clamp(4px, 1.6vw, 20px); flex-wrap: wrap; margin-right: -10px; }
footer a { padding: 10px; }

/* Tablet --------------------------------------------------------------- */

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .resources { grid-template-columns: 1fr 1fr; }
}

/* Phone ---------------------------------------------------------------- */

@media (max-width: 700px) {
  .wrap { width: 90%; }
  .bar { gap: 4px; flex-wrap: wrap; padding-block: 12px 4px; }
  .brand img { width: 72px; }
  nav { font-size: 14px; gap: 0; margin-left: -10px; margin-right: 0; }
  nav a { padding: 12px 10px; }

  .intro,
  .contact { grid-template-columns: 1fr; gap: 25px; }
  .intro { padding-block: 24px 35px; }
  .intro .portrait { grid-row: 1; max-height: 48vh; aspect-ratio: 4 / 3; object-position: 50% 35%; }
  .intro h1 { font-size: clamp(48px, 15vw, 78px); }
  .contact img { max-width: 360px; }

  .cards { gap: 12px; }
  .card span { font-size: 18px; }
  /* One photo per row, full width, whatever its orientation. */
  .gallery { --gap: 10px; }
  .photo { flex: 0 0 100%; }
  .resources { grid-template-columns: 1fr; gap: 32px; }
  .resources img { aspect-ratio: 2; }
  .signup { grid-template-columns: 1fr; gap: 24px; }
  .signup-photo { aspect-ratio: 2; }
  .signup-form button.action { flex: 1 1 100%; }
  .inner { padding-block: 32px; }

  footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  footer div { margin-left: -10px; margin-right: 0; }

  /* Lightbox: photo fills the screen, controls sit in a bar at the bottom. */
  .lightbox[open] {
    grid-template:
      ". close" auto
      "photo photo" minmax(0, 1fr)
      "prev next" auto
      / 1fr 1fr;
  }
  .lightbox figure { padding-bottom: 0; }
  .lightbox .step { justify-self: stretch; padding-block: 6px 14px; }
}

/* Very narrow phones (e.g. 320px): keep all four links on one line. */

@media (max-width: 360px) {
  nav { margin-left: -6px; }
  nav a { padding-inline: 6px; }
}
