:root {
    color-scheme: light;
    font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Brand palette */
    --brand: #c07d97;
    --brand-strong: #ad7188;
    --brand-rgb: 63, 115, 100;
    --brand-strong-rgb: 40, 82, 71;

    /* Text colors */
    --ink: #1f2c32;
    --ink-rgb: 31, 44, 50;
    --ink-muted: #51646a;

    /* Surfaces */
    --surface-page: #e0deea;
    --surface-header: #cfd6e9d3;
    --surface-panel: #edeef3;
    --surface-panel-alt: #edeef3;
    --surface-card: #f4f7f8e6;

    /* Borders */
    --border-soft: #c6d3d8;
    --border-muted: #c4d1d7;
    --border-strong: #c9d3d8;
    --border-info: #c5d1d7;
    --border-table: #f3f3f3;

    /* Feedback */
    --success-bg: #caeaf5;
    --success-text: #10506a;
    --error-bg: #ffe1e7;
    --error-text: #9c1d32;

    /* Utility transparencies */
    --ink-divider: rgba(var(--ink-rgb), 0.08);
    --ink-outline: rgba(var(--ink-rgb), 0.35);
    --ink-outline-soft: rgba(var(--ink-rgb), 0.3);
    --ink-muted-soft: rgba(var(--ink-rgb), 0.65);
    --ink-muted-strong: rgba(var(--ink-rgb), 0.7);
    --brand-outline: rgba(var(--brand-rgb), 0.25);
    --brand-border: rgba(47, 86, 72, 0.22);
    --ink-veil: rgba(var(--ink-rgb), 0.05);

    /* Shadows */
    --shadow-soft: rgba(24, 44, 53, 0.1);
    --shadow-medium: rgba(22, 42, 53, 0.12);
    --shadow-deep: rgba(16, 32, 43, 0.12);
    --shadow-panel: rgba(8, 20, 26, 0.08);
    --shadow-card: rgba(8, 18, 24, 0.08);
    --shadow-row: rgba(8, 20, 26, 0.06);
    --shadow-pop: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface-panel-alt);
    --header-offset: 92px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

main {
    min-height: 80vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding: 0.5rem 5vw;
    background: var(--surface-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ink-divider);
}

.brand a {
    display: inline-flex;
    align-items: center;
}

.brand img {
    height: 100px;
    width: 120px;
    display: block;
}

.site-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.site-nav a {
    font-weight: 600;
}

.site-nav a:not(.cta) {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.site-nav .cta {
    padding: 0.45rem 1rem;
    border: 1px solid var(--brand);
    border-radius: 999px;
    background: transparent;
    color: var(--brand);
}

.site-nav .cta:hover,
.site-nav .cta:focus {
    background: transparent;
    border-color: var(--brand-strong);
    color: var(--brand-strong);
}


.hero {
    display: grid;
    grid-template-columns: minmax(250px, 1.1fr) minmax(250px, 0.9fr);
    min-height: 80vh;
}

.hero__photo {
    background-image: url('../img/photo.jpg');
    background-size: cover;
    background-position: center;
}

.hero__details {
    padding: clamp(3.5rem, 4vw + 1rem, 5rem) clamp(3rem, 6vw, 6rem);
    display: flex;
    flex-direction: column;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    background: var(--surface-panel);
    text-align: center;
    border-left: 1px solid var(--ink-divider);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 35px 60px var(--shadow-deep);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.75rem 3rem;
    border-radius: 45px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.85rem;
    border: 1px solid var(--brand-outline);
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 35px var(--shadow-medium);
}

.hero__weekday {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--ink-muted-soft);
}

.hero__day {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 5vw, 3.8rem);
    letter-spacing: 0.08em;
    text-transform: none;
}

.hero__year {
    font-size: 1.2rem;
    letter-spacing: 0.4em;
    color: var(--ink-muted-strong);
}

.hero__content {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero__content h1{
    margin-top:0px;
    margin-bottom:10px;
}

.hero__address {
    letter-spacing: 0.10em;
    font-size: 0.85rem;
    margin: 0;
}

.hero__schedule {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.25rem 1.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--brand-border);
    box-shadow: 0 18px 28px var(--shadow-soft);
    margin-top:20px;
}

.hero__schedule div {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 130px;
}

.schedule-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--ink-muted-soft);
    margin: 0;
}

.schedule-time {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    margin: 0;
}

.schedule-time__ampm {
    font-size: 0.55em;
    letter-spacing: 0.25em;
    margin-left: 0.35em;
    text-transform: uppercase;
    display: inline-block;
}

.hero__details::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: min(360px, 55vw);
    height: min(360px, 55vw);
    background: url('../img/border_topright.png') no-repeat;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
}

.hero__details h1 {
    font-family: 'Cormorant Garamond', serif;
    /*font-size: clamp(2.6rem, 5vw, 3.4rem);*/
    letter-spacing: 0.08em;
}

.hero__details .lede {
    max-width: 42ch;
    margin: 0 auto 1.5rem;
    color: var(--ink-muted-strong);
    font-size: 1rem;
    line-height: 1.7;
    display: none;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    display: none;
}

.button {
    background: var(--brand);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.button:hover {
    background: var(--brand-strong);
}

/* Ensure pointer cursor on interactive submit buttons */
button:hover,
input[type=submit]:hover,
.button:hover {
    cursor: pointer;
}

.text-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
}

/* Map link: underline only the text, not the emoji */
.map-link { text-decoration: none; }
.map-link__text { text-decoration: underline; }

.section-heading {
    text-align: center;
    padding: 3rem 5vw 1rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
    display: none;
}

.rsvp {
    background: var(--surface-panel);
    padding-bottom: 8rem;
    position: relative;
    z-index: 0;
    overflow: hidden;
    scroll-margin-top: 7em;
}

.rsvp::before {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    background: url('../img/border_bottomleft.png') no-repeat;
    background-size: contain;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.flash-wrapper {
    max-width: 620px;
    margin: 0 auto 1rem;
    padding: 0 1.5rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}

.flash--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.flash--error {
    background: var(--error-bg);
    color: var(--error-text);
}

.rsvp-form {
    max-width: 620px;
    margin: 0 auto;
    display: grid;
    gap: 1.25rem;
    padding: 0 1.5rem;
}

.rsvp-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
}

/* Inline checkbox style for staying night field */
.rsvp-form label.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}
.rsvp-form label.checkbox-field input[type=checkbox] {
    margin: 0;
    width: 1.15rem;
    height: 1.15rem;
}
.rsvp-form label.checkbox-field.is-disabled {
    opacity: 0.5;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
}

.info {
    background: var(--surface-panel-alt);
    padding-bottom: 1.5rem;
    min-height: calc(96.5vh - var(--header-offset));
    position: relative;
    overflow: hidden;
}
.info::after {
    content: "";
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    background: url('../img/border_bottomleft.png') no-repeat;
    background-size: contain;
    transform: scaleX(-1);
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
}

body {
    --header-offset: 92px;
}

.info--locked {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-locker {
    width: min(420px, 90vw);
    margin: 0 auto 4rem;
    background: var(--surface-card);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px var(--shadow-panel);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-locker label {
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-locker input {
    border-radius: 12px;
    border: 1px solid var(--border-muted);
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
}

.qa-grid {
    width: min(1100px, 90vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.qa-card {
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--surface-card);
    box-shadow: 0 12px 32px var(--shadow-card);
}

.qa-card h2 {
    margin-top: 0;
    font-family: 'Cormorant Garamond', serif;
}

.qa-card p {
    color: var(--ink-muted);
}

.qa-card a {
    color: var(--brand);
    text-decoration: underline;
    font-weight: 600;
}

.qa-card a:hover,
.qa-card a:focus {
    color: var(--brand-strong);
}

.bg-lilith {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    width: min(180px, 28vw);
    opacity: 0.25;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--ink-muted);
    border-top: 1px solid var(--ink-divider);
}

.admin-section {
    padding: 3rem 5vw 4rem;
}

.admin-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--surface-card);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-pop);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card label {
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-card input {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    font-size: 1rem;
}

.admin-table-wrapper {
    overflow-x: auto;
    width: min(1100px, 95vw);
    margin: 0 auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-pop);
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-table);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-empty {
    text-align: center;
    color: var(--ink-muted);
}

.info-admin-form {
    width: min(900px, 90vw);
    margin: 0 auto;
}

.info-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.info-admin-row {
    background: var(--surface-card);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px var(--shadow-row);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.info-admin-row label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 600;
}

.info-admin-row input,
.info-admin-row textarea {
    border-radius: 12px;
    border: 1px solid var(--border-info);
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 1rem;
}

.info-admin-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.button--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink-outline-soft);
}

.button--ghost:hover {
    background: var(--ink-veil);
}

.button--small {
    align-self: flex-start;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero__photo {
        min-height: 36vh;
    }
    /* Keep header inline on small screens */
    .site-header {
        flex-direction: row;
    }
    .site-nav {
        width: auto;
        justify-content: flex-end;
    }
    .info {
        padding-bottom: 24rem; /* doubled breathing room on mobile */
    }
}
