:root {
    --ink: #f8f0e4;
    --muted-ink: #dac9b4;
    --gold: #d39f54;
    --sienna: #6f4b2d;
    --bg: #0c0907;
    --panel-bg: rgba(23, 18, 14, 0.82);
    --panel-border: rgba(238, 207, 162, 0.3);
    --radius-lg: 26px;
    --radius-md: 18px;
    --shadow-lg: 0 26px 48px rgba(0, 0, 0, 0.46);
}

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

html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 12% 14%, rgba(199, 130, 49, 0.15), transparent 45%),
        radial-gradient(circle at 90% 5%, rgba(128, 71, 26, 0.2), transparent 40%),
        linear-gradient(180deg, #1a130f 0%, #0c0907 36%, #090706 100%);
    color: var(--ink);
    font-family: "Sora", sans-serif;
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.memorial-site {
    overflow: hidden;
}

.flash-message {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 30;
    background: rgba(49, 36, 23, 0.92);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    color: #ffeaca;
    padding: 0.68rem 1.25rem;
    box-shadow: var(--shadow-lg);
}

.hero {
    --hero-shift: 0px;
    --hero-title-expand: 1;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1.5rem clamp(2.4rem, 7vh, 4.3rem);
    isolation: isolate;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06) translate3d(0, calc(var(--hero-shift) * -0.22), 0);
    transition: transform 200ms linear;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18, 12, 8, 0.34), rgba(8, 6, 4, 0.88) 86%),
        linear-gradient(45deg, rgba(191, 136, 64, 0.24), transparent 38%, rgba(50, 33, 18, 0.44) 90%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/images/cheetaprint-786458-overlay.jpg") center / 450px repeat;
    opacity: 0.1;
    mix-blend-mode: soft-light;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(92vw, 920px);
    max-width: min(92vw, calc(560px + (var(--hero-title-expand) * 360px)));
    padding: clamp(0.7rem, calc(0.7rem + (var(--hero-title-expand) * 1.35vw)), 1.9rem)
        clamp(1rem, calc(0.95rem + (var(--hero-title-expand) * 2.8vw)), 2.8rem);
    margin-bottom: clamp(1.25rem, 4vh, 2.8rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 222, 179, 0.45);
    background: rgba(15, 10, 8, calc(0.42 + (var(--hero-title-expand) * 0.18)));
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-lg);
    transform: translate3d(0, calc((1 - var(--hero-title-expand)) * 18px), 0);
    transition: max-width 220ms ease, padding 220ms ease, background-color 220ms ease, transform 220ms ease;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.42em;
    font-size: 0.72rem;
    color: #f5dcb8;
}

.hero h1 {
    margin: 1rem 0 0.65rem;
    font-family: "Bodoni Moda", serif;
    font-size: clamp(2.4rem, 9vw, 6rem);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 12px 20px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.24rem);
    color: var(--muted-ink);
}

.hero-cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 236, 203, 0.5);
    padding: 0.78rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.82rem;
    background: linear-gradient(90deg, rgba(216, 162, 89, 0.44), rgba(83, 55, 31, 0.5));
    transition: transform 240ms ease, box-shadow 240ms ease;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(209, 154, 83, 0.28);
}

.scroll-hint {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 239, 208, 0.76);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    animation: hint-pulse 2.3s ease-in-out infinite;
}

.panel {
    position: relative;
    padding: clamp(3rem, 9vw, 7rem) clamp(1.15rem, 3.8vw, 4.5rem);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
}

.panel-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.panel-obituary::before {
    background: url("/images/cheetaprint-dark.jpg") center / 320px repeat;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.6rem);
    align-items: start;
}

.portrait-frame {
    border-radius: var(--radius-lg);
    padding: 0.78rem;
    background:
        linear-gradient(140deg, rgba(228, 180, 109, 0.52), rgba(53, 37, 23, 0.9));
    box-shadow: var(--shadow-lg);
}

.portrait-frame img {
    border-radius: calc(var(--radius-lg) - 9px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.obituary-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.4rem, 3.8vw, 2.5rem);
}

h2 {
    margin: 0;
    font-family: "Bodoni Moda", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.obituary-stream {
    margin-top: 1.2rem;
    max-height: 600px;
    overflow: auto;
    padding-right: 0.55rem;
}

.obit-line {
    margin: 0 0 1rem;
    color: #e9dbc8;
    opacity: 0;
    transform: translateY(20px);
}

.obituary-card.in-view .obit-line {
    animation: obituary-reveal 620ms ease forwards;
    animation-delay: calc((var(--line-index) * 115ms) + 110ms);
}

.panel-announcement {
    background:
        linear-gradient(180deg, rgba(18, 14, 10, 0.76), rgba(9, 6, 5, 0.96)),
        url("/images/cheetaprint-light.jpg") center / 280px repeat;
}

.announcement-card {
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(233, 201, 158, 0.32);
    background: rgba(35, 25, 17, 0.78);
    box-shadow: var(--shadow-lg);
}

.announcement-copy {
    margin-top: 0.85rem;
    white-space: pre-line;
    color: #eddcc6;
    font-size: 1.04rem;
}

.announcement-note {
    margin-top: 1rem;
    color: rgba(255, 225, 188, 0.74);
    font-size: 0.92rem;
}

.panel-uploads::before {
    background: url("/images/cheetaprint-fullbrightness.jpg") center / 300px repeat;
}

.uploads-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
}

.uploads-card,
.share-card,
.guestbook-form-card,
.guest-entry {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.uploads-card {
    padding: clamp(1.4rem, 3.8vw, 2.3rem);
}

.dropbox-link {
    display: inline-flex;
    margin-top: 0.8rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 223, 181, 0.44);
    background: linear-gradient(100deg, rgba(191, 136, 64, 0.35), rgba(78, 53, 31, 0.5));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    transition: transform 220ms ease, background 220ms ease;
}

.dropbox-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(100deg, rgba(212, 149, 69, 0.45), rgba(92, 62, 34, 0.6));
}

.family-photo-frame {
    align-self: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(231, 191, 138, 0.4);
    box-shadow: var(--shadow-lg);
}

.family-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100%;
}

.small-print {
    color: rgba(248, 228, 199, 0.75);
    font-size: 0.84rem;
}

.panel-share {
    padding-top: clamp(2.5rem, 6vw, 4.4rem);
    padding-bottom: clamp(2.5rem, 6vw, 4.4rem);
}

.share-card {
    padding: clamp(1.4rem, 3.8vw, 2rem);
}

.share-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.share-btn {
    border: 1px solid rgba(240, 206, 156, 0.44);
    border-radius: 12px;
    background: rgba(34, 24, 16, 0.9);
    color: #f7ebda;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    font-family: inherit;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    cursor: pointer;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 223, 190, 0.66);
    background: rgba(57, 40, 25, 0.92);
}

.panel-guestbook::before {
    background: url("/images/cheetaprint-786458-overlay.jpg") center / 300px repeat;
}

.guestbook-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(1.15rem, 2.6vw, 2rem);
    align-items: start;
}

.guestbook-form-card {
    padding: clamp(1.2rem, 3vw, 1.8rem);
    position: sticky;
    top: 1rem;
}

.guestbook-form {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.52rem;
}

.guestbook-form label {
    color: #f3dcb8;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.guestbook-form input,
.guestbook-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(238, 208, 166, 0.3);
    background: rgba(10, 7, 6, 0.82);
    color: #fff1dc;
    padding: 0.72rem 0.8rem;
    font: inherit;
}

.guestbook-form textarea {
    resize: vertical;
    min-height: 110px;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
    outline: 2px solid rgba(220, 168, 90, 0.4);
    outline-offset: 1px;
}

.field-error,
.field-error-list {
    color: #ffd0a5;
    font-size: 0.8rem;
}

.field-error-list ul {
    margin: 0.3rem 0;
    padding-left: 1.2rem;
}

.submit-btn {
    margin-top: 0.45rem;
    border: 1px solid rgba(245, 216, 177, 0.45);
    border-radius: 999px;
    padding: 0.77rem 1.2rem;
    background: linear-gradient(100deg, rgba(210, 155, 82, 0.45), rgba(86, 57, 32, 0.54));
    color: #fff6eb;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(191, 138, 66, 0.32);
}

.guestbook-wall h3 {
    margin: 0;
    font-family: "Bodoni Moda", serif;
    font-size: clamp(1.65rem, 3.1vw, 2.3rem);
    font-weight: 600;
}

.guest-entry {
    margin-top: 0.85rem;
    padding: 1rem;
}

.guest-entry header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
}

.guest-entry h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #ffe5bf;
}

.guest-entry time {
    color: rgba(246, 224, 191, 0.66);
    font-size: 0.76rem;
}

.guest-entry p {
    margin: 0.45rem 0 0;
    color: #e9d7bf;
}

.guest-entry.empty {
    color: rgba(244, 217, 176, 0.82);
}

.entry-photo-grid {
    margin-top: 0.78rem;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.entry-photo-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid rgba(233, 196, 142, 0.38);
}

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].in-view {
    opacity: 1;
    transform: none;
}

@keyframes obituary-reveal {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes hint-pulse {
    0%,
    100% {
        opacity: 0.45;
        transform: translate(-50%, 0);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -5px);
    }
}

@media (max-width: 980px) {
    .about-grid,
    .uploads-grid,
    .guestbook-layout {
        grid-template-columns: 1fr;
    }

    .guestbook-form-card {
        position: static;
    }

    .share-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero h1 {
        font-size: clamp(2.1rem, 10vw, 4.7rem);
    }
}

@media (max-width: 640px) {
    .hero-content {
        margin-bottom: 2.2rem;
    }

    .eyebrow {
        letter-spacing: 0.3em;
    }

    .flash-message {
        left: 0.8rem;
        right: 0.8rem;
        text-align: center;
    }

    .share-grid {
        grid-template-columns: 1fr;
    }
}
