@font-face {
    font-family: "ArmAllegro";
    src: url("fonts/ArmAllegroU.ttf") format("truetype");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poqrik";
    src: url("fonts/poqrik.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-white: #ffffff;
    --color-black: #1a1a1a;
    --color-soft: #f6f5f3;
    --color-muted: #6b6b6b;
    --color-accent: #742E2E;
    --font-heading: "ArmAllegro", "Playfair Display", serif;
    --font-script: "Poqrik", "Great Vibes", cursive;
    --font-body: "ArmAllegro", "Poppins", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --container: min(1120px, calc(100vw - 40px));
    --radius: 22px;
    --radius-sm: 14px;
    --radius-pill: 999px;
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.07);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    scrollbar-color: var(--color-accent) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: var(--radius-pill);
}

body {
    margin: 0;
    color: var(--color-black);
    background: var(--color-white);
    font-weight: 300;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body.is-loading,
body.modal-open {
    overflow: hidden;
}

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

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    color: var(--color-white);
    background: var(--color-black);
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: var(--color-white);
    transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}

.loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-heart {
    position: relative;
    width: 1em;
    height: 1em;
    font-size: clamp(3.5rem, 14vw, 6.5rem);
    line-height: 1;
    animation: heartPulse 1.5s ease-in-out infinite;
}

.loader-heart i {
    position: absolute;
    top: 0;
    left: 0;
}

.loader-heart__base {
    color: rgba(116, 46, 46, 0.16);
}

.loader-heart__fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    overflow: hidden;
    color: var(--color-accent);
    clip-path: inset(100% 0 0 0);
    animation: heartFill 1.5s ease-in-out infinite;
}

.hero__heart,
.closing-heart {
    animation: heartPulse 1.7s ease-in-out infinite;
}

.hero__heart {
    margin-top: 32px;
}

.music-player {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
}

.music-player__toggle {
    flex: none;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--color-white);
    background: var(--color-accent);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s var(--ease);
}

.music-player__toggle:hover {
    transform: scale(1.06);
}

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 68vh;
    overflow: hidden;
    color: var(--color-black);
    text-align: center;
    background: var(--color-white);
}

.particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    opacity: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.14);
    animation: floatParticle linear infinite;
}

.particle.is-heart {
    width: auto;
    height: auto;
    color: rgba(0, 0, 0, 0.16);
    background: transparent;
    border-radius: 0;
    font-size: 0.65rem;
}

.hero__content {
    position: relative;
    z-index: 1;
    width: var(--container);
    padding: clamp(46px, 9vh, 48px) 0 36px;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: clamp(0.75rem, 1.4vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.hero__title,
.section-title {
    margin: 0;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: 0;
}

.hero__title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(12px, 2vw, 24px);
    font-size: clamp(3.6rem, 12vw, 9.5rem);
}

.hero__heart {
    font-size: clamp(1.6rem, 4vw, 3.4rem);
}

.hero__subtitle {
    margin: 48px 0 0;
    font-family: var(--font-script);
    font-size: clamp(2.2rem, 5.4vw, 5rem);
    line-height: 1;
}

.section,
.journey,
.closing-section {
    position: relative;
    padding: clamp(44px, 6vw, 80px) 0;
}

.section__inner {
    width: var(--container);
    margin: 0 auto;
}

.section__inner--center,
.section__inner--narrow {
    text-align: center;
}

.section__inner--narrow {
    max-width: 800px;
}

.countdown-section {
    background: var(--color-soft);
}

.countdown__title {
    margin-bottom: 12px;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.countdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(28px, 7vw, 72px);
    margin: 40px auto 0;
}

.countdown__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: 0;
}

.countdown__card strong {
    display: block;
    min-width: 3ch;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    line-height: 1;
}

.countdown__card span {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.script-label {
    margin: 0 0 14px;
    color: var(--color-accent);
    font-family: var(--font-script);
    font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.section-title {
    font-size: clamp(2.7rem, 6vw, 6rem);
}

.lead-text,
.body-text {
    color: var(--color-muted);
}

.lead-text {
    max-width: 740px;
    margin: 62px auto 0;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.journey {
    background: var(--color-white);
    overflow: clip;
}

.journey__header {
    padding: 0 0 24px;
    text-align: center;
}

.timeline-stage {
    position: relative;
    min-height: 1280px;
    margin-top: 16px;
}

.route-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.route-path {
    fill: none;
    stroke: var(--color-black);
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-dasharray: 3 12;
    opacity: 0.3;
}

.route-heart {
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--color-white);
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%);
    z-index: 2;
}

.route-heart i {
    font-size: 0.9rem;
}

.timeline-list {
    position: relative;
    min-height: inherit;
}

.timeline-card {
    position: absolute;
    width: min(360px, 35vw);
    padding: clamp(22px, 3vw, 36px);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}

.timeline-card:nth-child(odd) {
    left: 0;
}

.timeline-card:nth-child(even) {
    right: 0;
}

.timeline-card:nth-child(1) {
    top: 110px;
}

.timeline-card:nth-child(2) {
    top: 390px;
}

.timeline-card:nth-child(3) {
    top: 685px;
}

.timeline-card:nth-child(4) {
    top: 970px;
}

.timeline-card:hover,
.timeline-card.is-active {
    background: var(--color-white);
    transform: translateY(-8px);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.12);
}

.timeline-card__time {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
}

.timeline-card h3 {
    margin: 0 0 12px;
    font-family: inherit;
    font-size: clamp(1.45rem, 2.3vw, 2.05rem);
    font-weight: 600;
    line-height: 1.12;
}

.timeline-card p {
    margin: 0 0 22px;
    color: var(--color-muted);
}

.map-link,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 24px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    border: 0;
    border-radius: var(--radius-pill);
    transition: transform 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease);
}

.map-link {
    color: var(--color-black);
    background: var(--color-soft);
}

.map-link:hover {
    color: var(--color-white);
    background: var(--color-accent);
    transform: translateY(-3px);
}

.rsvp-section {
    background: var(--color-white);
}

.rsvp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(38px, 7vw, 94px);
    align-items: center;
}

.rsvp-form {
    padding: clamp(26px, 4vw, 48px);
    border: 0;
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow-card);
}

.field,
.radio-group {
    margin: 0 0 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label,
legend {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    color: var(--color-black);
    background: var(--color-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    outline: none;
    padding: 14px 16px;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

input:focus,
select:focus,
textarea:focus {
    background: var(--color-white);
    border-color: var(--color-black);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.06);
}

textarea {
    resize: vertical;
}

.field small,
.radio-group small {
    display: none;
    margin-top: 7px;
    color: var(--color-black);
    font-size: 0.78rem;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--color-black);
}

.field.has-error small,
.radio-group.has-error small {
    display: block;
}

.radio-group {
    padding: 0;
    border: 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    margin: 0 0 8px;
    padding: 0 16px;
    background: var(--color-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    letter-spacing: 0;
    text-transform: none;
}

.radio-group input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-black);
}

.button {
    width: 100%;
    background: var(--color-soft);
    color: var(--color-black);
}

.button--dark {
    color: var(--color-white);
    background: var(--color-accent);
}

.button--dark:hover {
    transform: translateY(-3px);
}

.button.is-loading {
    pointer-events: none;
    opacity: 0.72;
}

.form-status {
    min-height: 26px;
    margin: 16px 0 0;
    text-align: center;
    color: var(--color-accent);
    font-family: var(--font-script);
    font-size: 2rem;
    line-height: 1;
}

.form-status.is-error {
    color: var(--color-muted);
}

.closing-section {
    display: grid;
    align-items: center;
    color: var(--color-black);
    text-align: center;
    background: var(--color-white);
}

.closing-heart {
    margin-bottom: 24px;
    color: var(--color-accent);
    font-size: 2.1rem;
}

.map-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.map-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.map-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.map-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.4s var(--ease);
}

.map-modal.is-open .map-modal__dialog {
    transform: none;
}

.map-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--color-black);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s var(--ease);
}

.map-modal__close:hover {
    transform: scale(1.08);
}

.map-modal__frame {
    aspect-ratio: 16 / 10;
}

.map-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@keyframes heartPulse {
    0%,
    100% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.14);
    }
}

@keyframes heartFill {
    0% {
        clip-path: inset(100% 0 0 0);
    }
    70%,
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translate3d(0, 26px, 0) scale(0.7);
    }
    20%,
    72% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--drift), -110px, 0) scale(1.15);
    }
}

@media (max-width: 900px) {
    :root {
        --container: min(100% - 28px, 720px);
    }

    .timeline-stage {
        min-height: auto;
        padding: 30px 0 20px;
    }

    .route-svg,
    .route-heart {
        display: none;
    }

    .timeline-list {
        min-height: auto;
        display: grid;
        gap: 18px;
        padding-left: 22px;
    }

    .timeline-card,
    .timeline-card:nth-child(odd),
    .timeline-card:nth-child(even) {
        position: relative;
        inset: auto;
        width: 100%;
    }

    .rsvp-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero__title {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        font-size: clamp(3.6rem, 22vw, 7rem);
    }

    .hero__heart {
        align-self: center;
    }

    .hero__heart {
        font-size: 1.45rem;
    }

    .section,
    .closing-section {
        padding: 44px 0;
    }

    .journey {
        padding: 22px 0;
    }


    .countdown {
        gap: 24px 36px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rsvp-form {
        padding: 24px 18px;
    }

    .music-player {
        right: 14px;
        bottom: 14px;
    }

    .music-player__toggle {
        width: 46px;
        height: 46px;
    }

    .map-modal__frame {
        aspect-ratio: 3 / 4;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

.rsvp-media {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    aspect-ratio: 4 / 5;
}

.rsvp-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invitation-section {
    padding-bottom: 0;
}
