:root {
    --paper: #f3efe6;
    --paper-2: #e7e1d6;
    --ink: #1c1915;
    --muted: #6f6a62;
    --line: #ddd4c6;
    --oxide: #8d3d32;
    --hero: #14110e;
    --hero-text: #f7f2ea;
    --header: 4.5rem;
    --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
    --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.5;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
p { margin: 0; }

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--ink);
    color: var(--paper);
    padding: 0.5rem 0.8rem;
}
.skip:focus { top: 0.5rem; z-index: 10; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header);
    padding: 0.75rem 6vw;
    background: rgba(243, 239, 230, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.wordmark {
    min-width: 0;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}
.wordmark span {
    display: block;
    font-family: var(--sans);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { text-decoration: none; font-size: 0.92rem; letter-spacing: 0.04em; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--oxide); }
.site-nav form { margin: 0; }
.site-nav button, .text-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
}
.nav-toggle {
    display: none;
    background: #fffdf8;
    border: 1px solid var(--line);
    padding: 0.55rem 1rem;
    min-height: 44px;
    border-radius: 999px;
    cursor: pointer;
}

.flash {
    margin: 0;
    padding: 0.8rem 6vw;
    background: #e5efe4;
}
.flash-err { background: #f3e2dc; }

.hero {
    position: relative;
    min-height: calc(100svh - var(--header));
    display: flex;
    align-items: flex-end;
    background: var(--hero);
    color: var(--hero-text);
    overflow: hidden;
}
.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 9, 7, 0.78), rgba(12, 9, 7, 0.12) 48%, rgba(12, 9, 7, 0.28));
}
.hero__copy { position: relative; z-index: 1; width: min(100%, 64rem); padding: 12vh 6vw 8vh; }
.hero h1 { font-size: clamp(4.2rem, 11vw, 8.4rem); font-weight: 500; max-width: 8em; }
.button { white-space: nowrap; }
.kicker {
    margin: 0 0 0.8rem;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--oxide);
}
.hero .kicker { color: #f0d2c4; }
.lede { margin-top: 1rem; font-size: 1.2rem; font-weight: 300; max-width: 28ch; }
.hero__links { display: flex; gap: 1.2rem; align-items: center; margin-top: 1.6rem; flex-wrap: wrap; }

.button, .text-link { text-decoration: none; }
.button {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    background: transparent;
    cursor: pointer;
}
.button-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button-danger { background: var(--oxide); color: #fffdf8; border-color: var(--oxide); min-height: 48px; padding: 0.85rem 1.35rem; font-size: 1.05rem; }
.action-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.2rem; }
.action-row form { margin: 0; }
.danger-panel {
    margin: 0 6vw 4.5rem;
    padding: 1.5rem 1.4rem 1.6rem;
    max-width: 36rem;
    border: 1px solid var(--oxide);
    background: #fffdf8;
}
.danger-panel h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.danger-panel p { margin-top: 0.75rem; max-width: 38ch; }
.danger-panel .button-danger { margin-top: 1.15rem; }
.hero .button { border-color: var(--hero-text); color: var(--hero-text); }
.hero .text-link { color: var(--hero-text); border-bottom: 1px solid rgba(247, 242, 234, 0.5); }

.section { padding: 4.5rem 6vw; }
.section__head, .page-intro {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.page-intro {
    display: block;
    padding: 4.5rem 6vw 0;
    max-width: 40rem;
}
.page-intro h1, .section h2, .private-band h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.page-intro p, .private-band p { margin-top: 1rem; color: var(--muted); max-width: 42ch; }
.section__head a { color: var(--oxide); }
.narrow { max-width: 40rem; }
.meta, .fine { color: var(--muted); font-size: 0.92rem; }
.fine { margin-top: 1rem; }
.album-intro .meta { margin-top: 0.8rem; }

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1.2rem;
}
.album-card { text-decoration: none; }
.album-card__frame {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--paper-2);
    display: grid;
    place-items: center;
}
.album-card__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card__index { font-family: var(--serif); font-size: 3rem; color: rgba(28, 25, 21, 0.45); }
.album-card__meta { padding-top: 0.75rem; }
.album-card__meta h2, .album-card__meta h3 { font-size: 1.7rem; }
.album-card__meta p { color: var(--muted); margin-top: 0.25rem; }

.recent-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
}
.recent-row img { width: 100%; height: 9rem; object-fit: cover; display: block; }

.private-band {
    margin: 0 6vw 5rem;
    padding: 3rem;
    background: #1c1915;
    color: var(--hero-text);
}
.private-band .kicker { color: #f0d2c4; }
.private-band p { color: rgba(247, 242, 234, 0.78); }
.private-band .button { margin-top: 1.4rem; background: transparent; color: var(--hero-text); border-color: var(--hero-text); }

.photo-grid {
    columns: 3 260px;
    column-gap: 0.8rem;
    padding: 2rem 6vw 5rem;
}
.photo-grid figure { break-inside: avoid; margin: 0 0 0.8rem; }
.photo-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.photo-open img { display: block; width: 100%; height: auto; }
.photo-grid figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; }

.gate { max-width: 36rem; margin: 0 auto; padding: 8vh 1.5rem 12vh; }
.gate h1 { font-size: clamp(2.8rem, 6vw, 4.4rem); }
.gate p { margin-top: 1rem; color: var(--muted); }
.stack-form { display: grid; gap: 0.45rem; margin-top: 1.5rem; min-width: 0; position: relative; }
.stack-form label { font-size: 0.85rem; letter-spacing: 0.04em; }
.stack-form input, .stack-form select, .stack-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--line);
    background: #fffdf8;
    border-radius: 2px;
}
.stack-form input, .stack-form select { min-height: 48px; }
.file-pick {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0.4rem;
    padding: 0.8rem 1rem;
    border: 1px dashed var(--ink);
    border-radius: 999px;
    background: var(--paper);
    text-align: center;
    cursor: pointer;
}
.file-pick input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 52px;
    opacity: 0;
    cursor: pointer;
}
.stack-form .button { justify-self: start; margin-top: 0.6rem; }
.check { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.4rem; }
.check input { width: auto; }
.hp {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.notice { padding: 1rem; background: #e5efe4; margin-bottom: 1rem; }
.prose p { margin-top: 1rem; }

.site-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 6vw 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}
.site-footer a { color: var(--oxide); }

.sheet { width: 100%; border-collapse: collapse; }
.sheet td::before { content: none; }
.sheet th, .sheet td { text-align: left; padding: 0.85rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.split { display: grid; gap: 2rem; align-items: start; }
.upload-form { margin: 1rem 0 2rem; padding: 1rem; background: #fffdf8; border: 1px solid var(--line); }
.studio-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.studio-photos article { background: #fffdf8; border: 1px solid var(--line); }
.studio-photos img { width: 100%; height: 180px; object-fit: cover; display: block; }
.studio-photos p { padding: 0.6rem 0.7rem 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.studio-photo-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 0.7rem 0.8rem; }
.studio-photo-actions form { margin: 0; }
.studio-photo-actions button, .inquiry-list button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--oxide);
    cursor: pointer;
}
.inquiry-list { display: grid; gap: 1rem; }
.inquiry-list article { padding: 1rem 1.1rem; background: #fffdf8; border: 1px solid var(--line); }
.inquiry-list header { display: grid; gap: 0.15rem; margin-bottom: 0.6rem; }
.inquiry-list .is-unread { box-shadow: inset 3px 0 0 var(--oxide); }
.grant-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: 0.8rem; }
.grant-list li { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.grant-list form { margin: 0; }
.grant-list button, .inline-reset button { background: none; border: 0; color: var(--oxide); cursor: pointer; padding: 0; }
.grant-edit { display: grid; gap: 0.4rem; width: 100%; }
.grant-edit select {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    background: #fffdf8;
}
.person-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; width: 100%; }
.person-actions form { margin: 0; }
.sheet .button { min-height: 44px; }
.client-list { display: grid; gap: 1rem; }
.client-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: #fffdf8;
    border: 1px solid var(--line);
    min-width: 0;
}
.client-card h3 { font-size: 1.7rem; }
.client-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.client-actions form { margin: 0; }
.access-pair { display: grid; gap: 0.7rem; }
@media (min-width: 720px) {
    .access-pair { grid-template-columns: minmax(0, 16rem) auto; align-items: end; }
}
.hero-preview img {
    width: min(100%, 28rem);
    max-height: 16rem;
    object-fit: cover;
    display: block;
    margin-top: 0.6rem;
    border: 1px solid var(--line);
}
.hero-preview img[hidden] { display: none; }
.badge { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.55rem; }
.inline-reset { display: flex; gap: 0.4rem; align-items: center; }
.inline-reset input { width: 9rem; padding: 0.35rem 0.45rem; border: 1px solid var(--line); background: #fffdf8; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: #0c0b0a;
    color: var(--hero-text);
    display: grid;
    grid-template-rows: auto 1fr auto;
}
.lightbox[hidden] { display: none; }
.lightbox__bar, .lightbox__caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
}
.lightbox img { max-width: min(1200px, 92vw); max-height: calc(100vh - 7rem); object-fit: contain; justify-self: center; align-self: center; }
.lightbox button, .lightbox a {
    color: var(--hero-text);
    background: none;
    border: 1px solid rgba(247, 242, 234, 0.35);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 900px) {
    .album-grid { grid-template-columns: 1fr 1fr; }
    .recent-row { grid-template-columns: repeat(3, 1fr); }
    .nav-toggle { display: inline-flex; align-items: center; }
    .site-nav {
        display: none;
        position: absolute;
        z-index: 30;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.4rem 6vw 1rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a, .site-nav button {
        display: flex;
        align-items: center;
        min-height: 48px;
        width: 100%;
        padding: 0.35rem 0;
        font-size: 1.05rem;
        text-align: left;
    }
    .photo-grid { columns: 2 160px; }
}
@media (max-width: 640px) {
    .album-grid, .recent-row { grid-template-columns: 1fr; }
    .recent-row img { height: 14rem; }
    .hero h1 { font-size: clamp(2.7rem, 14vw, 3.6rem); max-width: 100%; }
    .hero__copy { padding-left: 1.25rem; padding-right: 1.25rem; }
    .private-band { margin: 0; padding: 2rem 1.4rem; }
    .photo-grid { columns: 1; }
    .page-intro, .section, .gate { max-width: 100%; }
    .section { padding: 2.2rem 1.1rem 3rem; }
    .page-intro { padding: 2rem 1.1rem 0; }
    .sheet, .sheet thead, .sheet tbody, .sheet tr, .sheet td { display: block; width: 100%; }
    .sheet thead { display: none; }
    .sheet tr {
        margin: 0 0 0.85rem;
        padding: 0.95rem 1rem 0.7rem;
        background: #fffdf8;
        border: 1px solid var(--line);
    }
    .sheet td { border: 0; padding: 0.35rem 0; }
    .sheet td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.15rem;
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
    }
    .sheet td[data-label="Album"] a { font-family: var(--serif); font-size: 1.55rem; text-decoration: none; }
    .inline-reset { display: grid; width: 100%; }
    .inline-reset input { width: 100%; min-height: 48px; }
    .inline-reset button, .grant-list button {
        min-height: 44px;
        padding: 0.45rem 0;
        text-align: left;
    }
    .studio-photos { grid-template-columns: 1fr; }
    .studio-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
    .studio-photo-actions button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 0.45rem 0.4rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fffdf8;
        white-space: normal;
        text-align: center;
    }
    .grant-list li { align-items: flex-start; }
    .person-actions { display: grid; gap: 0.2rem; width: 100%; }
    .person-actions button { min-height: 44px; text-align: left; }
    .client-actions .button, .client-actions .text-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
    }
    .button { white-space: normal; }
    .action-row, .action-row form, .action-row .button, .danger-panel .button-danger { width: 100%; }
    .action-row .button, .danger-panel .button-danger { justify-content: center; }
    .danger-panel { margin: 0 1.1rem 3rem; }
    .lightbox__bar, .lightbox__caption { flex-wrap: wrap; }
    .lightbox button, .lightbox a { min-height: 44px; }
}
