@font-face {
    font-family: "Amalfi Coast";
    src: url("assets/fonts/Amalfi-Coast.ttf.woff") format("woff");
    font-display: swap;
}

:root {
    --ink: #304338;
    --leaf: #5b7343;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Work Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--ink); font-family: var(--serif); }
a { color: inherit; }

.site-nav {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 2.5rem;
    font: 500 .68rem/1.3 var(--sans);
    letter-spacing: .13em;
    text-transform: uppercase;
}
.site-nav a { padding-bottom: .18rem; border-bottom: 1px solid currentColor; text-decoration: none; }

.flower-study {
    position: relative;
    display: grid;
    min-height: 100vh;
    align-items: center;
    padding: 6rem clamp(1.25rem, 7vw, 7rem);
    overflow: hidden;
    background: #f1ebdd;
}
.flower-study::before {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(ellipse at 15% 80%, rgba(214, 166, 120, .2), transparent 45%),
        radial-gradient(ellipse at 90% 10%, rgba(132, 145, 106, .12), transparent 35%);
}
.flower-art {
    position: absolute;
    z-index: 0;
    left: -2.5rem;
    bottom: -9rem;
    width: min(59vw, 740px);
    max-height: 105vh;
    object-fit: contain;
    object-position: left bottom;
    filter: drop-shadow(0 20px 22px rgba(52, 54, 38, .12));
}
.flower-card {
    position: relative;
    z-index: 1;
    width: min(100%, 590px);
    margin: 1.5rem 2vw 1.5rem auto;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: rgba(251, 248, 240, .96);
    box-shadow: 0 18px 48px rgba(69, 62, 47, .1);
}
.invitation .flower-card h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45em;
    margin: .35rem 0 .25rem;
    color: var(--leaf);
    text-align: center;
    font: 400 clamp(3.2rem, 5.5vw, 4.7rem)/1 "Amalfi Coast", cursive;
    letter-spacing: 0;
}
.invitation .flower-card h1 > span { display: block; color: inherit; font-size: inherit; font-style: normal; }
.invitation .flower-card h1 > .couple-ampersand { color: #a56e57; font: italic .42em/1 var(--serif); }
.flower-date { margin: 1.35rem 0 0; text-align: center; font: 500 .76rem/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.invitation .save-the-date-label {
    margin: 1.05rem 0 .25rem;
    color: var(--leaf);
    text-align: center;
    font: 500 1rem/1.4 var(--sans);
    letter-spacing: .16em;
    text-transform: uppercase;
}
.invitation .save-the-date-date {
    margin-top: .25rem;
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    letter-spacing: .16em;
}
.flower-rule { width: 3rem; height: 1px; margin: 1.2rem auto; background: #b57a5e; }
.response-form { margin-top: 1.35rem; }
.invite-controls { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: .75rem; }
.invite-controls > div { min-width: 0; }
.response-form label { display: block; margin: 0 0 .35rem; font: 500 1rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.response-form input,
.response-form textarea {
    width: 100%;
    min-height: 2.9rem;
    padding: .5rem .15rem;
    border: 0;
    border-bottom: 1px solid #b8b4a6;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: 1.25rem var(--serif);
}
.response-form textarea { min-height: 3.5rem; resize: vertical; }
.response-form input::placeholder,
.response-form textarea::placeholder { color: #9a9a8c; }
.response-form input:focus,
.response-form textarea:focus { outline: 0; border-bottom-color: #a56e57; }
.response-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
    padding: .75rem 1rem;
    border: 0;
    background: var(--leaf);
    color: #fffdf5;
    font: 500 .68rem/1.3 var(--sans);
    letter-spacing: .15em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
}
.invite-controls button:disabled { cursor: wait; opacity: .65; }
.confirmation-note { margin: .8rem 0 0; color: #8b8a7d; text-align: center; font: .6rem/1.4 var(--sans); letter-spacing: .06em; }
.form-error { margin: .8rem 0 0; color: #a66565; text-align: center; font: 500 .78rem/1.4 var(--sans); }
.thankyou-heading { margin: 1.2rem 0 .4rem; color: #a56e57; text-align: center; font-size: 2.1rem; line-height: 1; }
.thankyou-message { max-width: 24rem; margin: 0 auto; color: #5d655b; text-align: center; font-size: 1.2rem; line-height: 1.4; }

.not-found .not-found-card { padding: clamp(2.25rem, 5vw, 4rem); text-align: center; }
.not-found-code {
    margin: 0;
    color: #a56e57;
    font: 400 clamp(4rem, 9vw, 6rem)/.85 var(--serif);
    letter-spacing: .08em;
}
.not-found .not-found-card h1 {
    margin: 1rem 0 .75rem;
    color: #a56e57;
    font: 400 clamp(2.15rem, 4vw, 3.25rem)/1.1 var(--serif);
}
.not-found-message { max-width: 22rem; margin: 0 auto; color: #5d655b; font-size: 1.2rem; line-height: 1.45; }
.not-found .flower-rule { margin: 1.35rem auto; }
.not-found-link { width: min(100%, 22rem); margin: 0 auto; }

@media (min-width: 761px) and (max-width: 1199px) {
    .not-found .flower-art { left: -3rem; bottom: -6rem; width: min(62vw, 580px); }
    .not-found .flower-card { width: min(75%, 590px); margin: 1.5rem 2vw 1.5rem auto; }
}

@media (min-width: 1200px) {
    .flower-study {
        grid-template-columns: minmax(0, 1fr) minmax(0, 590px);
        column-gap: clamp(2rem, 4vw, 4.5rem);
        padding: 6rem max(2rem, calc((100vw - 1360px) / 2));
    }
    .flower-art {
        position: relative;
        left: auto;
        bottom: auto;
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        width: 100%;
        height: min(78vh, 840px);
        max-height: none;
        object-position: center;
    }
    .flower-card {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }
    .site-nav {
        left: 50%;
        width: min(calc(100% - 4rem), 1360px);
        padding: 1.25rem 0;
        transform: translateX(-50%);
    }
}

@media (max-width: 760px) {
    .site-nav { padding: .85rem .9rem; }
    .invitation { min-height: 100svh; align-items: start; padding: calc(5.5rem + env(safe-area-inset-top)) .9rem calc(1.4rem + env(safe-area-inset-bottom)); }
    .invitation .flower-art { left: 50%; top: calc(env(safe-area-inset-top) + 3.5rem); bottom: auto; transform: translateX(-50%); width: min(96vw, 460px); max-height: 45svh; object-position: center; opacity: .9; }
    .invitation .flower-card { width: 100%; margin: max(8.5rem, 30svh) auto 0; padding: 1.45rem 1.1rem; }
    .invitation .flower-card h1 { margin: .35rem 0 .2rem; font-size: clamp(2.4rem, 10vw, 3rem); line-height: 1; }
    .invitation .flower-date { margin-top: .8rem; font-size: .68rem; }
    .invitation .save-the-date-label { margin-top: .8rem; font-size: .9rem; }
    .invitation .save-the-date-date { margin-top: .2rem; font-size: .95rem; letter-spacing: .16em; }
    .invitation .response-form label { font-size: .9rem; }
    .invitation .flower-rule { margin: .95rem auto; }
    .invitation .response-form { margin-top: 1rem; }
    .invitation .invite-controls { gap: .65rem; }
    .invitation .response-form input { min-height: 2.9rem; font-size: 1.25rem; }
    .invitation .response-form textarea { min-height: 3.5rem; font-size: 1.25rem; }
    .invitation .thankyou-heading { font-size: 1.9rem; }
    .invitation .thankyou-message { font-size: 1.1rem; }
    .not-found { min-height: 100svh; align-items: start; padding: calc(5.5rem + env(safe-area-inset-top)) .9rem calc(1.4rem + env(safe-area-inset-bottom)); }
    .not-found .flower-art { left: 50%; top: calc(env(safe-area-inset-top) + 3.5rem); bottom: auto; transform: translateX(-50%); width: min(96vw, 460px); max-height: 42svh; object-position: center; opacity: .9; }
    .not-found .flower-card { width: 100%; margin: max(8rem, 30svh) auto 0; padding: 2rem 1.2rem; }
    .not-found-code { font-size: clamp(3.7rem, 16vw, 4.5rem); }
    .not-found .not-found-card h1 { margin: .75rem 0; font-size: clamp(2.15rem, 9vw, 2.8rem); }
    .not-found-message { font-size: 1.1rem; }
    .not-found-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
