/*
 * Saunders Fine Art, in the client's design (Website_1.pdf, Website_1a.pdf).
 * Measured from the design at 1308px wide: a 1134px grid of four 272px columns 15px apart; the name, the page's name
 * and the search box on one line above the ☰; pictures from 171px down. White pages, Georgia; the artwork page dark,
 * its details in Open Sans. The ☰ and the menu's current section in the old site's green.
 */
:root {
    --ink: #222;
    --muted: #8f8f8f;
    --green: #9ec550;
    --paper: #fff;
    --gap: 15px;
    --row-gap: 17px;
    --width: 1134px;
    --dark-side: #555;
    --dark: #2b2a28;
    --dark-ink: #f2f2f0;
    --serif: Georgia, "Times New Roman", Times, serif;
    --sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--serif); color: var(--ink); background: var(--paper); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--green); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.page { max-width: calc(var(--width) + 2 * 24px); margin: 0 auto; padding: 0 24px 80px; }

/* -- the top: name, page name, search; the ☰ under it -- */
.top {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: center;
    padding-top: 55px;
    min-height: 83px;
    font-size: 22px;
    line-height: 28px;
}
.top .name { grid-column: 1; white-space: nowrap; }
.top .name:hover { color: var(--ink); }
.top .heading { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .search { grid-column: 3 / span 2; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.top .search label { color: var(--muted); cursor: text; }
.top .search input {
    width: calc((100% - var(--gap)) / 2);
    height: 28px;
    border: 1px solid var(--ink);
    border-radius: 0;
    padding: 2px 8px;
    font: 17px var(--serif);
    color: var(--ink);
    background: var(--paper);
    -webkit-appearance: none;
    appearance: none;
}
.top .search input:focus { outline: none; border-color: var(--green); }
.top .search input::-webkit-search-cancel-button { display: none; }

.burger { display: block; width: 31px; height: 21px; margin-top: 30px; position: relative; }
.burger span { position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); transition: background .2s; }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }
.burger:hover span, .menu-open .burger span { background: var(--green); }

/* -- under the top: the menu (when open) and the wall -- */
.body {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--gap);
    margin-top: 37px;
}
.menu { display: none; grid-column: 1; font-size: 22px; line-height: 28px; }
.menu-open .menu { display: block; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu ul.pages { margin-top: 22px; padding-top: 18px; border-top: 1px solid #ddd; width: 70%; }
.menu a.current { color: var(--green); }
.wall-area { grid-column: 1 / -1; min-width: 0; }
.menu-open .wall-area { grid-column: 2 / -1; }

.wall { display: flex; gap: var(--gap); align-items: flex-start; }
.wall:not(.laid-out) { display: block; columns: 4; column-gap: var(--gap); }
.wall:not(.laid-out) .tile { break-inside: avoid; }
.menu-open .wall:not(.laid-out) { columns: 3; }
.wall .column { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--row-gap); }
.tile { display: block; background: #f4f3f1; }
.wall:not(.laid-out) .tile { margin-bottom: var(--row-gap); }
.tile img { width: 100%; height: auto; transition: opacity .25s; }
.tile:hover img { opacity: .88; }
.none { font-size: 19px; color: var(--muted); margin: 0; }

/* -- a page of text beside the menu -- */
.text-page { grid-column: 2 / span 2; font-size: 18px; line-height: 1.55; min-width: 0; }
.text-page p { margin: 0 0 1em; }
.text-page a { color: var(--green); }
.text-page a:hover { text-decoration: underline; }

/* -- forms (enquiry, contact) -- */
.enquiry { margin: 24px 0; max-width: 460px; font-size: 16px; }
.enquiry label { display: block; margin-bottom: 12px; color: var(--muted); }
.enquiry input, .enquiry textarea {
    display: block; width: 100%; margin-top: 4px; padding: 6px 8px;
    border: 1px solid var(--ink); border-radius: 0; font: 16px var(--serif); color: var(--ink); background: var(--paper);
}
.enquiry input:focus, .enquiry textarea:focus { outline: none; border-color: var(--green); }
.enquiry .send { margin-top: 6px; padding: 7px 26px; border: 1px solid var(--ink); font-size: 17px; }
.enquiry .send:hover { border-color: var(--green); color: var(--green); }
.enquiry .success { color: var(--green); margin-bottom: 12px; }
.enquiry .error-messages ul { margin: 0 0 12px; padding-left: 18px; color: #c0392b; }

/* -- the artwork page: dark, the picture left and the details right -- */
body.dark { background: var(--dark-side); color: var(--dark-ink); }
.dark .page { background: var(--dark); min-height: 100vh; max-width: 1164px; padding: 0 14px 80px; }
.dark .top { display: block; padding-left: 1px; }
.dark .top .name { color: #fff; }
.dark .back { display: inline-block; margin: 22px 0 0 10px; font-size: 38px; line-height: 1; font-weight: 300; color: #fff; transform: scaleY(1.1); }
.dark .back:hover { color: var(--green); }
.artwork {
    display: grid;
    grid-template-columns: minmax(0, 520fr) minmax(0, 546fr);
    column-gap: 24px;
    margin-top: 22px;
    padding-right: 48px;
}
.art-picture { position: relative; padding-bottom: 50px; align-self: start; }
.art-picture .main-picture { display: block; cursor: zoom-in; }
.art-picture img { width: 100%; height: auto; }
.art-picture .zoom { position: absolute; right: 0; bottom: 8px; color: #ddd; }
.art-picture .zoom:hover { color: var(--green); }
.views { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; padding-bottom: 16px; border-bottom: 1px solid #8a8a88; }
.views .view { width: 88px; height: 65px; border: 1px solid transparent; padding: 0; opacity: .85; }
.views .view.selected { border-color: #d8d8d6; opacity: 1; }
.views .view:hover { opacity: 1; }
.views img { width: 100%; height: 100%; object-fit: cover; }
.details { font-family: var(--sans); font-size: 14px; line-height: 19px; padding-top: 12px; max-width: 480px; }
.details p { margin: 0 0 14px; }
.details a { color: var(--green); }
.details a:hover { text-decoration: underline; }
.details .status { margin-top: 16px; margin-bottom: 32px; }
.details .part { margin-bottom: 14px; }
.details .part p { margin-bottom: 2px; }
.details .part .part-heading { margin-bottom: 2px; }
.details .biography { margin-top: 22px; padding-top: 22px; position: relative; }
.details .biography::before, hr.dashed {
    content: ""; display: block; width: 250px; border: 0; border-top: 1px dashed #8a8a88; margin: 0 0 22px;
}
.details .biography::before { position: absolute; top: 0; }
.details .more { margin-top: 26px; }
.dark .enquiry { font-family: var(--sans); font-size: 14px; }
.dark .enquiry label { color: #bbb; }
.dark .enquiry input, .dark .enquiry textarea { background: transparent; color: var(--dark-ink); border-color: #8a8a88; font-family: var(--sans); font-size: 14px; }
.dark .enquiry .send { border-color: #bbb; font-family: var(--sans); font-size: 14px; }

/* -- narrower screens: three columns, the menu over two -- */
@media (max-width: 1000px) {
    .top, .body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .top .search { grid-column: 3; }
    .top .search input { width: 100%; max-width: 220px; }
    .wall:not(.laid-out) { columns: 3; }
    .menu-open .wall:not(.laid-out) { columns: 2; }
    .text-page { grid-column: 2 / -1; }
    .artwork { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-right: 0; }
}

/* -- a phone: the name and search on one line, three narrow columns, the menu above the wall (Website_1a.pdf) -- */
@media (max-width: 700px) {
    :root { --gap: 3px; --row-gap: 5px; }
    .page { padding: 0 6px 60px; }
    .top { display: flex; justify-content: space-between; gap: 10px; padding-top: 18px; min-height: 0; font-size: 21px; }
    .top .heading { display: none; }
    .top .search { gap: 10px; }
    .top .search input { width: 88px; }
    .burger { margin-top: 12px; }
    .body { display: block; margin-top: 30px; }
    .menu { margin: 0 0 24px; font-size: 20px; line-height: 27px; }
    .menu ul.pages { width: 50%; margin-top: 14px; padding-top: 12px; }
    .wall:not(.laid-out), .menu-open .wall:not(.laid-out) { columns: 3; }
    .text-page { font-size: 17px; }
    .dark .page { padding: 0 12px 60px; }
    .dark .back { margin-top: 10px; }
    .artwork { display: block; margin-top: 16px; }
    .art-picture { padding-bottom: 40px; }
    .details { max-width: none; }
}
