:root { color-scheme: light; --paper: #e6e8dc; --ink: #1b3327; --muted: #4d6254; --line: #244a3833; --focus: #244f37; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:where(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 10; padding: 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px max(36px, calc((100% - 1240px) / 2)); background: #10241c; color: #e5ecdf; --focus: #b5f1d6; }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 138px; height: auto; }
.return-link { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; font-size: .8rem; }
.return-link span { transition: transform 160ms ease; }
main { max-width: 1240px; margin: auto; padding: 64px 36px 72px; }
main:focus { outline: none; }
main:focus-visible h1 { outline: 2px solid var(--focus); outline-offset: 8px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 36px; margin-bottom: 56px; }
.eyebrow { display: block; font: .65rem/1.6 monospace; letter-spacing: .15em; color: var(--muted); }
h1 { font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 400; letter-spacing: -.065em; margin: 16px 0 0; line-height: .95; }
.catalogue-count { color: var(--muted); font: .72rem/1.6 monospace; letter-spacing: .12em; }
.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 76px 84px; }
.artwork { min-width: 0; }
.artwork-image { display: block; position: relative; padding: 24px; background: #f7f6ed; border: 1px solid #52684933; box-shadow: 0 12px 24px -20px #18341d66; }
.artwork-image img { width: 100%; height: auto; }
.image-action { position: absolute; right: 24px; bottom: 24px; padding: 10px 12px; background: #10241cf2; color: #f1f1e5; font-size: .7rem; opacity: 0; transition: opacity 160ms ease; }
.artwork-image:focus-visible .image-action { opacity: 1; }
.artwork-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 24px; }
.artwork h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 500; letter-spacing: -.025em; }
.artwork-year { font-size: .78rem; color: var(--muted); }
.art-details { color: var(--muted); font-size: .83rem; line-height: 1.7; margin: 12px 0 18px; }
.artwork-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.price { font-size: 1.1rem; margin: 0; font-variant-numeric: tabular-nums; }
.sold .price { color: #71402f; }
.sold .price::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #93563e; margin-right: 10px; }
.contact-btn { display: inline-flex; gap: 24px; align-items: center; min-height: 44px; padding: 8px 14px; color: var(--paper); background: #244635; font-size: .78rem; transition: background 160ms ease; }
.contact-btn:focus-visible { background: #132f20; }
.contact-btn:active { background: #395c40; }
.gallery-footer { max-width: 1168px; margin: auto; padding: 28px 0; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; align-items: center; font-size: .7rem; color: var(--muted); }
.gallery-footer a { display: inline-flex; align-items: center; min-height: 44px; }
dialog { padding: 0; border: 1px solid #829e8b; background: #10241c; color: #edf1e7; --focus: #b5f1d6; --muted: #b1c4bc; max-width: calc(100% - 32px); max-height: calc(100% - 32px); }
dialog:not([open]) { display: none; }
dialog::backdrop { background: #06120ff0; }
body:has(dialog[open]) { overflow: hidden; }
.close-button, .viewer-controls button { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #a4cbb14d; background: transparent; color: #edf1e7; font-size: 1.4rem; }
.close-button:active, .viewer-controls button:active { background: #45644b; }
#art-viewer { width: min(1000px, calc(100% - 32px)); }
.viewer-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.viewer-header, .viewer-controls { display: flex; align-items: center; gap: 16px; padding: 12px 18px; }
.viewer-header { justify-content: space-between; border-bottom: 1px solid #a4cbb133; }
.viewer-header h2 { margin: 0; font-size: 1rem; font-weight: 500; }
.viewer-image-wrap { position: relative; min-height: 100px; flex: 1; overflow: auto; display: grid; place-items: center; background: #0b1913; }
#viewer-image { max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.viewer-status { position: absolute; left: 16px; bottom: 12px; margin: 0; padding: 8px; background: #10241ce6; color: #d3e0cc; font-size: .78rem; }
.viewer-status:empty { display: none; }
.viewer-controls { border-top: 1px solid #a4cbb133; justify-content: space-between; font-size: .78rem; }
.viewer-controls a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
#viewer-position { white-space: nowrap; color: #bacfbe; }
#contact-popup { width: min(480px, calc(100% - 32px)); padding: 44px 28px 32px; }
#contact-popup .close-button { position: absolute; right: 12px; top: 12px; }
#contact-popup .eyebrow { margin-right: 40px; }
#contact-popup h2 { font-size: 1.8rem; font-weight: 500; line-height: 1.3; margin: 24px 0; }
#contact-popup p { line-height: 1.8; color: var(--muted); }
.email-link { display: inline-flex; align-items: center; min-height: 44px; color: #c9e4b7; text-decoration: underline; text-underline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
    .return-link:hover span { transform: translateX(-4px); }
    .artwork-image:hover .image-action { opacity: 1; }
    .contact-btn:hover { background: #132f20; }
    .close-button:hover, .viewer-controls button:hover { background: #294b38; }
}
@media (hover: none) { .image-action { opacity: 1; font-size: .64rem; padding: 8px; } }
@media (max-width: 1100px) {
    .art-grid { gap: 56px 40px; }
    .gallery-footer { margin-inline: 36px; }
}
@media (max-width: 680px) {
    .gallery-header { padding: 16px 18px; gap: 16px; }
    .brand img { width: 112px; }
    .return-link { font-size: .7rem; gap: 8px; }
    main { padding: 40px 18px 48px; }
    .gallery-heading { margin-bottom: 32px; padding-bottom: 28px; }
    .art-grid { grid-template-columns: 1fr; gap: 48px; }
    .artwork-image { padding: 20px; }
    .image-action { right: 20px; bottom: 20px; }
    .artwork-heading { margin-top: 20px; }
    .gallery-footer { margin-inline: 18px; }
    .viewer-header, .viewer-controls { padding: 10px; gap: 8px; }
    .viewer-controls { font-size: .7rem; }
    #viewer-image { max-height: calc(100dvh - 180px); }
    #contact-popup { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .return-link span { transform: none !important; }
}
@media (forced-colors: active) {
    .contact-btn, .artwork-image { border: 1px solid ButtonText; }
}
