:root {
    --bg: #ffffff;
    --surface: #f6f6f6;
    --line: #dddddd;
    --text: #111111;
    --muted: #5e5e5e;
    --dark: #0f0f0f;
    --light: #ffffff;
    --radius: 18px;
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a {
    color: inherit;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 0, 0, 0.06), transparent 35%),
        radial-gradient(circle at 82% 78%, rgba(0, 0, 0, 0.05), transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
}

.hero-inner {
    width: min(900px, 100%);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(28px, 6vw, 70px);
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    box-shadow: var(--shadow);
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.74rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.kicker-light {
    color: rgba(255, 255, 255, 0.7);
}

.hero-title,
.section-title,
.book-title {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.2px;
}

.hero-title {
    font-size: clamp(2.4rem, 9vw, 5.1rem);
    line-height: 1.02;
    margin-bottom: 14px;
}

.hero-title span {
    display: inline-block;
    margin: 0 8px;
    color: #333333;
}

.hero-date {
    font-size: 1rem;
    color: #2f2f2f;
    margin-bottom: 16px;
}

.hero-copy {
    max-width: 620px;
    margin: 0 auto 26px;
    color: var(--muted);
}

.wrap {
    width: min(1120px, calc(100% - 42px));
    margin: 0 auto;
}

.section {
    padding: clamp(68px, 9vw, 112px) 0;
}

.section-light {
    background: var(--bg);
}

.section-dark {
    background: var(--dark);
    color: var(--light);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 3.6vw, 36px);
}

.panel-outline {
    background: var(--bg);
    border: 1px solid #bdbdbd;
}

.person-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    margin-bottom: 4px;
}

.person-block p {
    color: var(--muted);
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 16px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 26px;
}

.section-title {
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.18;
    margin-bottom: 10px;
}

.section-title-light {
    color: var(--light);
}

.section-copy {
    color: var(--muted);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
}

.event-card {
    background: #171717;
    border: 1px solid #2f2f2f;
    border-radius: var(--radius);
    padding: 24px;
}

.event-card h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    font-size: 1.45rem;
}

.event-card ul {
    list-style: none;
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
}

.event-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.count-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}

.count-box {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
}

.count-box strong {
    display: block;
    font-size: clamp(1.7rem, 4.8vw, 2.6rem);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.count-box span {
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}

.photo-item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #ffffff;
    min-height: 220px;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.25) contrast(1.03);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.photo-item:hover img {
    transform: scale(1.04);
    filter: grayscale(0.05) contrast(1.08);
}

.photo-item-wide {
    grid-column: span 2;
}

.rsvp-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.rsvp-form {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.field {
    width: 100%;
    border: 1px solid #cfcfcf;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.field:focus {
    outline: none;
    border-color: #111111;
    transform: translateY(-1px);
}

.attendance-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #2f2f2f;
}

.attendance-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.book-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.book-list {
    display: grid;
    gap: 10px;
    max-height: 480px;
    overflow: auto;
    padding-right: 4px;
}

.entry {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
}

.entry-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.entry p {
    color: #333333;
    margin-bottom: 8px;
}

.entry small {
    color: var(--muted);
    font-size: 0.8rem;
}

.pill {
    font-size: 0.72rem;
    border-radius: 999px;
    padding: 3px 9px;
    border: 1px solid #b8b8b8;
}

.pill-on {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.pill-off {
    background: #efefef;
    color: #111111;
}

.alert {
    margin-top: 12px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.alert-success {
    background: #efefef;
    color: #121212;
    border: 1px solid #c9c9c9;
}

.alert-error {
    background: #151515;
    color: #ffffff;
    border: 1px solid #2f2f2f;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 11px 20px;
    border: 1px solid transparent;
    font-weight: 500;
    transition: transform 0.24s ease, background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-dark {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.btn-dark:hover {
    background: #000000;
}

.btn-light {
    background: #ffffff;
    color: #111111;
    border-color: #5a5a5a;
}

.btn-light:hover {
    background: #eaeaea;
}

.btn-ghost {
    border-color: #7a7a7a;
    color: #ffffff;
}

.btn-ghost:hover {
    background: #ffffff;
    color: #111111;
}

.footer {
    text-align: center;
    padding: 46px 20px 54px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer a {
    display: inline-block;
    margin-top: 10px;
    color: #111111;
    text-decoration: none;
    border-bottom: 1px solid #111111;
}

.preview {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f5f5f5;
    padding: 28px;
}

.preview-card {
    width: min(680px, 100%);
    border: 1px solid #dadada;
    border-radius: 16px;
    background: #ffffff;
    padding: 28px;
    text-align: center;
}

.preview-card h1 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
}

.preview-label {
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 0.72rem;
    margin-bottom: 8px;
    color: #5b5b5b;
}

.preview-card p {
    color: #444444;
}

.preview-card a {
    display: inline-block;
    margin-top: 14px;
    text-decoration: none;
    color: #111111;
    border: 1px solid #111111;
    border-radius: 999px;
    padding: 8px 16px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.72s ease, transform 0.72s ease;
}

.reveal-visible,
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .two-col,
    .rsvp-grid {
        grid-template-columns: 1fr;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    .count-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 88vh;
        padding: 16px;
    }

    .wrap {
        width: min(1120px, calc(100% - 24px));
    }

    .count-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-item {
        min-height: 170px;
    }

    .photo-item-wide {
        grid-column: span 2;
    }

    .btn {
        width: 100%;
    }

    .event-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}
