/* ===================================
   RESET
=================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --gold: #A88656;
    --gold-dark: #8d6e45;
    --dark: #202020;
    --gray: #777777;
    --line: #e5ddd1;
    --white: #ffffff;
    --bg: #F7F4EF;
    --success: #357a4b;
    --success-bg: #edf8f0;
    --error: #a63e3e;
    --error-bg: #fff0f0;
}

body {
    background: var(--bg);
    color: #1d1d1d;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

/* ===================================
   PAGE LOADER
=================================== */

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--bg);

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.45s ease,
        visibility 0.45s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-line {
    width: 180px;
    height: 2px;

    position: relative;
    overflow: hidden;

    background: #ddd6cc;
}

.loader-line::before {
    content: "";

    position: absolute;
    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background: var(--gold);

    animation: loading 1.4s linear infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* ===================================
   HERO
=================================== */

.hero {
    min-height: 100vh;
    min-height: 100svh;

    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 60px 0;

    text-align: center;

    background:
        radial-gradient(
            circle at top,
            #ffffff 0%,
            var(--bg) 60%
        );
}

.hero::before {
    content: "";

    position: absolute;
    top: -300px;
    right: -250px;

    width: 700px;
    height: 700px;

    border: 1px solid rgba(168, 134, 86, 0.15);
    border-radius: 50%;
}

.hero::after {
    content: "";

    position: absolute;
    left: -220px;
    bottom: -220px;

    width: 500px;
    height: 500px;

    border: 1px solid rgba(168, 134, 86, 0.15);
    border-radius: 50%;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0.8)
        );
}

.hero-content {
    width: min(900px, 92%);

    position: relative;
    z-index: 10;

    animation: float 8s ease-in-out infinite;
}

.hero-subtitle {
    display: block;

    margin-bottom: 30px;

    color: var(--gold);

    font-size: 11px;
    letter-spacing: 8px;
}

.hero h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(64px, 10vw, 110px);
    font-weight: 500;
    line-height: 0.95;
}

.hero h1 span {
    display: block;
}

.hero h1 .ampersand {
    margin: 18px 0;

    color: var(--gold);

    font-size: 0.64em;
}

.hero p {
    width: min(650px, 90%);

    margin: 45px auto;

    color: #666666;

    font-size: 17px;
    line-height: 1.9;
}

.hero-info {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 35px;

    margin-top: 25px;
}

.hero-info small {
    display: block;

    margin-bottom: 10px;

    color: #888888;

    font-size: 10px;
    letter-spacing: 3px;
}

.hero-info strong {
    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
    font-weight: 500;
}

.divider {
    width: 1px;
    height: 55px;

    background: #dddddd;
}

.scrollButton {
    width: 190px;
    height: 58px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    margin-top: 60px;

    border: 1px solid var(--gold);

    color: var(--gold);

    font-size: 12px;
    letter-spacing: 2px;

    transition:
        color 0.35s ease,
        background 0.35s ease,
        transform 0.35s ease;
}

.scrollButton:hover {
    color: var(--white);
    background: var(--gold);
    transform: translateY(-4px);
}

/* ===================================
   SECTIONS
=================================== */

section {
    padding: 120px 0;
}

.section-title {
    display: block;

    margin-bottom: 18px;

    color: var(--gold);

    text-align: center;
    font-size: 11px;
    letter-spacing: 5px;
}

section h2 {
    margin-bottom: 60px;

    font-family: "Cormorant Garamond", serif;
    font-size: 58px;
    font-weight: 500;
    text-align: center;
}

/* ===================================
   COUNTDOWN
=================================== */

.countdown-section {
    background: var(--white);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 25px;

    margin-top: 50px;
}

.countdown > div {
    padding: 45px 20px;

    border: 1px solid var(--line);

    background: #faf8f4;

    text-align: center;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.countdown > div:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.countdown span {
    display: block;

    color: var(--gold);

    font-family: "Cormorant Garamond", serif;
    font-size: 72px;
    line-height: 1;
}

.countdown small {
    display: block;

    margin-top: 12px;

    color: #777777;

    font-size: 11px;
    letter-spacing: 3px;
}

/* ===================================
   VENUE
=================================== */

.venue {
    background: var(--bg);
}

.venue-card {
    max-width: 760px;

    position: relative;
    overflow: hidden;

    margin: 0 auto;
    padding: 70px;

    border: 1px solid var(--line);

    background: var(--white);

    text-align: center;
}

.venue-card::before {
    content: "";

    position: absolute;
    top: -120px;
    right: -120px;

    width: 260px;
    height: 260px;

    border: 1px solid rgba(168, 134, 86, 0.12);
    border-radius: 50%;
}

.venue-card::after {
    content: "";

    position: absolute;
    left: -90px;
    bottom: -90px;

    width: 180px;
    height: 180px;

    border: 1px solid rgba(168, 134, 86, 0.1);
    border-radius: 50%;
}

.venue-card > * {
    position: relative;
    z-index: 1;
}

.location {
    margin-top: -25px;
    margin-bottom: 45px;

    color: #666666;

    font-size: 18px;
}

.mapButton {
    width: 220px;
    height: 60px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    border: 1px solid var(--gold);

    color: var(--gold);

    font-size: 12px;
    letter-spacing: 2px;

    transition:
        color 0.35s ease,
        background 0.35s ease,
        transform 0.35s ease;
}

.mapButton:hover {
    color: var(--white);
    background: var(--gold);
    transform: translateY(-4px);
}

.venue-note {
    margin-top: 40px;
    padding-top: 35px;

    border-top: 1px solid var(--line);

    color: #555555;

    font-size: 16px;
    line-height: 1.8;
}

/* ===================================
   RSVP
=================================== */

.rsvp {
    background: var(--white);
}

.rsvp > .container > p {
    max-width: 620px;

    margin: 0 auto 50px;

    color: #777777;

    text-align: center;
    line-height: 1.8;
}

#rsvpForm {
    max-width: 760px;

    margin: 0 auto;
}

.guest-card {
    margin-bottom: 30px;
    padding: 35px;

    border: 1px solid var(--line);

    background: #faf8f4;
}

.guest-card h3 {
    margin-bottom: 30px;

    font-family: "Cormorant Garamond", serif;
    font-size: 34px;
    font-weight: 500;
}

.guest-card input[type="text"] {
    width: 100%;
    height: 58px;

    padding: 0 18px;

    border: 1px solid var(--line);
    border-radius: 0;
    outline: none;

    background: var(--white);

    color: var(--dark);
    font-size: 15px;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.guest-card input[type="text"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(168, 134, 86, 0.1);
}

.guest-card input.input-error {
    border-color: var(--error);
}

.checkbox {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 22px;

    color: #555555;

    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;

    accent-color: var(--gold);
}

.guest-count {
    margin: 35px 0;
}

.guest-count label {
    display: block;

    margin-bottom: 14px;

    color: #444444;

    font-weight: 600;
}

.guest-count select {
    width: 100%;
    height: 58px;

    padding: 0 15px;

    border: 1px solid var(--line);
    border-radius: 0;
    outline: none;

    background: var(--white);

    color: var(--dark);
    font-size: 15px;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.guest-count select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(168, 134, 86, 0.1);
}

#extraGuests {
    display: flex;
    flex-direction: column;

    gap: 25px;

    margin-bottom: 35px;
}

#extraGuests:empty {
    margin-bottom: 0;
}

.form-message {
    display: none;

    margin-bottom: 20px;
    padding: 15px 18px;

    border: 1px solid transparent;

    font-size: 14px;
    line-height: 1.6;
}

.form-message.visible {
    display: block;
}

.form-message.success {
    border-color: rgba(53, 122, 75, 0.25);

    color: var(--success);
    background: var(--success-bg);
}

.form-message.error {
    border-color: rgba(166, 62, 62, 0.25);

    color: var(--error);
    background: var(--error-bg);
}

.submitButton {
    width: 100%;
    height: 62px;

    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 0;

    background: var(--gold);

    color: var(--white);

    font-size: 13px;
    letter-spacing: 3px;

    transition:
        background 0.35s ease,
        transform 0.35s ease,
        opacity 0.35s ease;
}

.submitButton:hover:not(:disabled) {
    background: var(--gold-dark);
    transform: translateY(-3px);
}

.submitButton:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.submitButton.loading .submit-text {
    visibility: hidden;
}

.button-loader {
    width: 20px;
    height: 20px;

    position: absolute;

    display: none;

    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;

    animation: buttonSpin 0.75s linear infinite;
}

.submitButton.loading .button-loader {
    display: block;
}

@keyframes buttonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   FOOTER
=================================== */

footer {
    position: relative;
    overflow: hidden;

    padding: 90px 0 50px;

    background: #1f1f1f;

    color: var(--white);

    text-align: center;
}

footer::before {
    content: "";

    position: absolute;
    top: -200px;
    right: -200px;

    width: 420px;
    height: 420px;

    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

footer::after {
    content: "";

    position: absolute;
    left: -120px;
    bottom: -120px;

    width: 260px;
    height: 260px;

    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

footer .container {
    position: relative;
    z-index: 2;
}

footer h2 {
    margin-bottom: 20px;

    font-family: "Cormorant Garamond", serif;
    font-size: 58px;
    font-weight: 500;
}

footer h2 span {
    margin: 0 8px;

    color: var(--gold);
}

footer p {
    max-width: 520px;

    margin: 0 auto 28px;

    color: rgba(255, 255, 255, 0.72);

    line-height: 1.8;
}

footer small {
    display: block;

    color: rgba(255, 255, 255, 0.45);

    font-size: 11px;
    letter-spacing: 3px;
}

/* ===================================
   ANIMATIONS
=================================== */

.fade-up {
    opacity: 0;
    transform: translateY(30px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ===================================
   RESPONSIVE
=================================== */

@media (max-width: 992px) {
    section h2 {
        font-size: 48px;
    }

    .countdown span {
        font-size: 58px;
    }

    .venue-card {
        padding: 55px 40px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 90px 0;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 64px;
    }

    .hero h1 .ampersand {
        margin: 14px 0;

        font-size: 54px;
    }

    .hero p {
        margin: 32px auto;

        font-size: 15px;
        line-height: 1.8;
    }

    .hero-info {
        gap: 22px;
    }

    .hero-info strong {
        font-size: 24px;
    }

    .countdown {
        grid-template-columns: repeat(2, 1fr);

        gap: 16px;
    }

    .countdown > div {
        padding: 34px 14px;
    }

    .countdown span {
        font-size: 48px;
    }

    section h2 {
        margin-bottom: 42px;

        font-size: 40px;
    }

    .venue-card {
        padding: 42px 26px;
    }

    .location {
        font-size: 16px;
    }

    .mapButton {
        width: 100%;
    }

    .guest-card {
        padding: 24px;
    }

    .guest-card h3 {
        margin-bottom: 22px;

        font-size: 28px;
    }

    footer {
        padding: 70px 0 42px;
    }

    footer h2 {
        font-size: 42px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 92%;
    }

    .hero-subtitle {
        font-size: 10px;
        letter-spacing: 5px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero-info {
        flex-direction: column;

        gap: 16px;
    }

    .divider {
        width: 44px;
        height: 1px;
    }

    .scrollButton {
        width: 100%;
        max-width: 260px;
    }

    .countdown {
        grid-template-columns: 1fr;
    }

    .countdown span {
        font-size: 44px;
    }

    section h2 {
        font-size: 34px;
    }

    .venue-card {
        padding: 34px 20px;
    }

    .venue-note {
        margin-top: 30px;
        padding-top: 28px;

        font-size: 15px;
    }

    .guest-card {
        padding: 20px;
    }

    .submitButton {
        height: 58px;

        letter-spacing: 2px;
    }

    footer h2 {
        font-size: 34px;
    }

    footer p {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}