/* Crafted Tahoe
   Soft sage ground, editorial type, fluid sizing. Everything scales with
   clamp() rather than a stack of breakpoints — one rule per thing. */

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

:root {
  /* Soft sage. The photos average hue 37deg (warm amber) — sage sits
     opposite that, so walnut and cherry read richest against it. */
  --bg:    #e8eae3;
  --ink:   #1b1815;   /* warm near-black */
  --muted: #5f675c;
  --rule:  #d2d8ca;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
           Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(1.5rem, 6vw, 5.5rem);
  --row:    clamp(13rem, 26vw, 21rem);   /* gallery row height */
  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 11vw, 8rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}

a { color: inherit; }

/* ---------- Intro ---------- */

.eyebrow {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 11vw, 7rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.byline {
  margin: clamp(0.75rem, 2vw, 1.15rem) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.3;
  color: var(--muted);
}

.lede {
  /* No max-width: this sits on one line at any normal window size, and only
     wraps on a genuinely narrow phone (where nowrap would overflow). */
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.5em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease),
              color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

.button svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: 0 0 auto;
}

.button--solid { background: var(--ink); color: var(--bg); }

.button:hover        { background: var(--ink); color: var(--bg); }
.button--solid:hover { background: transparent; color: var(--ink); }

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

/* ---------- Gallery ----------
   Justified rows: flex-grow/basis track each photo's aspect ratio, so a row
   fills the width without cropping. Trailing spacers keep the last row from
   stretching. */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.4vw, 1rem);
  margin-top: clamp(4rem, 11vw, 8rem);
}

.gallery figure {
  --ar: 1;
  margin: 0;
  flex: var(--ar) 1 calc(var(--ar) * var(--row));
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: #dbdfd4;

  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.gallery figure.shown { opacity: 1; transform: none; }

.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: var(--row);
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s var(--ease);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.gallery figure:hover img { transform: scale(1.035); }

/* Transparent shield: long-press and drag hit this, not the <img>. */
.gallery figure::after { content: ""; position: absolute; inset: 0; }

.gallery .spacer {
  flex: var(--ar) 1 calc(var(--ar) * var(--row));
  height: 0;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Small screens ---------- */

@media (max-width: 46rem) {
  /* One photo per row, uncropped — nothing gets cropped on a phone. */
  .gallery { display: block; }
  .gallery figure { margin-bottom: clamp(0.5rem, 1.4vw, 1rem); }
  .gallery img { height: auto; max-height: none; }
  .gallery .spacer { display: none; }
}

@media (max-width: 26rem) {
  .actions { display: grid; }
  .button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .gallery figure { opacity: 1; transform: none; }
}
