:root {
    --ink: #ece6d6;
    --muted: #9a927f;
    --paper: #14110d;
    --panel: #1d1913;
    --line: #3a3328;
    --accent: #c47a2c;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.site-header,
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.site-footer {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    margin-top: 4rem;
}

.mark {
    font-variant: small-caps;
    letter-spacing: 0.16em;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.25rem;
}

main {
    width: min(var(--layout-content-max), calc(100% - 3rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.page-head,
.hero,
.intro,
.teaser,
.copy,
.post {
    max-width: 38rem;
}

.hero h1,
.page-head h1,
.post h1 {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 0.95;
    font-weight: 500;
    margin: 0 0 1rem;
}

.eyebrow,
.meta,
.date {
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-family: "Segoe UI", sans-serif;
}

.cta,
.buy button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--catalog-grid-min), 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.card {
    max-width: var(--preview-width);
    background: var(--panel);
    border: 1px solid var(--line);
}

.card a {
    display: block;
    text-decoration: none;
}

.card-placeholder,
model-viewer,
.preview-frame {
    width: 100%;
    max-width: var(--preview-width);
    aspect-ratio: var(--preview-width) / var(--preview-height);
    display: block;
    background: var(--preview-background);
}

.card-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
}

[data-lightbox] {
    cursor: zoom-in;
}

.preview-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.card h2,
.card .meta,
.card .preview-caption {
    margin: 0;
    padding: 0.7rem 0.85rem 0;
}

.card .preview-caption {
    color: var(--muted);
    padding-top: 0.35rem;
}

.card .meta {
    padding-bottom: 0.9rem;
}

.product-hero {
    margin: 0;
    max-width: var(--preview-width);
}

.product-hero figcaption,
.product-gallery figcaption {
    color: var(--muted);
    margin: 0.45rem 0 0;
    font-size: 0.95rem;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--gallery-thumb-min), var(--gallery-thumb-width)));
    gap: 0.9rem 0.75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.product-gallery figure {
    margin: 0;
}

.preview-frame--thumb {
    max-width: var(--gallery-thumb-width);
}

.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    border-top: 1px solid var(--line);
    padding: 1rem 0;
}

.buy,
.channels {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.buy label,
.buy input {
    display: block;
    width: min(24rem, 100%);
}

.buy input {
    margin: 0.35rem 0 1rem;
    padding: 0.55rem 0.6rem;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--ink);
}

.providers {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.messages {
    list-style: none;
    margin: 0;
    padding: 0.8rem 1.5rem;
    background: #2a1d10;
}

.beat img {
    width: 100%;
    height: auto;
}

.beat figcaption {
    color: var(--muted);
    margin-top: 0.5rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    max-width: min(var(--layout-content-max), calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
}

.lightbox::backdrop {
    background: var(--lightbox-backdrop);
}

.lightbox figure {
    margin: 0;
}

.lightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    background: var(--preview-background);
}

.lightbox figcaption {
    color: var(--muted);
    margin: 0;
    padding: 0.7rem 0.85rem 0.9rem;
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}
