@font-face {
    font-family: 'RomanceA';
    src: url('../fonts/RomanceA.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Maratre';
    src: url('../fonts/maratre.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DelayedLove';
    src: url('../fonts/delayed-love.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'MilkChoco';
    src: url('../fonts/Milk-Choco.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}


/* ========== PAGE ROOT ========== */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: #fdfaf7;
    background-image: url("https://i.postimg.cc/xdgzQd6x/floralpatternsmooth500.png");
    background-repeat: repeat;
    background-position: top left;
    background-size: 500px 500px;
    background-attachment: fixed;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'RomanceA', 'Maratre', system-ui, serif;
    color: #84624d;
    text-align: center;
}

/* ========== TYPOGRAPHY ========== */

h1, h2 {
    font-family: 'Maratre', serif;
    font-weight: normal;
    margin-top: 0;
}

h1 {
    font-size: 8rem;
    margin: 40px 0 10px;
    line-height: 1;
}

h2 {
    font-size: 6rem;
    margin: 40px 0 20px;
    line-height: 1;
}

.subtitle {
    font-size: 1.2rem;
    margin: 10px 0 10px;
}

.date-location {
    font-size: 1.1rem;
    margin: 0 0 30px;
    color: #84624d;
}

.amp {
    font-family: 'DelayedLove', serif;
    text-shadow:
        0.4px 0 currentColor,
        -0.4px 0 currentColor,
        0 0.4px currentColor,
        0 -0.4px currentColor,
        0.4px 0.4px currentColor,
        -0.4px -0.4px currentColor,
        0.4px -0.4px currentColor,
        -0.4px 0.4px currentColor;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER ========== */

.site-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(253, 250, 247, 0.96);
}

:root {
    --header-total-height: 64px;
}

.main-nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    background: rgba(253, 250, 247, 0.96);
    padding: 0 12px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

.main-nav a {
    margin: 0 20px;
    text-decoration: none;
    color: #84624d;
    font-size: 1.1rem;
    transition: 0.3s ease;
}

.main-nav a:hover {
    color: #9d8272;
}

/* ========== PAGE LAYOUT ========== */

.page-background {
    background: transparent;
    padding: 40px 20px 80px;
    padding-top: calc(var(--header-total-height) + 20px);
    min-height: 100vh;
}

.title-panel {
    display: inline-block;
    position: relative;
    margin: 0 auto 30px;
}

.title-panel-inner {
    position: relative;
    z-index: 1;
    margin: 9px;
    background: rgba(253, 250, 247, 0.96);
    padding: 8px 35px;
    box-shadow: 0 0 24px rgba(173, 137, 115, 0.5);
}

.title-panel h2 {
    margin: 10px 0;
}

/* center it properly */
.page-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.frame {
    position: relative;
    width: min(1200px, 90%);
    margin-top: 20px;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 28px;
    padding: 30px;
}

/* POLAROID CARD */

.polaroid {
    --tilt: 0deg;
    background: white;
    padding: 10px;
    box-shadow: 0 0 24px rgba(173, 137, 115, 0.5);
    border: 1px solid #e6d8cc;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    transform: rotate(var(--tilt));
}

.polaroid:hover {
    transform: rotate(calc(var(--tilt) - 1deg)) scale(1.05);
}

.polaroid img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

/* THIS is the fixed bottom */
.caption {
    margin: 8px 0 0;
    padding: 0;
    height: 2.2rem;
    line-height: 1.1;
    overflow: hidden;
    text-align: center;
    font-size: 2rem;
    font-family: 'MilkChoco', sans-serif;
    white-space: nowrap;
    text-overflow: ellipsis;
}



.polaroid:nth-child(odd) {
    --tilt: 1deg;
}

.polaroid:nth-child(even) {
    --tilt: -1deg;
}


.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    background: white;
    padding: 12px 12px 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.lightbox-media {
    display: block;
    margin: 0 auto;
}

#lightbox-img {
    display: block;
    width: auto;
    height: auto;
    margin: 0 auto;
}

#lightbox-caption {
    display: block;
    margin: 10px 0 0;
    padding: 0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    box-sizing: border-box;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(253, 250, 247, 0.9);
    border: none;
    font-size: 2rem;
    padding: 10px 16px;
    cursor: pointer;
    color: #84624d;
    z-index: 2;
}

.lightbox-content .prev {
    left: -56px;
}

.lightbox-content .next {
    right: -56px;
}



@media (max-width: 768px) {
    .frame {
        margin-top: 420px;
        margin-bottom: 140px;
    }
        .amp {
        display: block;
        line-height: 0.8;
        margin: 0.05em 0;
    }
}

/* ========== PANEL / CONTENT ========== */

.content-column {
    position: relative;
    z-index: 1;
    margin: 9px;
    box-sizing: border-box;
}

.content-panel {
    position: relative;
    z-index: 1;
    background: rgba(253, 250, 247, 0.96);
    padding: 20px 0 40px;
    box-shadow: 0 0 24px rgba(173, 137, 115, 0.5);
    box-sizing: border-box;
    overflow: hidden;
}

section {
    position: relative;
    z-index: 6;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* ========== BUTTONS ========== */

.home-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: #ac846c;
    color: white;
    text-decoration: none;
    transition: 0.3s ease;
}

.button:hover {
    opacity: 0.9;
}

.button-outline {
    background: transparent;
    border: 1px solid #ac846c;
    color: #ac846c;
}


/* ========== PIXEL BORDER ========== */

.frame-corner,
.frame-edge {
    position: absolute;
    z-index: 7;
    pointer-events: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.frame-corner {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: 16px 16px;
}

.corner-tl {
    top: 0;
    left: 0;
    background-image: url("https://i.postimg.cc/9Q0MYXWy/topleft.png");
}

.corner-tr {
    top: 0;
    right: 0;
    background-image: url("https://i.postimg.cc/0yjQ058Y/topright.png");
}

.corner-bl {
    bottom: 0;
    left: 0;
    background-image: url("https://i.postimg.cc/GhqtDTnW/bottomleft.png");
}

.corner-br {
    bottom: 0;
    right: 0;
    background-image: url("https://i.postimg.cc/vH3TnxdR/bottomright.png");
}

.edge-top,
.edge-bottom {
    left: 16px;
    width: calc(100% - 32px);
    height: 9px;
    background-repeat: repeat-x;
    background-size: 8px 9px;
}

.edge-top {
    top: 0;
    background-image: url("https://i.postimg.cc/Wb2GwjR1/edgetop.png");
}

.edge-bottom {
    bottom: 0;
    background-image: url("https://i.postimg.cc/J733X0Ft/edgebottom.png");
}

.edge-left,
.edge-right {
    top: 16px;
    height: calc(100% - 32px);
    width: 9px;
    background-repeat: repeat-y;
    background-size: 9px 8px;
}

.edge-left {
    left: 0;
    background-image: url("https://i.postimg.cc/DfQQG0Nz/edgeleft.png");
}

.edge-right {
    right: 0;
    background-image: url("https://i.postimg.cc/QNgg7CzK/edgeright.png");
}

/* ========== MOBILE ========== */

@media (max-width: 768px) {
    html, body {
        background-size: 250px 250px;
    }

    .site-header {
        width: 100%;
    }


    .main-nav {
        height: auto;
        padding: 16px 10px;
        gap: 10px 12px;
    }

    .main-nav a {
        margin: 0 12px;
        font-size: 1rem;
    }

    .page-background {
        padding: 20px 10px 40px;
    }


    .content-column {
        margin: 9px;
    }

    .content-panel {
        padding: 16px 0 24px;
    }

    section {
        max-width: none;
        padding: 24px 14px;
    }

    h1 {
        font-size: 4.8rem;
        line-height: 0.95;
        margin: 20px 0 10px;
    }

    h2 {
        font-size: 3.8rem;
        line-height: 1;
        margin: 20px 0 16px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .date-location {
        font-size: 0.95rem;
    }

    .home-actions {
        flex-direction: column;
        align-items: center;
    }

    .button {
        width: min(240px, 100%);
        box-sizing: border-box;
    }

    .decor-top-left {
        width: min(72vw, 160px);
        top: 5px;
        left: 33%;
        transform: translateX(-50%);
    }

    .decor-top-right {
        width: min(72vw, 180px);
        top: 170px;
        left: 74%;
        right: auto;
        transform: translateX(-50%);
    }

    .decor-bottom-left {
        width: min(42vw, 150px);
        top: 430px;
        bottom: auto;
        left: 18%;
        transform: translateX(-50%);
    }

    .decor-bottom-right {
        width: min(42vw, 150px);
        top: 430px;
        bottom: auto;
        left: 82%;
        right: auto;
        transform: translateX(-50%);
    }
}