/*
Theme Name: Waldorf Creative
Theme URI: https://waldorfcreative.com/
Author: Waldorf Creative
Description: An editorial portfolio for commercial photography and fine art prints.
Version: 0.5.1
Requires at least: 6.9
Requires PHP: 8.3
Text Domain: waldorf-creative
*/

:root {
    color-scheme: light;
    --ink: #242321;
    --muted: #66645f;
    --line: #e5e2dc;
    --paper: #fff;
    --gutter: clamp(1.25rem, 4vw, 4rem);
    --wide: 1440px;
    --reading: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
::selection { background: #e7e1d6; color: var(--ink); }
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute !important;
    white-space: nowrap;
}
.screen-reader-text:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    padding: .75rem 1rem;
    background: var(--paper);
    z-index: 1000;
}
.skip-link { position: absolute; left: -9999px; top: 1rem; z-index: 1000; background: var(--paper); padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }

.site-header, .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    padding: 1.35rem var(--gutter);
}
.site-header { align-items: flex-start; border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-title {
    display: block;
    flex: none;
    width: clamp(13rem, 20vw, 26rem);
    line-height: 0;
    text-decoration: none;
}
.site-logo { display: block; width: 100%; height: auto; }
.site-nav { padding-top: clamp(.25rem, .8vw, .85rem); }
.site-nav > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem clamp(1rem, 2.2vw, 2rem);
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-nav li { position: relative; list-style: none; }
.site-nav a {
    display: inline-block;
    padding: .3rem 0;
    color: var(--ink);
    font-size: .82rem;
    letter-spacing: .075em;
    text-decoration: none;
    text-transform: uppercase;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a { text-decoration: underline; text-underline-offset: .35em; }
.site-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -.9rem;
    z-index: 20;
    min-width: 15rem;
    margin: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 .7rem 1.8rem rgb(0 0 0 / .06);
}
.site-nav .sub-menu a { width: 100%; padding-block: .45rem; }
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: block; }

main { min-height: 55vh; }
.content {
    width: min(calc(100% - 2 * var(--gutter)), 1120px);
    margin: clamp(3rem, 7vw, 6rem) auto clamp(5rem, 9vw, 9rem);
}
h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.14;
}
.content h1 { max-width: var(--reading); margin: 0 0 clamp(.8rem, 2vw, 1.25rem); font-size: clamp(2.6rem, 5vw, 5rem); }
.entry-content h2 { font-size: clamp(2rem, 3.4vw, 3.35rem); }
.entry-content h3 { font-size: clamp(1.5rem, 2.5vw, 2.35rem); }
.entry-content > :where(p, ul, ol, blockquote) { max-width: var(--reading); }
.entry-content > :where(p, ul, ol) { margin-block: 1.2rem; }
.entry-content p { overflow-wrap: break-word; }
.entry-content :where(.wp-block-image, .wp-block-gallery, .wp-block-columns) { margin-block: clamp(2rem, 5vw, 4.5rem); }
.entry-content .wp-block-image img { display: block; }
.entry-content .wp-block-image figcaption,
.entry-content .wp-block-gallery > figcaption { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.entry-content .wp-block-gallery { gap: clamp(.75rem, 1.8vw, 1.5rem); }
.entry-content .wp-block-gallery img[role="button"] { cursor: zoom-in; }
.entry-content .wp-block-gallery img[role="button"]:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.entry-content .wp-block-columns { gap: clamp(1.5rem, 4vw, 4rem); }
.entry-content .wp-block-column { min-width: 0; }
.entry-content .wp-block-column > .wp-block-image { margin: 0 0 clamp(.75rem, 1.4vw, 1.25rem); }
.entry-content .wp-block-column > h3 { margin: 0 0 clamp(.65rem, 1vw, 1rem); }
.entry-content .wp-block-column > p { margin: 0; line-height: 1.5; }
/* The About portrait and introduction form a single composition. */
body.page-id-36 .entry-content > .wp-block-columns:first-child > .wp-block-column:first-child > .wp-block-image {
    position: relative;
    margin: 0;
}
body.page-id-36 .entry-content > .wp-block-columns:first-child .wp-block-image figcaption {
    position: absolute;
    right: clamp(.75rem, 2vw, 1.5rem);
    bottom: clamp(.75rem, 2vw, 1.5rem);
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    font-weight: 400;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgb(0 0 0 / .65);
}
body.page-id-36 .entry-content > .wp-block-columns:first-child > .wp-block-column:last-child > p {
    margin: 0 0 1rem;
    line-height: 1.65;
}
body.page-id-36 .entry-content > .wp-block-columns:first-child > .wp-block-column:last-child > p:last-child { margin-bottom: 0; }
.entry-content .wp-block-cover { min-height: 28rem; }
.entry-content .wp-block-cover__inner-container { width: min(100%, var(--wide)); }
.entry-content .wp-block-cover :where(h1, h2, h3) { max-width: 900px; margin-block: 0 .75rem; font-size: clamp(2.7rem, 6vw, 6rem); line-height: 1.07; }
.entry-content .wp-block-cover p { max-width: 760px; }
.entry-content .wp-block-buttons { gap: .8rem; margin-block: 1.5rem; }
.entry-content .wp-block-button__link {
    border-radius: 0;
    padding: .8rem 1.4rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .09em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}
.entry-content .wp-block-button__link:not(.has-background) { background: var(--ink); }
.entry-content .wp-block-button__link:not(.has-text-color) { color: #fff; }
.entry-content .wp-block-button__link:hover { opacity: .86; }
.entry-content .is-style-outline .wp-block-button__link:not(.has-background) { background: transparent; }
.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) { color: var(--ink); }
.entry-content .wp-block-separator { border-color: var(--line); opacity: 1; }
.entry-meta { color: var(--muted); }

body.wc-gallery-viewer-open { overflow: hidden; }
.wc-gallery-viewer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #111;
    color: #fff;
    overscroll-behavior: contain;
}
.wc-gallery-viewer::backdrop { background: #111; }
.wc-gallery-viewer__shell {
    display: grid;
    grid-template-columns: clamp(2.75rem, 4vw, 4rem) minmax(0, 1fr) clamp(2.75rem, 4vw, 4rem);
    grid-template-rows: 3.5rem minmax(0, 1fr) 2.5rem;
    gap: 0 clamp(.25rem, 1vw, 1rem);
    width: 100%;
    height: 100%;
    padding: clamp(.5rem, 1.5vw, 1.25rem);
}
.wc-gallery-viewer button {
    appearance: none;
    width: 100%;
    height: 3rem;
    border: 1px solid rgb(255 255 255 / .45);
    border-radius: 0;
    background: rgb(255 255 255 / .08);
    color: #fff;
    font: 1.75rem/1 Georgia, "Times New Roman", serif;
    cursor: pointer;
}
.wc-gallery-viewer button:hover { background: rgb(255 255 255 / .2); }
.wc-gallery-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wc-gallery-viewer button[hidden] { display: none; }
.wc-gallery-viewer__close { grid-column: 3; grid-row: 1; }
.wc-gallery-viewer__previous { grid-column: 1; grid-row: 2; align-self: center; }
.wc-gallery-viewer__next { grid-column: 3; grid-row: 2; align-self: center; }
.wc-gallery-viewer__figure {
    display: grid;
    grid-column: 2;
    grid-row: 2;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
}
.wc-gallery-viewer__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}
.wc-gallery-viewer__caption {
    max-width: min(100%, 55rem);
    padding-top: .7rem;
    color: rgb(255 255 255 / .85);
    font-size: .85rem;
    line-height: 1.4;
    text-align: center;
}
.wc-gallery-viewer__caption[hidden] { display: none; }
.wc-gallery-viewer__counter {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    margin: 0;
    color: rgb(255 255 255 / .75);
    font-size: .8rem;
    letter-spacing: .08em;
    line-height: 1.3;
    text-align: center;
}

.front-page-content > :not(.alignfull) {
    width: min(calc(100% - 2 * var(--gutter)), var(--wide));
    margin-inline: auto;
}
.front-page-content > :is(p, ul, ol, h2, h3):not(.alignfull) {
    max-width: var(--reading);
    margin-inline: max(var(--gutter), calc((100% - var(--wide)) / 2)) auto;
}
.front-page-content > .wp-block-cover:first-child { min-height: clamp(35rem, 78svh, 60rem); }
.front-page-content > .wp-block-cover.alignfull:first-child { margin-top: 0; }
.front-page-content > :is(.wp-block-cover, .wp-block-gallery, .wp-block-image, .wp-block-columns, .wp-block-group, .wp-block-media-text):not(:first-child) {
    margin-block-start: clamp(3rem, 7vw, 7rem);
}
.front-page-content > :last-child { margin-block-end: clamp(5rem, 9vw, 9rem); }

/* The opening image stays visible when scripts are unavailable. */
.front-page-content > .wc-home-hero.alignfull {
    width: 100%;
    max-width: none;
    margin: clamp(2rem, 3.5vw, 3.5rem) 0 clamp(2rem, 5vw, 4.5rem);
}
.wc-home-hero {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #171715;
}
.wc-home-hero__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.wc-home-hero__image.is-current { opacity: 1; }
.wc-home-hero__toggle {
    position: absolute;
    right: clamp(1rem, 3vw, 2.5rem);
    bottom: clamp(1rem, 3vw, 2.5rem);
    z-index: 1;
    border: 1px solid rgb(255 255 255 / .75);
    border-radius: 0;
    padding: .55rem .8rem;
    background: rgb(0 0 0 / .65);
    color: #fff;
    font: 600 .72rem/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: .09em;
    text-transform: uppercase;
    cursor: pointer;
}
.wc-home-hero__toggle:hover { background: rgb(0 0 0 / .85); }
.wc-home-hero__toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wc-home-hero__toggle[hidden] { display: none; }

/* Keep the store readable without changing WooCommerce checkout behavior. */
body.woocommerce .content,
body.woocommerce-page .content { width: min(calc(100% - 2 * var(--gutter)), 1200px); }
.woocommerce :where(.button, button.button, input.button) { border-radius: 0; }

@media (min-width: 1024px) {
    body.page-id-36 .entry-content > .wp-block-columns:first-child > .wp-block-column:last-child {
        display: flex;
        flex-direction: column;
        align-self: stretch;
        justify-content: flex-end;
    }
}

@media (max-width: 800px) {
    .site-header, .site-footer { align-items: flex-start; flex-direction: column; }
    .site-header { gap: .75rem; }
    .site-nav { width: 100%; padding-top: 0; }
    .site-nav > ul { justify-content: flex-start; gap: .35rem 1.1rem; }
    .site-nav .sub-menu {
        display: block;
        position: static;
        min-width: 0;
        margin: .1rem 0 .45rem;
        padding: 0 0 0 .8rem;
        border: 0;
        border-left: 1px solid var(--line);
        box-shadow: none;
    }
    .site-nav .sub-menu a { padding-block: .25rem; font-size: .74rem; }
    .entry-content .wp-block-cover { min-height: 24rem; }
    .front-page-content > .wp-block-cover:first-child { min-height: 34rem; }
}
@media (max-width: 480px) {
    .site-header { padding-block: 1rem; }
    .site-nav > ul { gap: .2rem .85rem; }
    .site-nav a { font-size: .75rem; }
    .content { margin-top: 2.5rem; }
    .entry-content .wp-block-cover__inner-container { padding-block: 2rem; }
    .wc-home-hero { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .entry-content .wp-block-button__link { transition: none; }
    .wc-home-hero__image { transition: none; }
}
