/* =========================================================
   INTRO
   ========================================================= */

.site-intro {
    position: fixed;
    z-index: 1000;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100svh;

    overflow: hidden;

    background: var(--color-alabaster);

    opacity: 1;
    visibility: visible;

    transition:
        opacity 700ms ease,
        visibility 700ms ease;
}


.site-intro.is-finished {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;
}


.site-intro-video {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    background: var(--color-alabaster);
}


.site-intro-sound {
    position: absolute;
    z-index: 2;

    right: 28px;
    bottom: 28px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 14px;

    border: 1px solid rgba(31, 58, 46, 0.25);
    border-radius: 999px;

    background: rgba(243, 238, 228, 0.78);
    color: var(--color-forest);

    cursor: pointer;

    backdrop-filter: blur(8px);

    transition:
        background-color 180ms ease,
        color 180ms ease,
        opacity 180ms ease;
}


.site-intro-sound:hover {
    background: var(--color-forest);
    color: var(--color-text-light);
}


.site-intro-sound.is-active {
    background: var(--color-forest);
    color: var(--color-text-light);
}


.site-intro-sound-icon {
    font-size: 1rem;
    line-height: 1;
}


.site-intro-sound-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}


/* =========================================================
   HERO
   ========================================================= */

.home-hero {
    position: relative;

    width: 100%;
    height: 100svh;
    min-height: 640px;

    overflow: hidden;

    background: var(--color-alabaster);
}


.home-hero-final-frame {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    user-select: none;
    pointer-events: none;
}


/* =========================================================
   STORY SECTIONS
   ========================================================= */

.story-section {
    position: relative;

    display: grid;
    place-items: center;

    min-height: 100svh;
    padding: 80px 20px;

    overflow: hidden;

    background: var(--color-alabaster);
}


.story-section + .story-section {
    border-top: 1px solid rgba(31, 58, 46, 0.08);
}


.story-content {
    position: relative;
    z-index: 5;

    width: min(760px, 100%);
    margin-inline: auto;

    text-align: center;
}


.story-number {
    display: block;

    margin-bottom: 18px;

    color: var(--color-sage);

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
}


.story-title {
    margin: 0 0 20px;

    color: var(--color-forest);

    font-family: var(--font-serif);
    font-size: clamp(2.1rem, 5vw, 4.6rem);
    font-weight: 400;
    line-height: 1.08;
}


.story-copy {
    margin: 0 auto 32px;

    max-width: 650px;

    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.3vw, 1.8rem);
    line-height: 1.45;
}


.story-media {
    position: absolute;
    inset: 0;

    background: var(--color-alabaster);
}

/* =========================================================
   STORY VIDEO LAYERS
   ========================================================= */

.story-idle-video,
.story-main-video,
.story-final-frame {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    user-select: none;
}


.story-final-frame {
    z-index: 1;

    opacity: 0;

    pointer-events: none;

    transition: opacity 500ms ease;
}


.story-idle-video {
    z-index: 2;

    opacity: 1;

    transition: opacity 450ms ease;
}


.story-main-video {
    z-index: 3;

    opacity: 0;

    pointer-events: none;

    transition: opacity 450ms ease;
}


/* Text + CTA over idle scene */

.story-section-active .story-content {
    transition:
        opacity 350ms ease,
        visibility 350ms ease;
}


/* Main story starts */

.story-section-active.is-playing .story-idle-video {
    opacity: 0;
}


.story-section-active.is-playing .story-main-video {
    opacity: 1;
}


.story-section-active.is-playing .story-content {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;
}


/* Main video has reached the final brand frame */

.story-section-active.is-ending .story-main-video {
    opacity: 0;
}


.story-section-active.is-ending .story-final-frame {
    opacity: 1;
}


/* Sound button for the full story */

.story-sound-control {
    position: absolute;
    z-index: 6;

    right: 28px;
    bottom: 28px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 14px;

    border: 1px solid rgba(243, 238, 228, 0.45);
    border-radius: 999px;

    background: rgba(31, 58, 46, 0.72);
    color: var(--color-text-light);

    opacity: 0;
    visibility: hidden;

    cursor: pointer;

    backdrop-filter: blur(8px);

    transition:
        opacity 250ms ease,
        visibility 250ms ease,
        background-color 180ms ease,
        color 180ms ease;
}


.story-section-active.is-playing .story-sound-control {
    opacity: 1;
    visibility: visible;
}


.story-section-active.is-ending .story-sound-control {
    opacity: 0;
    visibility: hidden;
}


.story-sound-control:hover,
.story-sound-control.is-active {
    background: var(--color-copper);
    color: var(--color-white);
}


.story-sound-icon {
    font-size: 1rem;
    line-height: 1;
}


.story-sound-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* =========================================================
   STORY CONTENT OVER VIDEO
   ========================================================= */

.story-section-active .story-content {
    padding: 42px 48px;

    color: var(--color-text-light);

    text-shadow:
        0 2px 14px rgba(0, 0, 0, 0.45);
}


.story-section-active .story-content::before {
    content: "";

    position: absolute;
    z-index: -1;
    inset: -30px -60px;

    background: radial-gradient(
        ellipse at center,
        rgba(12, 22, 18, 0.38) 0%,
        rgba(12, 22, 18, 0.18) 48%,
        rgba(12, 22, 18, 0) 75%
    );

    pointer-events: none;
}


.story-section-active .story-number {
    color: rgba(247, 243, 235, 0.72);
}


.story-section-active .story-title {
    color: var(--color-text-light);
}


.story-section-active .story-copy {
    color: var(--color-text-light);
}


.story-section-active .story-play-button {
    border-color: rgba(247, 243, 235, 0.75);

    background: rgba(31, 58, 46, 0.28);
    color: var(--color-text-light);

    backdrop-filter: blur(5px);

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12);
}


.story-section-active .story-play-button:hover {
    border-color: var(--color-text-light);

    background: rgba(247, 243, 235, 0.92);
    color: var(--color-forest);
}


/* =========================================================
   OWNER CONTACT
   ========================================================= */

.home-contact {
    padding: 100px 20px;

    background: var(--color-alabaster);
}


.home-contact-inner {
    max-width: 760px;
    margin-inline: auto;

    text-align: center;
}


.home-contact h2 {
    margin: 0 0 22px;

    color: var(--color-forest);

    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 400;
}


.home-contact p {
    margin: 0 auto 20px;

    max-width: 650px;
}


.home-contact-name {
    margin-top: 28px;

    color: var(--color-forest);

    font-family: var(--font-serif);
    font-size: 1.35rem;
}


.home-contact-phone {
    display: inline-block;

    margin-bottom: 25px;

    color: var(--color-copper);

    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
}


/* =========================================================
   MAP
   ========================================================= */

.home-map {
    position: relative;

    width: 100%;
    min-height: 560px;

    overflow: hidden;

    background: var(--color-sage);
}


.home-map-canvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    min-height: 560px;

    z-index: 1;
}


.home-map-overlay {
    position: relative;
    z-index: 500;

    display: flex;
    align-items: flex-end;

    min-height: 560px;

    padding: 42px;

    pointer-events: none;
}


.home-map-overlay-inner {
    width: min(520px, 100%);

    padding: 28px 32px;

    border-radius: 18px;

    background: rgba(31, 58, 46, 0.86);
    color: var(--color-text-light);

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.22);

    backdrop-filter: blur(8px);

    pointer-events: auto;
}


.home-map-overlay h2 {
    margin: 0 0 12px;

    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
}


.home-map-overlay p {
    margin: 0 0 20px;

    font-size: 1rem;
    line-height: 1.5;
}


/* Leaflet visual integration */

.home-map .leaflet-control-zoom a {
    color: var(--color-forest);
}


.home-map .leaflet-control-attribution {
    font-size: 0.68rem;
}


.villa-map-marker {
    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    border: 3px solid var(--color-text-light);
    border-radius: 50%;

    background: var(--color-copper);

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.28);
}


.villa-map-marker::after {
    content: "";

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: var(--color-text-light);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .site-header {
        position: relative;

        background: var(--color-alabaster);
    }

    .site-header-inner {
        flex-wrap: wrap;

        padding-block: 18px;
    }

    .site-navigation {
        order: 3;

        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .home-hero {
        min-height: 85svh;
        padding-top: 70px;
    }

}


@media (max-width: 640px) {
    .site-header-inner {
        justify-content: center;
    }

    .site-brand {
        width: 100%;

        display: flex;
        justify-content: center;
    }

    .site-account {
        justify-content: center;
        flex-wrap: wrap;
    }

    .site-navigation {
        gap: 13px 18px;
    }

    .home-hero {
        min-height: 78svh;
    }

    .story-section {
        min-height: 85svh;
        padding-inline: 22px;
    }

    .home-final-cta,
    .home-contact {
        padding-block: 80px;
    }

	.home-map,
	.home-map-canvas,
	.home-map-overlay {
		min-height: 460px;
	}


	.home-map-overlay {
		align-items: flex-end;

		padding: 18px;
	}


	.home-map-overlay-inner {
		padding: 20px 22px;

		border-radius: 14px;
	}

    .site-intro-sound {
        right: 16px;
        bottom: 16px;
    }

    .site-intro-sound-label {
        display: none;
    }

    .home-hero {
        min-height: 100svh;
    }	
	
	.story-sound-control {
		right: 16px;
		bottom: 16px;
	}

	.story-sound-label {
		display: none;
	}	
}