/* ===== Base ===== */
:root {
    --bg: #f5efe7;
    --panel: rgba(68, 44, 28, 0.045);
    --panel-2: rgba(68, 44, 28, 0.08);
    --text: #2b211b;
    --muted: #6b5a4d;
    --border: rgba(68, 44, 28, 0.12);

    --accent: #6f8f99;
    --accent-2: #9b7558;

    --shadow: 0 8px 30px rgba(30, 20, 12, 0.08);
    --radius: 16px;
    --radius-sm: 12px;

    --max: 1080px;
    --pad: clamp(18px, 3vw, 28px);
    --serif: "Spectral", Georgia, serif;
    --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    --bg: #171311;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-2: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 248, 242, 0.92);
    --muted: rgba(255, 244, 236, 0.66);
    --border: rgba(255, 255, 255, 0.11);

    --accent: #8ea8b0;
    --accent-2: #b28a6f;

    --shadow: 0 14px 44px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(
            1000px 700px at 100% 0%,
            rgba(155, 117, 88, 0.08),
            transparent 55%
        ),
        radial-gradient(
            800px 600px at 0% 100%,
            rgba(111, 143, 153, 0.07),
            transparent 55%
        ),
        var(--bg);
    color: var(--text);
    line-height: 1.72;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}
a {
    color: var(--accent);
    text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
    text-underline-offset: 0.14em;
}
a:hover {
    text-decoration-color: var(--accent);
}
.container {
    width: min(var(--max), 100% - 2 * var(--pad));
    margin-inline: auto;
}

p, li {
    font-weight: 400;
}

strong, b {
    font-weight: 600;
}

.small, .meta, .eyebrow {
    color: var(--muted);
    font-weight: 500;
}
.section {
    padding: clamp(36px, 5vw, 64px) 0;
}
.section-head {
    margin-bottom: 18px;
}
.section-head h2 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 6px;
}
.muted {
    color: var(--muted);
}

.sr-only {
    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: 12px;
    background: var(--text);
    color: var(--bg);
    padding: 10px 12px;
    border-radius: 12px;
    z-index: 9999;
}
.skip-link:focus {
    left: 12px;
}

.card {
    background: color-mix(in srgb, var(--bg) 78%, white 22%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: color-mix(in oklab, var(--bg), transparent 22%);
    backdrop-filter: blur(12px);
}
.site-header[data-stuck="true"] {
    border-bottom-color: var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 14px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in oklab, var(--accent), transparent 65%);
    border: 1px solid color-mix(in oklab, var(--accent), transparent 40%);
}

.nav-toggle {
    display: none;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 14px;
    padding: 0;
    margin: 0;
}
.nav-menu a {
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--muted);
}
.nav-menu a:hover,
.nav-menu a:focus {
    outline: none;
    color: var(--text);
    background: var(--panel);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 70svh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: saturate(0.96);
    transform: scale(1.02);
    z-index: 0;
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 12, 10, 0.05) 0%,
        rgba(18, 12, 10, 0.3) 50%,
        rgba(18, 12, 10, 0.88) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 780px;
    padding: var(--pad) var(--pad) clamp(36px, 5vw, 56px);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-card {
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
}
.kicker {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 242, 232, 0.84);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}
.hero-title {
    margin: 0 0 0.25em;
    font-family: var(--serif);
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] .hero-title {
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}
.hero-subtitle {
    margin: 0 0 1.8rem;
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.76);
    letter-spacing: 0.05em;
    font-weight: 500;
}
:root[data-theme="dark"] .hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
}
.hero-quote {
    margin: 1.8rem 0 0;
    padding: 0;
    border: none;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.15rem, 2.8vw, 1.5rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    line-height: 1.5;
}
:root[data-theme="dark"] .hero-quote {
    color: rgba(255, 255, 255, 0.82);
}
.hero-portrait {
    display: none;
}
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}
.btn:hover {
    border-color: color-mix(in oklab, var(--accent), var(--border) 55%);
}
.btn.primary {
    border-color: color-mix(in oklab, var(--accent), var(--border) 45%);
    background: linear-gradient(
        180deg,
        color-mix(in oklab, var(--accent), transparent 78%),
        var(--panel)
    );
}

/* ===== Layout utilities ===== */
.grid {
    display: grid;
    gap: 14px;
}
.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prose {
    max-width: 68ch;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.8;
}
.prose p {
    margin: 0 0 1.3em;
}
.prose p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.75;
    color: var(--text);
    max-width: 68ch;
    margin: 0 0 1em;
}

.pullquote {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 500;
    line-height: 1.5;
    color: color-mix(in srgb, var(--accent) 78%, var(--text) 22%);
    margin: 2.5rem calc(-1 * var(--pad));
    padding: 0 var(--pad);
    border-left: 3px solid color-mix(in oklab, var(--accent), transparent 40%);
    max-width: none;
}
@media (min-width: 860px) {
    .pullquote {
        margin-inline: -80px;
        padding-inline: 80px;
    }
}
.story-figure {
    margin: 2.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.story-figure img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}
.story-figure figcaption {
    padding: 12px 18px;
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--panel);
    font-weight: 500;
}

.tags {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tags li {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
}

/* ===== Timeline Carousel ===== */
.timeline-carousel {
    position: relative;
    outline: none;
}
.tc-viewport {
    overflow: hidden;
    border-radius: var(--radius);
}
.tc-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.tc-slide {
    flex: 0 0 100%;
    min-width: 0;
}
.tc-figure {
    margin: 0;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    display: block;
}
.tc-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.tc-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 28px 24px;
    background: linear-gradient(
        to top,
        rgba(10, 6, 4, 0.9) 0%,
        rgba(10, 6, 4, 0.6) 55%,
        transparent 100%
    );
    color: #fff;
}
.tc-caption .year {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 236, 222, 0.86);
    margin-bottom: 4px;
}
.tc-caption h3 {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}
.tc-caption p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.55;
    font-size: 0.9rem;
}
/* Prev/next buttons */
.tc-btn {
    position: absolute;
    top: calc(50% - 22px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(10, 6, 4, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s,
        border-color 0.2s;
    z-index: 2;
    line-height: 1;
}
.tc-btn:hover {
    background: rgba(10, 6, 4, 0.8);
    border-color: var(--accent);
}
.tc-prev {
    left: 12px;
}
.tc-next {
    right: 12px;
}
@media (max-width: 480px) {
    .tc-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .tc-prev {
        left: 6px;
    }
    .tc-next {
        right: 6px;
    }
    .tc-caption {
        padding: 36px 16px 16px;
    }
}
/* Dot indicators */
.tc-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.tc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border);
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.2s;
}
.tc-dot[aria-selected="true"] {
    background: var(--accent);
    transform: scale(1.35);
}

/* ===== Gallery ===== */
.gallery {
    columns: 3 220px;
    gap: 10px;
}
.thumb {
    break-inside: avoid;
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    position: relative;
}
.thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}
.thumb:hover img {
    transform: scale(1.03);
    filter: brightness(1.08);
}
@media (max-width: 860px) {
    .gallery {
        columns: 2 160px;
    }
}
@media (max-width: 480px) {
    .gallery {
        columns: 1;
    }
}

.lightbox {
    width: min(980px, 92vw);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow);
}
.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.6);
}
.lightbox img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    display: block;
    background: rgba(0, 0, 0, 0.15);
}
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

/* ===== Forms / Tributes ===== */
.field {
    display: grid;
    gap: 6px;
    margin: 10px 0;
}
.field input,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--bg), white 50%);
    color: var(--text);
}
.field input:focus,
.field textarea:focus {
    outline: 2px solid color-mix(in oklab, var(--accent), transparent 35%);
    border-color: transparent;
}
.field.checkbox {
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 10px;
}
.hint {
    font-size: 13px;
    margin-top: 10px;
}
.tribute-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.tribute {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 12px;
}
.tribute .meta {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}
.tribute .msg {
    margin: 0;
    white-space: pre-wrap;
}

.inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.linklike {
    background: transparent;
    border: 0;
    padding: 8px 10px;
    color: var(--muted);
    cursor: pointer;
    border-radius: 12px;
    font-weight: 500;
}
.linklike:hover {
    color: var(--text);
    background: var(--panel);
}

/* ===== Footer ===== */
.site-footer {
    padding: 26px 0 42px;
    border-top: 1px solid var(--border);
    background: color-mix(in oklab, var(--bg), transparent 22%);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ===== Scroll reveal ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}
[data-reveal="done"] {
    opacity: 1;
    transform: none;
}
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}
[data-reveal-stagger="done"] > * {
    opacity: 1;
    transform: none;
}
[data-reveal-stagger="done"] > *:nth-child(1) {
    transition-delay: 0ms;
}
[data-reveal-stagger="done"] > *:nth-child(2) {
    transition-delay: 70ms;
}
[data-reveal-stagger="done"] > *:nth-child(3) {
    transition-delay: 140ms;
}
[data-reveal-stagger="done"] > *:nth-child(4) {
    transition-delay: 210ms;
}
[data-reveal-stagger="done"] > *:nth-child(5) {
    transition-delay: 280ms;
}
[data-reveal-stagger="done"] > *:nth-child(6) {
    transition-delay: 350ms;
}
[data-reveal-stagger="done"] > *:nth-child(7) {
    transition-delay: 420ms;
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal-stagger] > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .grid.two {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-flex;
    }
    .nav-menu {
        position: absolute;
        top: 60px;
        right: var(--pad);
        flex-direction: column;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 10px;
        box-shadow: var(--shadow);
        display: none;
        width: min(260px, calc(100vw - 2 * var(--pad)));
    }
    .nav-menu[data-open="true"] {
        display: flex;
    }
}
