@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./cormorant-garamond-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./cormorant-garamond-500.woff2') format('woff2');
}

:root {
    --color-text: #333333;
    --color-muted: #777777;
    --color-line: #e5e5e5;
    --font-serif: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
    --font-sans: Inter, system-ui, sans-serif;
    --gap: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--color-text);
    background: #EEEEEE;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

a:hover {
    opacity: 0.7;
}

/* Header & navigation */

.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 34px 34px 0 34px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-header a {
    text-decoration: none;
}

.site-header ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 24px;
    margin: 0;
    padding: 0;
}

.site-header [aria-current="page"] {
    /*text-decoration: underline;*/
    /*text-underline-offset: 4px;*/
    color:#aaaaaa;
}

.site-header .home img {
    width: 200px;
}

.site-header nav {
    grid-column: 1;
    grid-row: 1;
}

.site-header .home {
    grid-column: 2;
    grid-row: 1;
}

.site-header .book {
    grid-column: -2;
    grid-row: 1;
    justify-self: end;
}

/* the flyout wrapper only exists on small screens */
.menu {
    display: contents;
}

.menu-toggle {
    display: none;
}

/* Titles */

.hero,
.page-title {
    text-align: center;
    padding: 130px 34px 160px;
}

.hero h1,
.page-title h1 {
    margin: 0;
}

.hero .logo {
    width: min(810px, 100%);
    margin-inline: auto;
}

.page-title h1 {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 40px 0 0;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(0.875rem, 1.2vw, 1.25rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    /* compensate trailing letter-spacing so the word stays centred */
    margin-inline-end: -0.5em;
}

.page-title .eyebrow {
    margin-top: 28px;
    font-size: 0.75rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Images */

.strip {
    display: grid;
    grid-template-columns: 28fr 43fr 27fr;
    gap: var(--gap);
    padding-bottom: 180px;
}

.strip img,
.wide img,
.gallery img {
    width: 100%;
    object-fit: cover;
}

.strip img {
    height: 28.6vw;
}

.wide {
    padding-bottom: 160px;
    /* full width so a background colour bleeds to the edges; the padding keeps the image at 1280px */
    padding-inline: max(10px, calc((100% - 1280px) / 2));
}

.wide img {
    aspect-ratio: 3 / 2;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    padding-bottom: 160px;
    /* full width so a background colour bleeds to the edges; the padding keeps the images at 1280px */
    padding-inline: max(10px, calc((100% - 1280px) / 2));
}

.gallery img {
    aspect-ratio: 3 / 2;
}

.gallery .tall {
    grid-row: span 2;
    height: 100%;
    aspect-ratio: auto;
}

/* Copy */

.text {
    padding-bottom: 60px;
    padding-inline: max(34px, calc((100% - 612px) / 2));
    text-align: center;
    line-height: 1.7;
}

.text.bg,
.wide.bg,
.gallery.bg {
    padding-block: 120px;
    background: var(--color-line);
}

/* a coloured text followed by coloured images reads as one block: normal text-to-image gap */
.text.bg:has(+ .gallery.bg, + .wide.bg) {
    padding-bottom: 60px;
}

.text.bg + .gallery.bg,
.text.bg + .wide.bg {
    padding-top: 0;
}

/* coloured blocks fill their bottom padding, so the next block needs its own gap */
.bg + :not(.bg) {
    padding-top: 120px;
}

.text > :first-child {
    margin-top: 0;
}

.text img {
    margin: 0 auto 1.5em;
}

/* blends drawings with a light background into the page or block colour */
.multiply {
    mix-blend-mode: multiply;
}

.text p {
    margin: 0 0 1.5em;
}

.text h2 {
    margin: 100px 0 32px;
    font-family: var(--font-serif);
    font-weight: normal;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aaa;
    hyphens: auto;
}

.text h3 {
    margin: 48px 0 16px;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.text ul {
    list-style: none;
    margin: 0 0 1.5em;
    padding: 0;
}

.text li + li::before {
    content: "";
    display: block;
    width: 30px;
    height: 1px;
    margin: 0.5em auto;
    background: var(--color-line);
}

.text table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.text th,
.text td {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
    vertical-align: baseline;
}

.text th {
    text-align: left;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.text td {
    text-align: right;
}

.note {
    font-size: 1rem;
    color: var(--color-muted);
}

.links {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.links a {
    display: inline-block;
    margin: 0.5em 1em;
    background: #bbb;
    padding: 0.35em 1.5em;
    color: white;
    text-decoration: none;
    border-radius: 2em;
}

/* Footer */

.site-footer {
    padding: 60px 34px;
    /*border-top: 1px solid var(--color-line);*/
    text-align: center;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.6875rem;
    line-height: 2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #e5e5e5;
    color:#aaaaaa;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    text-decoration: none;
}

/* Flyout menu */

@media (max-width: 1024px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .site-header .home {
        grid-column: 1;
    }

    .menu-toggle {
        position: relative;
        z-index: 2;
        display: block;
        grid-column: -2;
        grid-row: 1;
        justify-self: end;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        padding: 0;
        border: 0;
        background: none;
        color: inherit;
        cursor: pointer;
    }

    .menu-toggle span,
    .menu-toggle span::before,
    .menu-toggle span::after {
        position: absolute;
        left: 11px;
        width: 22px;
        height: 1px;
        background: currentColor;
        transition: transform 0.25s, background-color 0.25s;
    }

    .menu-toggle span {
        top: 50%;
    }

    .menu-toggle span::before,
    .menu-toggle span::after {
        content: "";
        left: 0;
    }

    .menu-toggle span::before {
        transform: translateY(-7px);
    }

    .menu-toggle span::after {
        transform: translateY(7px);
    }

    .menu-toggle[aria-expanded="true"] span {
        background-color: transparent;
    }

    .menu-toggle[aria-expanded="true"] span::before {
        transform: rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span::after {
        transform: rotate(-45deg);
    }

    .menu {
        position: fixed;
        z-index: 1;
        inset: 0 0 0 auto;
        display: flex;
        flex-direction: column;
        gap: 48px;
        width: min(320px, 85vw);
        padding: 180px 34px 34px;
        overflow-y: auto;
        background: #EEEEEE;
        box-shadow: 0 0 40px rgb(0 0 0 / 0.12);
        font-size: 1rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s, visibility 0.3s;
    }

    .menu-toggle[aria-expanded="true"] + .menu {
        transform: none;
        visibility: visible;
    }

    .site-header .menu ul {
        flex-direction: column;
        gap: 24px;
    }

    .site-header .menu .book {
        /*padding-top: 32px;*/
        /*border-top: 1px solid var(--color-text);*/
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* Small screens */

@media (max-width: 767px) {
    body {
        font-size: 1.125rem;
    }

    .site-header {
        padding: 24px 20px 0 20px;
    }

    .site-header .home img {
        width: 140px;
    }

    .hero,
    .page-title {
        padding: 60px 20px 90px;
    }

    .strip {
        grid-template-columns: 1fr;
        padding-bottom: 90px;
    }

    .strip img {
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .strip img:not(:nth-child(2)) {
        display: none;
    }

    .wide,
    .gallery {
        padding-bottom: 90px;
        padding-inline: 10px;
    }

    .text {
        padding-bottom: 90px;
    }

    .text.bg,
    .wide.bg,
    .gallery.bg {
        padding-block: 70px;
    }

    .bg + :not(.bg) {
        padding-top: 70px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery .tall {
        grid-row: auto;
        aspect-ratio: 2 / 3;
    }

    .text h2 {
        margin-top: 70px;
    }
}
