:root {
    --red: #c8102e;
    --red-dark: #8b0c20;
    --gold: #d4a017;
    --cream: #fbf4ea;
    --paper: #fffdf8;
    --ink: #1c1410;
    --muted: #6b5e54;
    --line: #e8d9c8;
    --shadow: 0 12px 40px rgba(28, 20, 16, 0.12);
    --font-serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
    --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
    --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    color: var(--red-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover { color: var(--red); }

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--red);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 100;
}

.skip-link:focus { left: 0; }

.wrap {
    width: min(var(--max), calc(100% - 2rem));
    margin-inline: auto;
}

.narrow { width: min(40rem, calc(100% - 2rem)); margin-inline: auto; }

.topbar {
    background: var(--red);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.topbar a { color: #fff; text-decoration: none; }

.topbar-inner {
    width: min(var(--max), calc(100% - 2rem));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: var(--paper);
    border-radius: 50%;
    padding: 2px;
}

.nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.nav a[aria-current="page"],
.nav a:hover { border-bottom-color: var(--gold); }

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 1.4rem;
    height: 2px;
    background: #fff;
    position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.hero {
    position: relative;
    min-height: min(78vh, 42rem);
    display: grid;
    place-items: center;
    background: #1c1410 url("../../backgrounds/PXL_20260817_133604782.jpg") center / cover no-repeat;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero.hero-compact {
    min-height: 0;
}

.hero.hero-compact .hero-content {
    padding: 1.6rem 1.5rem;
}

.hero.hero-compact h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    line-height: 1.15;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(28, 20, 16, 0.35), rgba(28, 20, 16, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 1.5rem;
    max-width: 48rem;
}

.eyebrow {
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--gold);
    margin: 0 0 0.8rem;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6.2rem);
    margin: 0;
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.hero-lead {
    font-size: 1.15rem;
    max-width: 36rem;
    margin: 1.2rem auto 0;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.home-gallery {
    padding: 2.5rem 0 1.5rem;
    width: 100%;
}

.section-head {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.section-head h2 { margin: 0; }

.text-link {
    font-weight: 600;
    white-space: nowrap;
}

.h-scroll {
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.h-scroll-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll calc(var(--marquee-count, 12) * 3.2s) linear infinite;
}

.h-scroll-set {
    display: flex;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.h-scroll:hover .h-scroll-track,
.h-scroll:focus-within .h-scroll-track {
    animation-play-state: paused;
}

.h-scroll.is-static {
    overflow-x: auto;
    scrollbar-color: var(--red) var(--line);
}

.h-scroll.gallery-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 1rem 1.25rem;
    scrollbar-color: var(--red) var(--line);
}

.gallery-strip-section {
    padding: 0.5rem 0 1rem;
}

.gallery-viewer-title {
    margin: 0 0 1rem;
}

.h-scroll.is-static .h-scroll-track {
    animation: none;
}

.h-scroll-item {
    flex: 0 0 auto;
    width: min(200px, 58vw);
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.h-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.h-scroll-item:hover img { transform: scale(1.04); }

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .h-scroll-track { animation: none; }
    .h-scroll { overflow-x: auto; }
}

.home-blog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 2.5rem;
    padding: 1rem 0 4rem;
    align-items: start;
}

.blog-main .section-head { width: auto; margin-left: 0; padding: 0; }

.post-card {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: 8px;
}

.post-card-image {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 3 / 4;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card.no-image { grid-template-columns: 1fr; }

.post-card-body { margin: 0; }
.post-card-body h2,
.post-card-body h3 { margin: 0.15rem 0 0.4rem; }
.post-card-body h2 a,
.post-card-body h3 a { color: inherit; text-decoration: none; }
.post-card-body h2 a:hover,
.post-card-body h3 a:hover { color: var(--red); }

.meta {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 0.4rem;
}

.sidebar {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 1.4rem 1.3rem;
    border-top: 4px solid var(--red);
    position: sticky;
    top: 5.5rem;
}

.sidebar h2 { margin-top: 0; font-size: 1.3rem; }

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.sidebar-links a {
    display: block;
    padding: 0.45rem 0;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.sidebar-note { color: var(--muted); font-size: 0.95rem; margin: 0; }

.page-header {
    background: var(--red);
    color: #fff;
    padding: 2.4rem 0 2rem;
    margin-bottom: 2rem;
}

.page-header h1 { margin-bottom: 0.3rem; }
.page-header p { margin: 0; max-width: 36rem; opacity: 0.95; }

.blog-list { padding-bottom: 3rem; }

.post-page { padding-bottom: 3rem; }

.post-featured {
    margin: 0 0 1.5rem;
}

.post-featured img {
    width: 100%;
    max-height: 36rem;
    object-fit: cover;
    border-radius: 8px;
}

.post-featured figcaption {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.about-body {
    padding: 2.5rem 0 1.5rem;
}

.prose p { margin: 0 0 1rem; }
.prose h2,
.prose h3,
.prose h4 { margin: 1.6rem 0 0.6rem; }
.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose img {
    max-width: 100%;
    height: auto;
}
.prose code {
    font-size: 0.9em;
    background: #f0e6d8;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.post-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 2rem 0;
}

.post-photos img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-radius: 6px;
}

.back-link { margin-top: 2rem; }

.pagination {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
}

.gallery-page { padding-bottom: 3rem; }

.gallery-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.gallery-main {
    margin: 0;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    margin-inline: auto;
}

.gallery-main figcaption {
    color: #eee;
    padding: 0.6rem 1rem 1rem;
    text-align: center;
}

.gallery-nav {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    font-size: 1.8rem;
    line-height: 1;
}

.gallery-nav:hover { background: var(--red-dark); color: #fff; }

.gallery-count {
    text-align: center;
    color: var(--muted);
}

.gallery-thumbs {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 0 1rem;
    margin: 0;
}

.gallery-thumbs a {
    display: block;
    width: 5.5rem;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
    opacity: 0.7;
    outline: 2px solid transparent;
}

.gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs a.is-active,
.gallery-thumbs a:hover {
    opacity: 1;
    outline-color: var(--red);
}

.contact-form {
    position: relative;
}

.contact-form .field,
.field {
    margin: 0 0 1.1rem;
}

.field label,
.field legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select {
    width: 100%;
    font: inherit;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
}

.field.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}

.field.checkbox input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex: none;
    accent-color: var(--red);
}

.field textarea { resize: vertical; }

.field.has-error input,
.field.has-error textarea { border-color: var(--red); }

.error { color: var(--red); font-size: 0.9rem; display: block; margin-top: 0.3rem; }
.hint { color: var(--muted); font-size: 0.85rem; }

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

.btn {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0.7rem 1.2rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--red-dark); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-small { padding: 0.35rem 0.7rem; font-size: 0.9rem; }

.btn-danger { background: #7a1f1f; }
.btn-danger:hover { background: #5c1515; }

.btn-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--red-dark);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.notice {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.notice-ok { background: #e7f4ea; color: #1b5e20; }
.notice-error { background: #fdecea; color: #8b0c20; }

.empty { color: var(--muted); }

.site-footer {
    background: #1c1410;
    color: #f3e6d8;
    padding: 2.5rem 1rem 2rem;
    margin-top: 2rem;
}

.footer-inner {
    width: min(var(--max), 100%);
    margin-inline: auto;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 0;
}

.footer-tag { color: #cbbba8; margin: 0.4rem 0 1.2rem; }

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.4rem;
}

.footer-nav a { color: #fff; }

.footer-copy { color: #9a8c7c; font-size: 0.85rem; margin-top: 1.4rem; }

@media (max-width: 800px) {
    .home-blog { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .post-card,
    .post-card-row { grid-template-columns: 1fr; }
    .post-card-image { aspect-ratio: 16 / 10; max-height: 16rem; }
}

@media (max-width: 720px) {
    .nav-toggle { display: grid; place-items: center; }
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 1rem;
        gap: 0.4rem;
    }
    .nav.is-open { display: flex; }
    .gallery-stage { grid-template-columns: 1fr; }
    .gallery-nav { justify-self: center; }
}
