:root {
  --bg: #F6F3EC;
  --surface: #FFFFFF;
  --ink: #1C2421;
  --dim: #5B6661;
  --line: #E1DBCD;
  --accent: #1F3A33;
  --accent-soft: #E6ECE8;
  --max: 1040px;
  /* The page's sky: morning blue at the top, through sand, to a sunset
     glow at the bottom. It spans the whole page, so it changes as you
     scroll down. */
  --sky: linear-gradient(180deg, #E4EEF5 0%, #EEF2F1 22%, #F6F1E7 48%, #F7E9DB 74%, #F3DACB 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111715;
    --surface: #18201D;
    --ink: #EEF1EC;
    --dim: #A4AFA9;
    --line: #29332F;
    --accent: #BFD6CB;
    --accent-soft: #1F2B27;
    --sky: linear-gradient(180deg, #0E1622 0%, #111A1C 30%, #151816 55%, #1E1717 80%, #2A1A1A 100%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  background-color: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

header.site { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { white-space: nowrap; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .3px; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
nav.site { display: flex; gap: 22px; font-size: 15px; }
nav.site a { color: rgba(255,255,255,.88); text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
nav.site a:hover { color: #fff; }
/* The privacy page has no photo, so its header sits on the page. */
.plain header.site { position: static; border-bottom: 1px solid var(--line); }
.plain .brand, .plain nav.site a { color: var(--ink); text-shadow: none; }
.plain nav.site a { color: var(--dim); }

.hero { position: relative; height: min(88vh, 760px); min-height: 460px; overflow: hidden; color: #fff; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,30,.35) 0%, rgba(10,20,30,0) 28%, rgba(10,20,30,0) 52%, rgba(10,20,30,.62) 100%); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 1; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); line-height: 1.02; letter-spacing: -1.5px; margin: 0 0 14px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p { font-size: 20px; margin: 0; max-width: 34ch; color: rgba(255,255,255,.92); text-shadow: 0 1px 10px rgba(0,0,0,.4); }

section.block { padding: 64px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
section.block h2 { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); margin: 0 0 28px; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; }
.card h3 { margin: 0 0 10px; font-size: 21px; }
.card p { margin: 0; color: var(--dim); font-size: 16px; }
.card p + p { margin-top: 12px; }
.lede { font-size: 20px; max-width: 46ch; margin: 0; }
.contact { display: grid; gap: 10px; font-size: 18px; }
.contact span { color: var(--dim); font-size: 15px; display: block; }

/* Gallery: every photograph keeps its own shape. Each row's photos share one
   height, and their widths follow their shapes, so a row always fills the
   width with nothing cropped (a "justified" gallery). */
.gallery { display: grid; gap: 12px; }
.g-row { display: flex; gap: 12px; }
.g-row figure { margin: 0; flex: var(--ar) 1 0; aspect-ratio: var(--ar); min-width: 0; }
.g-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--line); }
.g-open img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .6s ease; -webkit-user-select: none; user-select: none; }
.g-open:hover img { transform: scale(1.02); }
.g-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* A small copyright mark in the corner of each photograph. */
.mark { position: absolute; right: 10px; bottom: 8px; font-size: 11px; letter-spacing: .3px; color: rgba(255,255,255,.82); text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none; }

/* The viewer: one photograph at a time, full size, swipe or arrow keys. */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(8, 10, 12, .96); display: flex; align-items: center; justify-content: center; }
.viewer[hidden] { display: none; }
.v-track { position: absolute; inset: 0; display: flex; will-change: transform; touch-action: pan-y; }
.v-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 64px 72px; }
.v-frame { position: relative; max-width: 100%; max-height: 100%; }
.v-frame img { display: block; max-width: 100%; max-height: calc(100vh - 128px); width: auto; height: auto; border-radius: 10px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.v-frame .mark { font-size: 12px; right: 12px; bottom: 10px; }
.viewer button { position: absolute; z-index: 2; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.viewer button:hover { background: rgba(255,255,255,.2); }
.v-close { top: 16px; right: 16px; font-size: 18px; }
.v-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.v-next { right: 16px; top: 50%; transform: translateY(-50%); }
.v-count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 14px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--dim); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.site a { color: var(--dim); }

.doc { padding: 56px 0 72px; max-width: 70ch; }
.doc h1 { font-size: 38px; line-height: 1.1; margin: 0 0 8px; }
.doc .updated { color: var(--dim); margin: 0 0 32px; font-size: 15px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .g-open img { transition: none; } }
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .hero { height: 70vh; }
  .hero-text { bottom: 36px; }
  .g-row { flex-direction: column; }
  .g-row figure { flex: none; width: 100%; }
  .v-slide { padding: 56px 12px; }
  .v-prev, .v-next { display: none; }
  nav.site { gap: 14px; font-size: 14px; }
  header.site .wrap { padding: 0 16px; }
  .wrap { padding: 0 20px; }
  section.block { padding: 48px 0; }
}
