/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Fonts ===== */
@font-face {
    font-family: "Artis Sans";
    src: url("/fonts/Artis-Sans-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Artis Sans";
    src: url("/fonts/Artis-Sans-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-heading: "Artis Sans", "Georgia", "Times New Roman", serif;
    --font-text: "Open Sans", "Segoe UI", "Arial", sans-serif;

    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-accent: #000000;
    --color-accent-hover: #1a1a1a;
    --color-white: #ffffff;
    --color-border: #cccccc;
    --color-error: #c0392b;
    --color-success: #6b8e6b;

    --container-max: 720px;
    --container-padding: 20px;
    --section-gap: 80px;
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ===== Container ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Section ===== */
.section {
    padding: var(--section-gap) 0;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--color-accent);
}

/* ===== Animation classes ===== */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll[data-anim="fade-up"] {
    transform: translateY(30px);
}

.animate-on-scroll[data-anim="fade-right"] {
    transform: translateX(-30px);
}

.animate-on-scroll[data-anim="fade-left"] {
    transform: translateX(30px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px var(--container-padding);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url(/img/02.jpg) center / 190% no-repeat;
    filter: grayscale(100%) brightness(0.25);
    z-index: 0;
    animation: heroFadeIn 1.2s ease-out forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__letters {
    display: flex;
    align-items: center;
    height: 30vh;
    gap: 40px;
}

.hero__letter {
    font-family: var(--font-heading);
    font-size: clamp(80px, 25vw, 200px);
    font-weight: 500;
    line-height: 1;
    color: #fff;
    opacity: 0.8;
}

.hero__sep {
    width: 1px;
    height: clamp(90px, 30vw, 200px);
    background: #fff;
    opacity: 0.8;
}

.hero__names {
    font-family: var(--font-heading);
    font-size: clamp(32px, 10vw, 48px);
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.5;
    margin-bottom: 24px;
    color: #fff;
}

.hero__and {
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.7;
}

.hero__date {
    font-family: var(--font-heading);
    font-size: 26px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.8;
    margin-top: 20px;
}

/* ===== Welcome ===== */
.welcome__text {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 17px;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 0;
}


.timeline__item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 50px;
    position: relative;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__time {
    width: 80px;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    color: var(--color-accent);
    text-align: right;
    padding-top: 2px;
}

.timeline__body {
    margin-left: 30px;
    padding: 16px 24px;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    flex: 1;
    max-width: 420px;
    text-align: center;
}

.timeline__body::after {
    content: "";
    display: block;
    width: 1px;
    left: calc(50% - 15px);
    height: 50px;
    background: var(--color-border);
    position: absolute;
    top: 100%;
}

.timeline__item:last-child .timeline__body::after {
    display: none;
}

.timeline__icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.timeline__title {
    font-family: var(--font-text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline__desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ===== Location ===== */
.location {
    position: relative;
    overflow: hidden;
}

.location::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/img/loc.jpg") center / cover no-repeat;
    filter: grayscale(100%) brightness(0.25);
    z-index: 0;
    animation: locationFadeIn 1.2s ease-out forwards;
}

@keyframes locationFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.location .container {
    position: relative;
    z-index: 1;
}

.location .section__title {
    color: #fff;
}

.location__text {
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
}

.location__address {
    text-align: center;
    font-weight: 600;
    margin-bottom: 30px;
    color: #fff;
}

.location__map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}
.location__map iframe {
    display: block;
}

@keyframes detailsFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.details .container {
    position: relative;
    z-index: 1;
}


.details__list {
    max-width: 600px;
    margin: 0 auto;
}

.details__item {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.details__item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ===== Dress-code ===== */
.dresscode__text {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px;
}

.dresscode__colors {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dresscode__color {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.16);
}

.dresscode__color_greyborder {
    border: 2px solid #eee;
}

/* ===== RSVP ===== */
.rsvp__intro {
    text-align: center;
    margin-bottom: 40px;
    font-size: 15px;
    line-height: 1.8;
}

.rsvp__form-wrapper {
    max-width: 520px;
    margin: 0 auto;
}

.rsvp__form {
    background: var(--color-white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.rsvp__fieldset {
    border: none;
    margin-bottom: 28px;
}

.rsvp__legend {
    font-family: var(--font-text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
    color: var(--color-text);
}

.rsvp__radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsvp__radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    padding: 8px 0;
}

.rsvp__radio input {
    display: none;
}

.rsvp__radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.rsvp__radio input:checked + .rsvp__radio-mark {
    border-color: var(--color-accent);
}

.rsvp__radio input:checked + .rsvp__radio-mark::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
}

.rsvp__field {
    margin-bottom: 28px;
}

.rsvp__label {
    display: block;
    font-family: var(--font-text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rsvp__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-text);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color 0.2s;
    outline: none;
}

.rsvp__input:focus {
    border-color: var(--color-accent);
}

.rsvp__check-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsvp__check {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    padding: 8px 0;
}

.rsvp__check input {
    display: none;
}

.rsvp__check-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.rsvp__check input:checked + .rsvp__check-mark {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.rsvp__check input:checked + .rsvp__check-mark::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.rsvp__submit {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 32px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.rsvp__submit:hover {
    background: var(--color-accent-hover);
}

.rsvp__submit:active {
    transform: scale(0.98);
}

.rsvp__submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rsvp__submit--loading {
    position: relative;
    overflow: hidden;
    cursor: wait;
}

.rsvp__submit--loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.15) 8px,
        rgba(0,0,0,0.08) 16px
    );
    background-size: 23px 23px;
    animation: stripeSlide 0.6s linear infinite;
}

@keyframes stripeSlide {
    from { transform: translateX(0); }
    to   { transform: translateX(23px); }
}

.rsvp__submit--loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.12) 8px,
        rgba(0,0,0,0.06) 16px
    );
    background-size: 23px 23px;
    animation: stripeSlideReverse 0.6s linear infinite;
}

@keyframes stripeSlideReverse {
    from { transform: translateX(0); }
    to   { transform: translateX(-23px); }
}

.rsvp__success {
    text-align: center;
    padding: 60px 30px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.rsvp__success p {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--color-accent);
}

.rsvp__error {
    color: var(--color-error);
    text-align: center;
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    text-align: center;
    padding: 120px var(--container-padding);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/img/03.jpg") center / cover no-repeat;
    filter: grayscale(100%) brightness(0.25);
    z-index: 0;
    animation: footerFadeIn 1.2s ease-out forwards;
}

@keyframes footerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer__text {
    font-family: var(--font-heading);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    :root {
        --section-gap: 50px;
    }

    .section__title {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .hero__letter {
        font-size: clamp(50px, 20vw, 100px);
    }

    .hero__names {
        font-size: clamp(20px, 6vw, 28px);
    }

    .timeline__item {
        flex-direction: column;
    }

    .timeline__time {
        width: auto;
        text-align: left;
        margin-bottom: 8px;
        padding-left: 0;
        font-size: 22px;
    }

    .timeline__body {
        width:100%;
        margin-left: 0;
        max-width: none;
        padding: 12px 16px 18px;
    }

    .timeline__body::after {
        content: "";
        display: block;
        width: 1px;
        left: 50%;
        height: 97px;
        background: var(--color-border);
        position: absolute;
        top: 100%;
    }

    .rsvp__form {
        padding: 24px 16px;
    }
}

@media (min-width: 900px) {
    .hero__inner {
        transform: scale(1.05);
    }
}
