@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;
}

:root {
    --header-image-height: 280px;
    --header-total-height: 344px;
}

/* ========== 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%;
    font-family: 'RomanceA', 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);
}

.header-image-wrap {
    height: var(--header-image-height);
    overflow: hidden;
    position: relative;
    transition: height 0.08s linear;
}

.header-image-wrap img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 280px;
    transform: translate(-50%, -50%);
    object-fit: cover;
    display: block;
}

.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;
}

.page-shell {
    display: flex;
    justify-content: center;
}

.frame {
    position: relative;
    width: min(900px, 100%);
    margin-top: 20px;
}

@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;
}

/* ========== DECORATIVE IMAGES ========== */

.decor {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    max-width: 100%;
    height: auto;
}

.decor-top-left {
    top: 10px;
    left: 5px;
    width: 321px;
}

.decor-top-right {
    top: 10px;
    right: 0;
    width: 360px;
}

.decor-bottom-left {
    bottom: 155px;
    left: 100px;
    width: 205px;
}

.decor-bottom-right {
    bottom: 120px;
    right: 110px;
    width: 222px;
}

/* ========== 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%;
    }

    .header-image-wrap img {
        height: 280px;
    }

    .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%);
    }
}

/* ========== RSVP PAGE ========== */

.rsvp-hero {
    padding-bottom: 10px;
}

.rsvp-lookup,
.rsvp-editor {
    max-width: 760px;
    margin: 0 auto 30px;
}

.rsvp-form,
.rsvp-editor {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.rsvp-form label,
.rsvp-editor label {
    display: block;
    margin: 0 0 8px;
    font-size: 1rem;
    text-align: center;
}

.rsvp-form input,
.rsvp-editor input,
.rsvp-editor textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #d9c7bb;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
    color: #84624d;
    text-align: left;
}

.rsvp-form input:focus,
.rsvp-editor input:focus,
.rsvp-editor textarea:focus {
    outline: none;
    border-color: #ac846c;
    box-shadow: 0 0 0 2px rgba(172, 132, 108, 0.12);
}

.rsvp-editor textarea {
    resize: vertical;
    min-height: 110px;
}

#householdTitle {
    font-size: 5rem;
    text-align: center;
    margin: 20px 0 10px;
    line-height: 1;
}


.household-intro {
    text-align: center;
    margin-bottom: 24px;
}

.household-intro p {
    margin: 0 0 10px;
}

.guest-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #eaded6;
    border-radius: 18px;
    padding: 16px 18px;
    margin: 0 0 16px;
}

.guest-name {
    font-size: 1.15rem;
    margin-bottom: 12px;
    text-align: center;
}

.attendance-options {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.attendance-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.attendance-options input {
    width: auto;
    margin: 0;
}

.form-message {
    min-height: 1.4em;
    margin-top: 14px;
    text-align: center;
}

.form-message.error {
    color: #9b4b4b;
}

.form-message.success {
    color: #6d7f57;
}

@media (max-width: 768px) {
    .rsvp-lookup,
    .rsvp-editor,
    .rsvp-form {
        max-width: 100%;
    }
    
        #householdTitle {
        font-size: 3.6rem;
    }

    .attendance-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .guest-name {
        text-align: center;
    }
}