/* Hallmark: architectural editorial; existing Lomax identity; photographic project evidence.
   Pre-emit critique: Philosophy 5, Hierarchy 4, Execution 4, Specificity 5, Restraint 5, Variety 4. */
:root {
  --gallery-ink: var(--color-ink, #302922);
  --gallery-paper: var(--color-paper, #fff);
  --gallery-soft: var(--color-glass, #eee7dd);
  --gallery-rule: var(--color-line, #ded7cf);
  --gallery-muted: var(--color-muted, #71685f);
  --gallery-accent: var(--color-accent, #79583b);
  --gallery-night: #191b1b;
  --gallery-night-muted: #d5d5d1;
  --gallery-night-rule: #666962;
  --gallery-overlay: rgb(13 16 15 / 88%);
  --gallery-radius: 14px;
}
.lomax-gallery { padding-block: 40px; color: var(--gallery-ink); }
.lomax-gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.lomax-gallery-heading > div { min-width: 0; }
.lomax-gallery-heading h2, .lomax-portfolio-story h2, .lomax-portfolio-accounts h2, .lomax-portfolio-close h2 { margin: 0; font: 600 clamp(27px, 3vw, 38px)/1.14 var(--font-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.lomax-gallery-heading p { max-width: 38rem; margin: 12px 0 0; color: var(--gallery-muted); font-size: 16px; line-height: 1.6; }
.lomax-gallery-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; }
.lomax-gallery-lead, .lomax-gallery-thumb { overflow: clip; border: 1px solid var(--gallery-rule); border-radius: var(--gallery-radius); background: var(--gallery-paper); text-decoration: none; }
.lomax-gallery-lead { position: relative; display: block; min-width: 0; }
.lomax-gallery-lead > img { width: 100%; height: 100%; min-height: 400px; object-fit: cover; }
.lomax-gallery-view { position: absolute; bottom: 18px; left: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 18px; min-height: 44px; border-radius: 999px; color: var(--gallery-paper); background: var(--gallery-ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.lomax-gallery-aside { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lomax-gallery-thumb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; min-height: 124px; }
.lomax-gallery-thumb img { width: 100%; height: 100%; min-height: 124px; object-fit: cover; }
.lomax-gallery-thumb > span { padding: 12px 12px 12px 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.lomax-gallery-thumb small { display: block; margin-top: 8px; font-size: 12px; font-weight: 400; color: var(--gallery-muted); }
.lomax-gallery-caption { margin: 14px 0 0; color: var(--gallery-muted); font-size: 13px; line-height: 1.5; }
.lomax-gallery a:focus-visible, .lomax-portfolio-story a:focus-visible, .lomax-portfolio-accounts a:focus-visible, .lomax-portfolio-close a:focus-visible { outline: 3px solid var(--gallery-accent); outline-offset: 4px; }
.lomax-gallery-lead, .lomax-gallery-thumb { transition: border-color 160ms ease, box-shadow 160ms ease; }
@media (hover:hover) { .lomax-gallery-lead:hover, .lomax-gallery-thumb:hover { border-color: var(--gallery-accent); box-shadow: 0 0 0 1px var(--gallery-accent); } }
.lomax-portfolio-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding-block: 36px; border-top: 1px solid var(--gallery-rule); }
.lomax-portfolio-story figure { margin: 0; min-width: 0; }
.lomax-portfolio-story figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--gallery-radius); }
.lomax-portfolio-story figcaption { margin-top: 10px; color: var(--gallery-muted); font-size: 12px; }
.lomax-portfolio-story p, .lomax-portfolio-accounts p, .lomax-portfolio-close p { margin: 16px 0 0; color: var(--gallery-muted); line-height: 1.65; }
.lomax-portfolio-story blockquote { margin: 20px 0; padding-left: 18px; border-left: 3px solid var(--gallery-accent); font-size: 18px; line-height: 1.55; }
.lomax-portfolio-story cite { display: block; margin-top: 12px; font-size: 13px; font-style: normal; color: var(--gallery-muted); }
.lomax-portfolio-story .button, .lomax-portfolio-close .button, .lomax-portfolio-accounts .button { margin: 0; }
.lomax-portfolio-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; padding-block: 36px; border-top: 1px solid var(--gallery-rule); }
.lomax-portfolio-accounts article { min-width: 0; }
.lomax-portfolio-accounts h2 { font-size: clamp(24px, 2.5vw, 30px); }
.lomax-portfolio-accounts a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; font-weight: 600; text-underline-offset: 5px; }
.lomax-portfolio-close { margin-top: 18px; padding: 30px; border: 1px solid var(--gallery-rule); border-radius: var(--gallery-radius); background: var(--gallery-soft); }
.lomax-portfolio-close .content-actions { padding-bottom: 0; gap: 14px; }
.lomax-portfolio-close .button { margin: 0; }
.lomax-photo-dialog { inset: 0; width: min(1180px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 20px; overflow: auto; border: 1px solid var(--gallery-night-rule); border-radius: var(--gallery-radius); color: var(--gallery-paper); background: var(--gallery-night); }
.lomax-photo-dialog::backdrop { background: var(--gallery-overlay); }
.lomax-photo-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.lomax-photo-dialog h2 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; }
.lomax-photo-dialog button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--gallery-night-rule); border-radius: 50%; color: var(--gallery-paper); background: var(--gallery-night); cursor: pointer; }
.lomax-photo-dialog button:focus-visible { outline: 3px solid var(--gallery-paper); outline-offset: 3px; }
.lomax-photo-dialog button:hover { background: var(--gallery-accent); }
.lomax-photo-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 16px; }
.lomax-photo-stage img { display: block; width: 100%; height: min(62dvh, 680px); object-fit: contain; }
.lomax-photo-caption { margin: 16px 0; color: var(--gallery-night-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.lomax-photo-dialog .lomax-photo-thumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 4px; }
.lomax-photo-dialog .lomax-photo-thumbs button { width: 76px; height: 60px; border: 2px solid transparent; border-radius: 6px; overflow: clip; }
.lomax-photo-dialog .lomax-photo-thumbs button[aria-current="true"] { border-color: var(--gallery-paper); }
.lomax-photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .lomax-gallery { padding-block: 30px; }
  .lomax-gallery-heading { align-items: start; flex-direction: column; gap: 16px; }
  .lomax-gallery-grid, .lomax-portfolio-story, .lomax-portfolio-accounts { grid-template-columns: minmax(0, 1fr); }
  .lomax-gallery-lead > img { min-height: 0; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .lomax-gallery-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; gap: 10px; }
  .lomax-gallery-thumb { display: block; min-height: 0; }
  .lomax-gallery-thumb img { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .lomax-gallery-thumb > span { display: block; padding: 10px 8px; font-size: 12px; }
  .lomax-gallery-thumb small { display: none; }
  .lomax-portfolio-story, .lomax-portfolio-accounts { gap: 24px; padding-block: 28px; }
  .lomax-portfolio-close { padding: 22px; }
  .lomax-photo-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 14px; }
  .lomax-photo-stage { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .lomax-photo-stage img { grid-column: 1 / -1; grid-row: 1; height: 52dvh; }
  .lomax-photo-stage [data-photo-previous] { grid-column: 1; grid-row: 2; }
  .lomax-photo-stage [data-photo-next] { grid-column: 3; grid-row: 2; }
  .lomax-photo-caption { margin-top: 10px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .lomax-gallery-lead, .lomax-gallery-thumb { transition: none; }
}
