:root {
    --bg: #fff8ef;
    --bg-soft: #f5e9dc;
    --card: #ffffff;
    --text: #3f2d24;
    --muted: #7c6557;
    --primary: #7b4f35;
    --primary-dark: #573420;
    --accent: #d9b88f;
    --border: #eadbca;
    --shadow: 0 18px 45px rgba(71, 45, 28, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

img,
video {
    max-width: 100%;
}

button {
    font-family: inherit;
}

.navbar {
    width: 100%;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 5;
}

.inner-nav {
    background: #fff;
    box-shadow: 0 8px 25px rgba(70, 45, 30, .08);
    position: sticky;
    top: 0;
}

.brand {
    text-decoration: none;
    font-weight: 900;
    color: var(--primary-dark);
    font-size: 22px;
}

.nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: 700;
    color: var(--text);
    padding: 9px 12px;
    border-radius: 999px;
}

.nav-links a:hover {
    background: rgba(123, 79, 53, .1);
}

.admin-link {
    opacity: .55;
}

.hero {
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ec, #f2dfc9);
}

.hero-bg::before,
.hero-bg::after {
    content: "🐾";
    position: absolute;
    font-size: 220px;
    opacity: .06;
    transform: rotate(-18deg);
}

.hero-bg::before {
    top: 120px;
    left: -40px;
}

.hero-bg::after {
    bottom: -60px;
    right: 40px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 42px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    background: rgba(123, 79, 53, .09);
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.hero h1,
.page-title h1,
.album-hero h1 {
    font-size: clamp(42px, 7vw, 84px);
    line-height: .95;
    margin: 18px 0 16px;
    color: var(--primary-dark);
}

.hero h1 small {
    display: block;
    font-size: clamp(22px, 3vw, 34px);
    color: var(--muted);
    margin-top: 10px;
}

.dates {
    font-size: 18px;
    color: var(--muted);
    font-weight: 700;
}

.hero-message {
    font-size: 20px;
    max-width: 650px;
    color: var(--text);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.link-more {
    display: inline-block;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 900;
    transition: .2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    box-shadow: 0 12px 24px rgba(123, 79, 53, .25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-dark);
    padding: 14px 20px;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #fff3e4;
}

.link-more {
    color: var(--primary);
    padding: 10px 0;
}

.hero-photo-wrap {
    display: flex;
    justify-content: center;
}

.hero-photo {
    width: min(420px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 42px;
    border: 12px solid rgba(255,255,255,.7);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
    cursor: pointer;
    padding: 0;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sections */

.section {
    padding: 74px 0;
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
    text-align: center;
}

.intro-section h2,
.section h2,
.cta-section h2 {
    font-size: clamp(30px, 4vw, 48px);
    margin: 12px 0;
    color: var(--primary-dark);
}

.intro-section p,
.page-title p,
.cta-section p {
    font-size: 19px;
    color: var(--muted);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin-bottom: 0;
}

/* Memory cards */

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.memory-card {
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(123, 79, 53, .08);
}

.memory-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: none;
    background: #eadbca;
    cursor: pointer;
    display: block;
    position: relative;
    overflow: hidden;
}

.memory-media img,
.memory-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.memory-media:hover img,
.memory-media:hover video {
    transform: scale(1.04);
}

.play-badge {
    position: absolute;
    inset: auto 14px 14px auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.youtube-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #7b4f35, #3f2d24);
    color: white;
    font-weight: 900;
    font-size: 20px;
}

.memory-body {
    padding: 18px;
}

.memory-body h3 {
    margin: 0 0 8px;
    color: var(--primary-dark);
}

.meta {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

/* Albums */

.album-section {
    background: var(--bg-soft);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.album-card {
    background: white;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: .2s ease;
}

.album-card:hover {
    transform: translateY(-3px);
}

.album-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #f4eadf;
}

.album-info {
    padding: 18px;
}

.album-info h3 {
    margin: 0 0 8px;
    color: var(--primary-dark);
}

.album-info p {
    color: var(--muted);
    margin: 5px 0;
}

.album-info span {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary);
    font-weight: 900;
}

/* CTA */

.cta-section {
    padding: 74px 0;
    background: linear-gradient(135deg, #7b4f35, #3f2d24);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.cta-section p {
    color: rgba(255,255,255,.82);
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-dark);
}

/* Pages */

.page-main {
    min-height: 70vh;
}

.page-title {
    max-width: 820px;
    margin-bottom: 34px;
}

.album-hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff7ec, #f2dfc9);
}

.album-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 34px;
    align-items: center;
}

.album-cover {
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
}

.album-cover img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

/* Timeline */

.timeline {
    position: relative;
    display: grid;
    gap: 24px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 154px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
}

.timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 32px;
    position: relative;
}

.timeline-date {
    color: var(--primary);
    font-weight: 900;
    padding-top: 20px;
    text-align: right;
}

.timeline-date small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 700;
}

.timeline-item::before {
    content: "🐾";
    position: absolute;
    left: 143px;
    top: 18px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 13px;
    z-index: 1;
}

/* Empty */

.empty-box {
    background: white;
    border: 1px dashed var(--border);
    color: var(--muted);
    padding: 26px;
    border-radius: 22px;
    grid-column: 1 / -1;
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
}

.modal.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
}

.modal-box {
    position: relative;
    z-index: 2;
    width: min(960px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    margin: 20px auto;
    background: #111;
    color: white;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.16);
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 3;
}

.modal-box h3 {
    margin: 0 48px 14px 0;
}

.modal-box img,
.modal-box video,
.modal-box iframe {
    width: 100%;
    max-height: 78vh;
    border-radius: 16px;
    display: block;
    object-fit: contain;
    background: black;
}

.modal-box iframe {
    aspect-ratio: 16 / 9;
    border: none;
}

/* Footer */

.footer {
    background: #3f2d24;
    color: white;
    text-align: center;
    padding: 26px;
}

/* Responsive */

@media (max-width: 850px) {
    .navbar {
        padding: 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
    }

    .hero-content,
    .album-hero-grid {
        grid-template-columns: 1fr;
        padding-top: 34px;
    }

    .hero-photo {
        border-radius: 30px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline::before {
        left: 13px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-left: 38px;
    }

    .timeline-date {
        text-align: left;
        padding-top: 0;
    }

    .timeline-item::before {
        left: 0;
        top: 2px;
    }
}

@media (max-width: 520px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        text-align: center;
        width: 100%;
    }

    .album-card img {
        height: 190px;
    }
}