:root {
    --ink: #1a1a1a;
    --gold: #c9a24e;
    --ivory: #f7f3ec;
    --paper: #fffaf1;
    --moss: #3f534d;
    --line: rgba(201, 162, 78, 0.72);
    --soft-line: rgba(26, 26, 26, 0.12);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--ivory);
    font-family: "Cormorant Garamond", Georgia, serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(26, 26, 26, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 26, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    justify-items: center;
    gap: 4px;
    width: min(940px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 12px;
    background: rgba(247, 243, 236, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-ornament {
    display: block;
    width: min(340px, 76vw);
    height: 48px;
    object-fit: cover;
    object-position: center 48%;
}

.site-brand,
.site-nav a {
    color: var(--ink);
    text-decoration: none;
}

.site-brand {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34em;
    align-items: baseline;
    justify-content: center;
    font-family: "Playfair Display", Didot, "Bodoni 72", serif;
    font-size: clamp(1.08rem, 2vw, 1.46rem);
    text-transform: uppercase;
    line-height: 1.1;
}

.site-brand span:nth-child(2) {
    color: var(--gold);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 9px;
    border-bottom: 1px solid transparent;
    font-size: 1.08rem;
}

.site-nav a:hover,
.site-nav a.is-active {
    border-color: var(--gold);
    color: var(--moss);
}

.page-shell {
    position: relative;
    width: min(960px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(34px, 6vw, 64px) 0 64px;
}

.page-shell-form {
    width: min(680px, calc(100% - 32px));
}

.page-shell-centered {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
}

.page-intro {
    display: grid;
    justify-items: center;
    text-align: center;
}

.page-intro.compact {
    margin-bottom: 22px;
}

.deco-mark {
    width: 96px;
    height: 34px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
}

.deco-mark::before,
.deco-mark::after,
.deco-mark span {
    content: "";
    display: block;
    background: var(--gold);
}

.deco-mark::before,
.deco-mark::after {
    width: 100%;
    height: 1px;
}

.deco-mark span {
    width: 24px;
    height: 24px;
    margin: -1px 0;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold);
    font-family: "Playfair Display", Didot, serif;
    text-transform: uppercase;
    font-size: 0.88rem;
}

h1,
h2 {
    margin: 0;
    font-family: "Playfair Display", Didot, "Bodoni 72", serif;
    font-weight: 500;
    line-height: 1.08;
}

h1 {
    max-width: 640px;
    font-size: clamp(1.78rem, 3.3vw, 2.55rem);
}

h1 span {
    color: var(--gold);
}

.lead {
    max-width: 560px;
    margin: 16px auto 0;
    font-size: clamp(1.14rem, 2vw, 1.34rem);
    line-height: 1.42;
}

.detail-list,
.quiet-panel,
.thank-you {
    background: rgba(255, 250, 241, 0.5);
    border: 1px solid var(--line);
}

.detail-list,
.quiet-panel {
    margin-top: 34px;
    padding: clamp(22px, 3vw, 32px);
}

dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
    margin: 0;
}

dt {
    color: var(--gold);
    font-family: "Playfair Display", Didot, serif;
    text-transform: uppercase;
    font-size: 0.86rem;
}

dd {
    margin: 5px 0 0;
    font-size: 1.18rem;
    line-height: 1.32;
}

.primary-link,
.secondary-link,
button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border: 1px solid var(--gold);
    font: inherit;
    font-size: 1.02rem;
    text-decoration: none;
    padding: 9px 18px;
    cursor: pointer;
}

.primary-link,
button {
    margin-top: 24px;
    background: var(--ink);
    color: var(--ivory);
}

.secondary-link {
    color: var(--ink);
    background: transparent;
}

.primary-link:hover,
.secondary-link:hover,
button:hover {
    border-color: var(--moss);
    color: var(--ivory);
    background: var(--moss);
}

.rsvp-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    padding: clamp(22px, 3vw, 30px);
    background: rgba(255, 250, 241, 0.32);
    border: 1px solid var(--line);
}

.form-field {
    display: grid;
    gap: 5px;
}

.form-field-attendance,
.additional-persons,
.form-field-dietary_notes,
.form-field-message {
    grid-column: 1 / -1;
}

.additional-persons {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.additional-persons-heading {
    max-width: 520px;
}

.additional-persons h2 {
    font-size: clamp(1.28rem, 2.2vw, 1.65rem);
}

.additional-persons p {
    margin: 6px 0 0;
    font-size: 1.02rem;
    line-height: 1.35;
}

.additional-person-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.additional-person {
    display: grid;
    grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.person-label {
    margin: 0;
    padding-bottom: 10px;
    color: var(--gold);
    font-family: "Playfair Display", Didot, serif;
    text-transform: uppercase;
    font-size: 0.86rem;
}

label {
    font-size: 0.98rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(26, 26, 26, 0.24);
    background: rgba(255, 250, 241, 0.76);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.25;
    padding: 9px 10px;
    border-radius: 0;
}

input:focus,
select:focus,
textarea:focus {
    outline: 1px solid var(--moss);
    border-color: var(--moss);
}

.form-field-attendance > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.form-field-attendance label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-field-attendance input {
    width: auto;
}

.errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #8a2d2b;
    font-size: 1rem;
}

.quiet-panel {
    max-width: 760px;
    margin: 48px auto 0;
}

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

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.link-row .primary-link {
    margin-top: 0;
}

.thank-you {
    width: min(640px, 100%);
}

.deco-frame {
    position: relative;
    min-height: 340px;
    padding: clamp(30px, 6vw, 52px);
    border: 1px solid var(--line);
    outline: 1px solid rgba(201, 162, 78, 0.46);
    outline-offset: -8px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.corner {
    position: absolute;
    width: 42px;
    height: 42px;
    border-color: var(--gold);
    opacity: 0.9;
}

.corner::before,
.corner::after {
    content: "";
    position: absolute;
    border: 1px solid;
    border-color: inherit;
}

.corner-top-left {
    top: 12px;
    left: 12px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.corner-top-right {
    top: 12px;
    right: 12px;
    border-top: 1px solid;
    border-right: 1px solid;
}

.corner-bottom-left {
    bottom: 12px;
    left: 12px;
    border-bottom: 1px solid;
    border-left: 1px solid;
}

.corner-bottom-right {
    right: 12px;
    bottom: 12px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.corner::before {
    inset: 7px;
}

.corner::after {
    inset: 14px;
}

.thank-you h1 {
    font-size: clamp(3rem, 9vw, 6rem);
}

.thank-you p {
    margin: 0;
    font-size: 1.42rem;
}

.thank-you a {
    color: var(--ink);
}

@media (max-width: 820px) {
    .site-header {
        position: static;
        gap: 14px;
    }

    .site-brand {
        justify-content: center;
        text-align: center;
    }

    .site-nav {
        justify-content: center;
    }

    .page-shell,
    .page-shell-form {
        width: min(100% - 24px, 660px);
        padding-top: 40px;
    }

    .rsvp-form,
    dl,
    .quiet-panel dl {
        grid-template-columns: 1fr;
    }

    .primary-link,
    .secondary-link,
    button {
        width: 100%;
    }

    .form-field-attendance > div {
        display: grid;
    }

    .additional-person {
        grid-template-columns: 1fr;
        padding-top: 16px;
        border-top: 1px solid var(--soft-line);
    }
}

@media (max-width: 460px) {
    .site-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-nav a {
        justify-content: center;
    }

    h1 {
        font-size: clamp(1.72rem, 9vw, 2.4rem);
    }
}
