* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --yellow: #c9a34d;
    --yellow-dark: #9c7728;
    --emerald: #063f2c;
    --emerald-dark: #021f17;
    --emerald-soft: #0d5b40;
    --champagne: #f2e4c7;
    --ivory: #fffaf0;
    --ink: #17241e;
    --soft-ink: #5f665e;
    --paper: #fffaf0;
    --mist: #f3ead7;
    --line: rgba(6, 63, 44, 0.16);
    --shadow: 0 18px 44px rgba(2, 31, 23, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
}

a {
    color: inherit;
}

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

.page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--ivory) 0%, #efe2c8 100%);
}

/* HERO */
.hero {
    min-height: 72vh;
    background:
        linear-gradient(180deg, rgba(2, 31, 23, 0.28), rgba(2, 31, 23, 0.62)),
        linear-gradient(90deg, rgba(201, 163, 77, 0.24), rgba(6, 63, 44, 0.08), rgba(201, 163, 77, 0.22)),
        url('https://images.unsplash.com/photo-1719223852076-6981754ebf76?auto=format&fit=crop&fm=jpg&q=80&w=1800') center 45%/cover no-repeat;
    position: relative;
}

.hero::after,
.invite-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 10px;
    background: linear-gradient(90deg, var(--yellow-dark), var(--champagne), var(--yellow-dark));
}

.overlay {
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 20px 70px;
}

.hero-content {
    text-align: center;
    color: #ffffff;
    text-shadow: 0 3px 18px rgba(2, 31, 23, 0.56);
}

.date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 184px;
    min-height: 34px;
    margin-bottom: 10px;
    padding: 5px 24px;
    background: rgba(242, 228, 199, 0.94);
    color: var(--emerald);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: none;
    position: relative;
}

.date::before,
.date::after {
    content: "";
    position: absolute;
    top: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
}

.date::before {
    left: -17px;
    border-right: 17px solid rgba(242, 228, 199, 0.94);
}

.date::after {
    right: -17px;
    border-left: 17px solid rgba(242, 228, 199, 0.94);
}

.hero h1 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(62px, 12vw, 122px);
    font-weight: 400;
    line-height: 0.95;
}

.hero-subtitle {
    margin-top: 12px;
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 700;
    text-transform: uppercase;
}

/* NAV */
.nav {
    background: var(--emerald-dark);
    display: flex;
    justify-content: center;
    gap: clamp(20px, 5vw, 64px);
    padding: 15px 20px 13px;
    border-bottom: 9px solid var(--yellow);
    position: sticky;
    top: 0;
    z-index: 5;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: var(--ivory);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav a:hover,
.nav a.active {
    color: var(--yellow);
}

/* LAYOUT */
.section {
    position: relative;
    padding: clamp(58px, 8vw, 96px) 20px;
}

.section.alt {
    background: linear-gradient(180deg, #f5ecd9, #ead9b8);
}

.container {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.narrow {
    width: min(720px, 100%);
    margin: 0 auto;
}

.story {
    background: var(--ivory);
    text-align: center;
}

.story-content {
    max-width: 760px;
    margin: auto;
}

h1,
h2,
h3 {
    line-height: 1.12;
}

.section-title,
.story h2 {
    color: var(--ink);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 700;
    margin: 12px 0 18px;
    text-align: center;
    text-transform: uppercase;
}

.section-kicker,
.divider {
    color: var(--yellow-dark);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.section-title.align-left,
.section-kicker.align-left {
    text-align: left;
}

.intro {
    color: var(--soft-ink);
    text-align: center;
    font-size: 17px;
    margin-bottom: 30px;
}

.align-left {
    text-align: left;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-24 {
    margin-top: 24px;
}

.mb-24 {
    margin-bottom: 24px;
}

.story p,
.card p,
.form-card p,
.detail p {
    color: var(--soft-ink);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(28px, 6vw, 72px);
}

.photo-panel {
    min-height: 430px;
    background:
        linear-gradient(180deg, rgba(2, 31, 23, 0.04), rgba(2, 31, 23, 0.28)),
        url('https://images.unsplash.com/photo-1738669469338-801b4e9dbccf?auto=format&fit=crop&fm=jpg&q=80&w=1200') center/cover no-repeat;
    border: 10px solid var(--champagne);
    box-shadow: var(--shadow);
}

.detail-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.detail {
    border-top: 6px solid var(--yellow);
    padding-top: 22px;
}

.detail h3,
.card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    margin-bottom: 10px;
}

.registry-band {
    background:
        linear-gradient(180deg, rgba(6, 63, 44, 0.88), rgba(2, 31, 23, 0.96)),
        url('https://images.unsplash.com/photo-1738669469338-801b4e9dbccf?auto=format&fit=crop&fm=jpg&q=80&w=1600') center/cover no-repeat;
    text-align: center;
}

.registry-band .section-title,
.registry-band .intro {
    color: var(--ivory);
}

.registry-band .section-kicker {
    color: var(--champagne);
}

.registry-band .button.secondary {
    color: var(--ivory);
    border-color: var(--champagne);
}

/* BUTTONS AND FORMS */
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    background: var(--yellow);
    color: var(--emerald-dark);
    border: 0;
    border-radius: 0;
    padding: 12px 28px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 160ms ease, transform 160ms ease;
}

.button:hover,
button:hover {
    background: var(--yellow-dark);
    color: var(--ivory);
    transform: translateY(-1px);
}

.button.secondary {
    background: transparent;
    color: var(--emerald);
    border: 2px solid var(--emerald);
}

.field,
input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--ivory);
    color: var(--ink);
    font: inherit;
    padding: 12px 14px;
}

.copy-field {
    min-width: min(360px, 70vw);
    font-size: 13px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(180px, 0.8fr)) auto;
    gap: 18px;
    align-items: end;
}

.form-card,
.card,
.panel {
    background: rgba(255, 250, 240, 0.97);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow);
}

.form-card,
.panel {
    padding: clamp(24px, 4vw, 42px);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-actions .button,
.table-actions button {
    min-height: 38px;
    padding: 9px 14px;
}

.status {
    margin-top: 18px;
    padding: 14px 16px;
    background: #eadfca;
    color: var(--ink);
}

.status.error {
    background: #f8dfd9;
    color: #8a3026;
}

.status.success {
    background: #dbe9dc;
    color: var(--emerald);
}

.qr-result {
    margin-top: 24px;
    text-align: center;
}

.qr-result img {
    width: 250px;
    height: 250px;
    margin: 12px auto 0;
    border: 12px solid var(--champagne);
    box-shadow: var(--shadow);
}

.qr-actions {
    justify-content: center;
    margin-top: 18px;
}

/* DECOR */
.leaf {
    display: none;
}

/* ADMIN */
.admin-shell {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(239, 226, 200, 0.96)),
        linear-gradient(120deg, rgba(6, 63, 44, 0.08), rgba(201, 163, 77, 0.12));
    padding: 32px 20px;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-title {
    color: var(--ink);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(30px, 5vw, 44px);
    text-transform: uppercase;
}

.stat-card,
.card {
    padding: 22px;
}

.stat-value {
    display: block;
    color: var(--emerald-soft);
    font-size: 42px;
    line-height: 1;
    margin-top: 8px;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: var(--ivory);
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    white-space: nowrap;
}

.text-wrap {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
}

th {
    color: var(--ink);
    font-size: 12px;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    background: var(--mist);
    color: var(--ink);
    font-size: 14px;
}

.badge.yes,
.badge.ok {
    background: #dbe9dc;
    color: var(--emerald);
}

.badge.no {
    background: #f8dfd9;
    color: #8a3026;
}

/* INVITATION */
.invite-hero {
    min-height: 48vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 20px;
    background:
        linear-gradient(180deg, rgba(2, 31, 23, 0.16), rgba(2, 31, 23, 0.52)),
        linear-gradient(90deg, rgba(201, 163, 77, 0.26), rgba(6, 63, 44, 0.12), rgba(201, 163, 77, 0.2)),
        url('https://images.unsplash.com/photo-1719223852076-6981754ebf76?auto=format&fit=crop&fm=jpg&q=80&w=1800') center 45%/cover no-repeat;
    color: white;
    text-align: center;
    position: relative;
}

.invite-hero-content {
    max-width: 760px;
    text-shadow: 0 3px 18px rgba(2, 31, 23, 0.56);
}

.invite-hero h1 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(58px, 11vw, 112px);
    font-weight: 400;
    line-height: 0.95;
}

.invite-hero p {
    max-width: 560px;
    margin: 16px auto 0;
    font-size: clamp(16px, 2.4vw, 22px);
    font-weight: 700;
}

.invitation-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.invitation-summary-single {
    grid-template-columns: 1fr;
}

.invitation-summary div {
    border-top: 5px solid var(--yellow);
    background: linear-gradient(180deg, #fff7e8, #efe1c5);
    padding: 16px;
}

.invitation-summary span {
    display: block;
    color: var(--soft-ink);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.invitation-summary strong {
    display: block;
    margin-top: 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 21px;
}

/* SCAN */
#reader {
    width: min(420px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--ivory);
}

@media (max-width: 760px) {
    .hero {
        min-height: 66vh;
    }

    .nav {
        justify-content: flex-start;
        gap: 22px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .split,
    .detail-grid,
    .filter-grid,
    .invitation-summary,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .photo-panel {
        min-height: 300px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .actions .button,
    .actions button {
        width: 100%;
    }

    .admin-shell {
        padding: 22px 12px;
    }

    .form-card,
    .panel {
        padding: 20px;
    }

    table {
        min-width: 920px;
    }
}
