:root {
  color-scheme: light;
  --paper: #f6f6f3;
  --ink: #272a23;
  --muted: #6e7265;
  --serif: 'Baskerville', 'Times New Roman', 'Apple SD Gothic Neo', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { padding: 0; border: 0; color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
button, a { outline-offset: 6px; }
:focus-visible { outline: 2px solid #627157; }
#main:focus { outline: none; }
[hidden] { display: none !important; }
svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); font-size: 13px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header { position: absolute; top: 0; left: 50%; z-index: 5; display: flex; align-items: center; justify-content: space-between; width: min(100%, 1122px); padding: 43px 58px 0; transform: translateX(-50%); }
.wordmark { display: block; font-family: var(--serif); font-size: 35px; font-weight: 400; line-height: 1; letter-spacing: -1.2px; }
.navigation { display: flex; align-items: center; gap: 25px; }
.navigation a { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; line-height: 1.4; color: #64695d; transition: color 180ms ease; }
.navigation a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

.collage-gallery { position: relative; width: 100%; overflow: clip; }
.collage { position: relative; width: min(100%, 1122px); aspect-ratio: 1122 / 1402; margin: 0 auto; isolation: isolate; }
.collage-piece { position: absolute; top: var(--y); left: var(--x); z-index: 1; width: var(--w); aspect-ratio: var(--ratio); background: transparent; line-height: 0; }
.collage-piece .photo { width: 100%; height: 100%; }
.collage-piece:focus-visible { z-index: 4; }
.photo-composition { position: relative; display: block; width: 100%; height: 100%; aspect-ratio: var(--photo-ratio); }
.photo-composition .photo { z-index: 2; }
.photo-extension { position: absolute; top: 0; left: 0; z-index: 1; width: 100%; height: 100%; max-width: none; object-fit: fill; pointer-events: none; user-select: none; }
.photo-composite { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; pointer-events: none; user-select: none; -webkit-mask-image: var(--photo-mask); mask-image: var(--photo-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; mask-mode: alpha; }

.photo { position: relative; display: block; aspect-ratio: var(--photo-ratio, .66); overflow: hidden; background: #e5e5dd; }
.photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; user-select: none; }
.photo .photo-crop { object-fit: fill; }

.noscript-note { margin: 30px 24px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.text-link { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; font-size: 11px; line-height: 1.4; }
.text-link svg { width: 12px; height: 12px; transition: transform 180ms ease; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.text-link:hover svg { transform: translate(2px, -2px); }

.photo-dialog { position: fixed; inset: 0; width: min(920px, calc(100vw - 64px)); max-width: none; max-height: calc(100svh - 48px); margin: auto; padding: 0; border: 0; background: var(--paper); color: var(--ink); overflow: auto; }
.photo-dialog::backdrop { background: rgb(246 246 243 / 94%); backdrop-filter: blur(10px); }
.photo-dialog[open] { animation: dialog-in 220ms ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dialog-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); align-items: center; gap: 55px; padding: 42px; }
.close-button { position: absolute; top: 5px; right: 5px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; background: var(--paper); }
.close-button svg { width: 20px; height: 20px; }
.close-button:focus-visible { outline-offset: -5px; }
.dialog-image { min-width: 0; }
.dialog-image .photo { width: min(100%, calc((100svh - 140px) * var(--photo-ratio, .66))); height: auto; margin: 0 auto; }
.dialog-brand { margin-bottom: 44px; font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -1px; }
.photo-category { margin-bottom: 12px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.dialog-copy h2 { font-size: 24px; font-weight: 400; line-height: 1.5; letter-spacing: -.7px; word-break: keep-all; }
#photo-description { max-width: 260px; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.9; word-break: keep-all; }
.dialog-copy > .text-link { margin-top: 23px; }
.photo-navigation { display: flex; align-items: center; justify-content: space-between; max-width: 190px; margin-top: 38px; }
.photo-navigation button { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; }
.photo-navigation p { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.photo-navigation svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .site-header { padding: 27px 38px 0; }
  .wordmark { font-size: 30px; }
  .navigation { gap: 20px; }
  .photo-dialog { width: calc(100vw - 32px); }
  .dialog-shell { gap: 28px; padding: 38px 28px; }
  .dialog-brand { margin-bottom: 28px; }
  .dialog-copy h2 { font-size: 21px; }
}

@media (max-width: 540px) {
  .site-header { padding: 25px 25px 0; }
  .wordmark { font-size: 33px; }
  .navigation { gap: 22px; }
  .navigation a { font-size: 10px; }
  .collage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; column-gap: 6px; row-gap: 25px; width: 100%; aspect-ratio: auto; padding: 112px 24px 48px; }
  .collage-piece { position: relative; top: auto; left: auto; width: 100%; min-width: 0; aspect-ratio: var(--ratio); }
  .piece-vine { grid-column: 1 / 5; grid-row: 1; margin-top: 0; }
  .piece-portrait { grid-column: 5 / 13; grid-row: 1; margin-top: 30px; }
  .piece-bouquet { grid-column: 2 / 8; grid-row: 2; }
  .piece-daisies { grid-column: 10 / 13; grid-row: 2; margin-top: 35px; }
  .piece-roses { grid-column: 1 / 5; grid-row: 3; margin-top: 20px; }
  .piece-interior { grid-column: 6 / 13; grid-row: 3; }
  .piece-closeup { grid-column: 1 / 8; grid-row: 4; }
  .piece-shadow { grid-column: 9 / 13; grid-row: 4; margin-top: 42px; }
  .piece-poppy { grid-column: 2 / 7; grid-row: 5; }
  .piece-moment { grid-column: 7 / 13; grid-row: 5; margin-top: 60px; }
  .photo-dialog { width: calc(100vw - 24px); max-height: calc(100svh - 28px); }
  .dialog-shell { grid-template-columns: 1fr; gap: 27px; padding: 47px 25px 23px; }
  .dialog-image .photo { width: min(82%, 300px); }
  .dialog-brand { display: none; }
  .photo-category { margin-bottom: 8px; }
  .dialog-copy h2 { font-size: 23px; }
  #photo-description { max-width: none; margin-top: 11px; font-size: 11px; }
  .dialog-copy > .text-link { margin-top: 13px; }
  .photo-navigation { max-width: none; margin-top: 14px; }
}

@media (max-height: 600px) and (min-width: 541px) {
  .photo-dialog { max-height: calc(100svh - 24px); }
  .dialog-shell { padding: 37px 32px; }
  .dialog-image .photo { width: min(100%, calc((100svh - 100px) * var(--photo-ratio, .66))); }
  .dialog-brand { margin-bottom: 22px; }
  .photo-navigation { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
