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

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #000000;
    font-family: 'Cormorant Garamond', serif;
    scrollbar-width: none; /* Firefox */
    transition: background-color 0.4s ease;
}

body.dark {
    background-color:#f1eeea;
}

section {
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.5rem solid #f1eeea;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

body.dark section {
    border-color: #000000;
}

section:first-of-type img {
    height: 26rem;
    width: auto;
    transition: filter 0.4s ease;
    /* image is originally black */
    filter: brightness(0) invert(1);
}

body.dark section:first-of-type img {
    filter: brightness(1) invert(0);
}

@media (max-width: 600px) {
    section:first-of-type img {
        width: 80vw;
        height: auto;
    }
}

/* ---------- Shared editorial elements ---------- */

.divider {
    display: block;
    width: 2.5rem;
    height: 1px;
    background-color: currentColor;
    opacity: 0.5;
}

/* ---------- Video / save the date section ---------- */

.video-section {
    padding: 0;
    background-color: #000000;
}

.bg-video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-blur {
    display: none;
}

@media (min-width: 1300px) {
    .video-blur {
        position: absolute;
        inset: 0;
        z-index: 0;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(28px) saturate(1.25);
        transform: scale(1.08);
        opacity: 0.8;
    }

    .bg-video {
        object-fit: contain;
    }
}

.sound-toggle {
    position: absolute;
    z-index: 2;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid #f1eeea;
    background-color: rgba(0, 0, 0, 0.35);
    color: #f1eeea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.video-controls {
    position: absolute;
    z-index: 2;
    left: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.replay-video {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid #f1eeea;
    background-color: rgba(0, 0, 0, 0.35);
    color: #f1eeea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.replay-video svg {
    width: 1.35rem;
    height: 1.35rem;
}

.sound-toggle:hover {
    background-color: rgba(0, 0, 0, 0.55);
}

.sound-toggle svg {
    width: 1.3rem;
    height: 1.3rem;
}

.sound-toggle .icon-unmuted {
    display: none;
}

.sound-toggle.is-muted .icon-muted {
    display: block;
}

.sound-toggle.is-muted .icon-unmuted {
    display: none;
}

.sound-toggle:not(.is-muted) .icon-muted {
    display: none;
}

.sound-toggle:not(.is-muted) .icon-unmuted {
    display: block;
}

/* ---------- Info section ---------- */

.info-grid {
    display: grid;
    grid-template-columns: minmax(20rem, 38%) 1fr;
    grid-template-rows: auto 1fr;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    color: #000000;
}

.info-eyebrow {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 4.5rem 4.5rem 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-align: left;
}

.info-right {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    padding: 0 4.5rem 4.5rem;
    display: flex;
    align-items: flex-start;
}

.info-details {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    padding: 4rem 3rem;
    background-color: #11100F;
    color: #F4EFE9;
    text-align: center;
}

.info-divider {
    width: 6.5rem;
    height: 1px;
    background-color: currentColor;
    opacity: 0.4;
    align-self: center;
    margin: 2rem auto;
}

.info-details > img {
    width: 8rem;
    margin-bottom: 2rem;
    margin: 0 auto;
    filter: brightness(0) invert(1);
}

.info-location {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 500;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.info-location a {
    display: inline-flex;
    line-height: 0;
}

 .map-pin {
    width: 30px ;
    height: 30px;
    margin: 0;
}

 .map-pin:hover, .map-pin:focus {
    filter: brightness(0) invert(0.5);
    transform: scale(1.25);
 }

.info-soon {
    margin: 0 auto;
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.55;
    letter-spacing: 0.05em;
}

.engagement-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .info-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
        text-align: center;
        justify-content: space-between;
    }

    .engagement-img {
        max-height: none;
    }

    .info-eyebrow {
        width: 100%;
        padding: 3.5rem 1.5rem 2rem;
    }

    .info-right {
        width: 100%;
        max-width: 420px;
        padding: 0 1.5rem 3rem;
    }

    .info-details {
        width: 100%;
        height: 50%;
        padding: 3rem 1.5rem;
        align-items: center;
    }
}

/* ---------- Countdown section ---------- */

.countdown-section {
    background-color: #F4EFE9;
    color: #000000;
    padding: 2rem;
}

@media (max-width: 780px) {
    .countdown-section {
        height: 100svh;
        padding: 2.5rem 2.25rem;
    }

    .countdown-content {
        gap: 1.1rem;
        padding: 0;
    }

    .countdown-timer {
        gap: 0.8rem;
    }

    .countdown-number {
        font-size: clamp(2.4rem, 13vw, 4.2rem);
    }

    .countdown-label {
        font-size: 0.85rem;
    }

    #add-to-calendar {
        margin-top: 1.4rem;
    }
}

/* Animated lace image layer */
.countdown-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background-image: url('../sources/lace-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: scale(1.06);
    filter: blur(14px);
}

@media (max-width: 600px) {
    .countdown-section::before {
        background-size: auto 100%;
        background-position: left;
    }
}

/* Start animation only after scroll */
.countdown-section.is-visible::before {
    animation: laceReveal 1.8s ease-out forwards;
}

/* Soft bridal shimmer */
.countdown-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%
    );

    transform: translateX(-130%);
}

/* Start shimmer only after scroll */
.countdown-section.is-visible::after {
    animation: laceShimmer 2.5s ease-out 1.1s forwards;
}

.countdown-content {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    text-align: center;
    padding: 0 1.5rem;

    opacity: 0;
    transform: translateY(1rem);
}

/* Start content animation only after scroll */
.countdown-section.is-visible .countdown-content {
    animation: countdownContentReveal 1.5s ease-out 1.6s forwards;
}

@keyframes laceReveal {
    0% {
        opacity: 0;
        transform: scale(1.06);
        filter: blur(14px);
    }

    55% {
        opacity: 0.8;
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes laceShimmer {
    100% {
        transform: translateX(130%);
    }
}

@keyframes countdownContentReveal {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.countdown-eyebrow {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-weight: 500;
}

.countdown-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 3ch;
}

.countdown-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.25rem, 16vw, 7rem);
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.countdown-divider {
    display: none;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 7vw, 4.5rem);
    align-self: center;
    opacity: 0.35;
    transform: translateY(-0.4rem);
}

@media (min-width: 700px) {
    .countdown-timer {
        flex-direction: row;
        align-items: baseline;
        gap: clamp(0.75rem, 3vw, 2.25rem);
    }

    .countdown-number {
        font-size: clamp(3.5rem, 9vw, 6rem);
    }

    .countdown-divider {
        display: block;
    }
}

.countdown-date {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.3em;
}

@media (max-width: 420px) {
    .countdown-date, .calendar-btn {
        font-size: 1.45rem;
        letter-spacing: 0.22em;
        white-space: nowrap;
    }
}

/* Add to calendar button */
#add-to-calendar {
    margin-top: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-btn {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 0.65rem;
    padding: 0.65rem 1.75rem;
    border: 1px solid #000000;
    background-color: transparent;
    color: #000000;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.calendar-btn .google-wordmark {
    height: 0.8rem;
    width: auto;
    display: inline-block;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.calendar-btn:hover {
    background-color: #000000;
    color: #F4EFE9; /* Matches countdown section background */
}

.calendar-btn:hover .google-wordmark {
    transform: scale(1.05);
}

@media (min-width: 328px) and (max-width: 700px) {
    .countdown-section {
        padding: 1.35rem 1.5rem;
    }

    .countdown-content {
        gap: 1rem;
    }

    .countdown-eyebrow {
        font-size: 1.5rem;
        letter-spacing: 0.22em;
        line-height: 1.25;
    }

    .countdown-timer {
        gap: 0.45rem;
    }

    .countdown-unit {
        gap: 0.25rem;
    }

    .countdown-number {
        font-size: clamp(2rem, 11vw, 3.25rem);
    }

    .countdown-label {
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    .countdown-date {
        font-size: 1.25rem;
        letter-spacing: 0.2em;
        white-space: nowrap;
    }

    #add-to-calendar {
        margin-top: 0.65rem;
    }

    .calendar-btn {
        gap: 0.45rem;
        padding: 0.5rem 1rem;
        font-size: 0.72rem;
        letter-spacing: 0.12em;
    }

    .calendar-btn .google-wordmark {
        height: 0.65rem;
    }
}

/* endregion */
