/*
Theme Name: Mistress May
Description: A restrained editorial theme for Mistress May.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.0
Author: Mistress May
Text Domain: mistress-may
*/

@font-face {
    font-family: "Bronze Copper";
    src: url("assets/fonts/bronze-copper.otf") format("opentype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: Space;
    src: url("assets/fonts/space-grotesk.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Space;
    src: url("assets/fonts/space-grotesk-bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --ink: #171311;
    --paper: #efe8dc;
    --accent: #672e35;
    --muted: #625b53;
    --line: #17131140;
    --gutter: clamp(24px, 6vw, 96px);
    --display: "Bronze Copper", Georgia, serif;
    --utility: Space, Arial, sans-serif;
    --header-height: 124px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.6 var(--utility);
    -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

::selection {
    background: var(--accent);
    color: var(--paper);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, input, textarea { border-radius: 0; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
p + p { margin-top: 1.4em; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    font-synthesis: none;
    letter-spacing: -.014em;
    line-height: 1.08;
}

:is(a, button, input, textarea, summary):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 12px;
    padding: 10px 16px;
    background: var(--paper);
    color: var(--ink);
    transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

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

.section-wrap {
    width: 100%;
    max-width: 1600px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.line-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-width: 220px;
    max-width: 100%;
    min-height: 52px;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: var(--accent);
    font: 400 11px/1.5 var(--utility);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.line-link:hover { color: var(--ink); }
.line-link span { font-size: 20px; line-height: 1; }

.editorial-copy {
    font-size: 18px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.editorial-copy h2 {
    margin-block: 1.4em .5em;
    font-size: clamp(36px, 4vw, 52px);
}

.editorial-copy a:not(.line-link) {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.editorial-copy > :first-child { margin-top: 0; }
.editorial-copy > :last-child { margin-bottom: 0; }

/* Header and navigation */
.site-header,
.menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-height);
    padding-inline: var(--gutter);
}

.site-header {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    max-width: 100%;
}

.brand-monogram {
    flex: 0 0 auto;
    font: 600 68px/1 var(--display);
    font-synthesis: none;
    letter-spacing: -.03em;
    white-space: nowrap;
}

.brand-name {
    font: 400 10px/1.5 var(--utility);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 20px;
    min-height: 48px;
    padding: 8px 0 8px 8px;
    border: 0;
    background: transparent;
}

.menu-label {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.menu-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 28px;
    height: 28px;
}

.menu-lines i {
    display: block;
    width: 100%;
    height: 1px;
    background: currentColor;
}

.navigation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.navigation-list a {
    display: inline-block;
    padding-block: 8px;
    font-size: 11px;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.navigation-list a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 6px;
}

dialog:not([open]) { display: none; }

.menu-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: auto;
    background: var(--paper);
    color: var(--ink);
}

.menu-dialog::backdrop { background: var(--paper); }

.menu-close,
.lightbox-close {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    font: 400 36px/1 var(--utility);
}

.menu-dialog nav { padding: 28px var(--gutter) 40px; }
.menu-dialog .navigation-list { display: block; }
.menu-dialog .navigation-list li { border-bottom: 1px solid var(--line); }

.menu-dialog .navigation-list a {
    display: block;
    padding: 12px 0 18px;
    font: 600 clamp(72px, 8vw, 112px)/1.1 var(--display);
    font-synthesis: none;
    letter-spacing: 0;
    text-transform: none;
}

.menu-bottom { padding: 0 var(--gutter) 40px; }
.menu-bottom a { display: inline-block; padding-block: 10px; font-size: 12px; }

/* Age confirmation entrance */
.entrance {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: calc(var(--header-height) + 24px) var(--gutter) 64px;
    background: #000;
    color: var(--paper);
}

.entrance-image,
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.entrance-image { object-position: 65% 15%; }

.age-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    text-align: center;
}

.age-monogram {
    margin-bottom: 24px;
    font: 600 96px/1 var(--display);
    font-synthesis: none;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.age-panel h1 {
    font-size: 112px;
    line-height: 1.12;
    letter-spacing: -.014em;
}

.age-panel h1 span { display: block; margin-top: .18em; }

.age-note {
    margin-top: 18px;
    color: #c2b9ad;
    font-size: 14px;
    line-height: 1.6;
}

.age-notice {
    max-width: 370px;
    margin: 20px auto 0;
    padding: 12px 16px;
    border: 1px solid #efe8dc88;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.age-form { margin-top: 32px; }

.age-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: min(100%, 370px);
    margin-inline: auto;
}

.age-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    min-height: 56px;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid #efe8dc88;
    background: transparent;
    color: var(--paper);
    font: 400 11px/1.5 var(--utility);
    letter-spacing: .07em;
    text-transform: uppercase;
}

.age-confirm {
    border: 1px solid var(--accent);
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(103, 46, 53, .22);
}
.age-confirm:hover { background: #7a3b43; border-color: #7a3b43; color: var(--paper); }
.age-confirm:focus-visible { outline-color: var(--paper); outline-offset: 4px; }
.age-choice span { font-size: 20px; line-height: 1; }
.age-choice:hover { color: #fff; border-color: #fff; }
.age-choice:focus-visible { outline-color: var(--paper); }

.age-exit-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 32px;
    background: #000;
    color: var(--paper);
    text-align: center;
}

.age-exit-screen h1 {
    font: 400 20px/1.4 var(--utility);
    letter-spacing: normal;
}

.age-exit-screen p {
    margin-top: 14px;
    color: #c2b9ad;
    font-size: 14px;
    line-height: 1.6;
}

.home .site-header,
.page-about .site-header { color: var(--paper); }

.entrance-header .brand-monogram { display: none; }
.entrance-header .brand-name { max-width: none; }

.about-hero .line-link {
    color: var(--paper);
    border-color: #efe8dc88;
}

:is(.entrance, .about-hero, .site-footer) a:hover,
:is(.home, .page-about) .site-header a:hover,
:is(.home, .page-about) .site-header button:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 6px;
}

:is(.entrance, .about-hero, .site-footer, .lightbox) :is(a, button):focus-visible,
:is(.home, .page-about) .site-header :is(a, button):focus-visible {
    outline-color: var(--paper);
}

/* About */
.about-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: max(700px, 88svh);
    padding: 150px var(--gutter) 76px;
    background: #000;
    color: var(--paper);
}

.hero-image { object-position: 65% center; }
.hero-copy { position: relative; z-index: 1; max-width: 100%; }

.hero-copy h1 {
    font-size: clamp(150px, 15vw, 220px);
    line-height: 1.01;
    letter-spacing: -.012em;
}

.name-line { display: block; }
.hero-copy .line-link { margin-top: 28px; }

.introduction {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 48fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "portrait heading" "portrait copy";
    column-gap: 8%;
    row-gap: 28px;
    padding-block: 100px;
}

.intro-heading { grid-area: heading; align-self: end; }

.intro-heading h2 {
    font-size: clamp(84px, 8.8vw, 130px);
    line-height: 1.08;
    letter-spacing: -.014em;
}

.portrait { grid-area: portrait; align-self: center; background: #000; }

.portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 71% center;
    background: #000;
}

.intro-copy { grid-area: copy; align-self: start; max-width: 440px; }
.intro-copy .line-link { margin-top: 28px; }

/* Gallery and text pages */
.inner-page {
    min-height: 70svh;
    padding-top: 182px;
    padding-bottom: 90px;
}

.page-heading { margin-bottom: 52px; }

.page-heading h1 {
    margin-bottom: 18px;
    font-size: clamp(110px, 15vw, 200px);
    line-height: 1.05;
    letter-spacing: -.01em;
}

.page-heading .editorial-copy { max-width: 600px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 6vw;
}

.gallery-grid figure:nth-child(2) { padding-top: 90px; }

.gallery-frame {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #000;
}

.gallery-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 71% center;
    background: #000;
}

.gallery-frame > span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 9px 12px;
    background: var(--paper);
    color: var(--ink);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gallery-grid figcaption {
    margin-top: 16px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .12em;
}

.lightbox {
    width: min(94vw, 1300px);
    max-width: none;
    max-height: 95svh;
    padding: 58px 24px 16px;
    border: 1px solid #efe8dc55;
    background: #000;
    color: var(--paper);
    overflow: auto;
}

.lightbox::backdrop { background: #000e; }
.lightbox-close { position: absolute; top: 5px; right: 10px; }
.lightbox > img { width: 100%; height: 68svh; object-fit: contain; }
.lightbox > p { margin-top: 16px; text-align: center; font-size: 12px; }
.lightbox-controls { display: flex; justify-content: center; gap: 16px; }

.lightbox-controls button {
    min-width: 48px;
    min-height: 48px;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    font-size: 24px;
}

.text-page { max-width: 1160px; }
.text-page .page-heading { margin-bottom: 38px; }
.text-page .page-content { max-width: 800px; }
.page-content > .line-link { margin-top: 24px; }

/* Contact */
.contact-form { margin-top: 32px; }

.contact-form label {
    display: block;
    font-size: 11px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 30px;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    padding: 13px 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font: 400 16px/1.5 var(--utility);
    letter-spacing: normal;
    text-transform: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { min-height: 160px; resize: vertical; }

.contact-form .form-caption {
    max-width: 630px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.contact-form .line-link { margin-top: 20px; }

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-notice {
    margin-bottom: 28px;
    padding: 20px 24px;
    border: 1px solid var(--accent);
    font-size: 16px;
    line-height: 1.6;
}

.form-notice h2 { margin: 0 0 8px; font-size: 38px; }
.form-notice p { margin: 0; }

/* Footer */
.site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 48px var(--gutter) 25px;
    background: var(--ink);
    color: var(--paper);
}

.site-footer .brand-monogram { font-size: 74px; }
.site-footer nav { justify-self: end; }

.site-footer small {
    grid-column: 1 / -1;
    padding-top: 22px;
    border-top: 1px solid #efe8dc40;
    color: #c2b9ad;
    font-size: 10px;
    letter-spacing: .04em;
}

body.admin-bar .site-header { top: 32px; }

/* Compact layouts */
@media (max-width: 1000px) {
    .brand-monogram { font-size: 60px; }
    .wordmark { gap: 16px; }
    .brand-name { font-size: 9px; }
    .introduction { column-gap: 6%; }
    .intro-heading h2 { font-size: 9vw; }
    .intro-copy { font-size: 16px; }
    .site-footer .navigation-list { gap: 10px 24px; }
}

@media (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}

@media (max-width: 760px) {
    :root { --gutter: 7vw; --header-height: 100px; }

    .site-header, .menu-top { gap: 16px; }
    .wordmark { gap: 14px; }
    .brand-monogram { font-size: 57px; }
    .brand-name { font-size: 9px; letter-spacing: .1em; }
    .menu-toggle { gap: 14px; }
    .menu-label { font-size: 9px; }
    .menu-lines { width: 25px; }
    .navigation-list { gap: 8px 26px; }
    .navigation-list a { font-size: 10px; }
    .menu-dialog nav { padding-top: 28px; padding-bottom: 32px; }
    .menu-dialog .navigation-list a { font-size: 76px; padding-block: 12px 18px; }

    .entrance {
        padding-top: calc(var(--header-height) + 12px);
        padding-bottom: 36px;
    }

    .age-monogram { margin-bottom: 18px; font-size: 76px; }
    .age-panel h1 { font-size: clamp(84px, 15vw, 104px); }
    .age-note { margin-top: 16px; font-size: 13px; }
    .age-form { margin-top: 28px; }
    .age-actions { gap: 18px; }
    .age-choice { min-height: 54px; }

    .about-hero {
        min-height: max(620px, 82svh);
        padding-top: 135px;
        padding-bottom: 60px;
    }

    .hero-copy h1 { font-size: clamp(120px, 25vw, 176px); line-height: 1.04; }
    .hero-copy .line-link { margin-top: 26px; }

    .introduction {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: "heading" "portrait" "copy";
        gap: 30px;
        padding-block: 62px;
    }

    .intro-heading h2 { font-size: clamp(76px, 16vw, 118px); }
    .portrait img { max-height: 660px; object-position: 74% center; }
    .intro-copy { max-width: 540px; font-size: 17px; }
    .intro-copy .line-link { margin-top: 22px; }

    .inner-page { padding-top: 142px; padding-bottom: 62px; }
    .page-heading { margin-bottom: 36px; }
    .page-heading h1 { font-size: clamp(100px, 24vw, 170px); margin-bottom: 12px; }
    .editorial-copy { font-size: 16px; }
    .gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 38px; }
    .gallery-grid figure:nth-child(2) { padding-top: 0; }
    .gallery-frame img { max-height: 720px; }
    .gallery-grid figcaption { margin-top: 12px; font-size: 10px; }
    .lightbox { padding: 54px 12px 12px; }
    .lightbox > img { height: 64svh; }
    .text-page .page-heading { margin-bottom: 28px; }

    .contact-form { margin-top: 26px; }
    .field-pair { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 26px; }
    .contact-form label { font-size: 10px; }
    .contact-form .form-caption { font-size: 11px; }
    .form-notice { padding: 18px; font-size: 15px; }
    .form-notice h2 { font-size: 32px; }

    .site-footer { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 38px; }
    .site-footer .wordmark { gap: 22px; }
    .site-footer .brand-monogram { font-size: 70px; }
    .site-footer nav { justify-self: start; }
    .site-footer small { grid-column: 1; padding-top: 20px; font-size: 9px; }
}

@media (max-width: 390px) {
    .brand-monogram { font-size: 50px; }
    .brand-name { max-width: 76px; font-size: 8px; line-height: 1.5; }
    .wordmark { gap: 11px; }
    .menu-toggle { gap: 11px; padding-left: 0; }
    .menu-label { font-size: 8px; }
    .menu-lines { width: 23px; }
    .age-actions { gap: 16px; }
    .age-choice { gap: 10px; font-size: 10px; }
    .hero-copy h1 { font-size: 31vw; }
    .intro-heading h2 { font-size: 21vw; }
    .page-heading h1 { font-size: 30vw; }
    .menu-dialog .navigation-list a { font-size: 66px; }
    .navigation-list { gap: 8px 24px; }
    .site-footer .brand-name { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
