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

body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    /* Prevent scrollbars */
    background-color: #ffdae5;
    /* Fallback */
}

/* ==== Fondo corporativo ==== */
.bg {
    position: fixed;
    inset: 0;
    /* Mobile default: center 25% to focus on faces */
    background: url("images/familia-munoz-pareja-4-f62a4a380bfb43500417295152806225-640-0.webp") no-repeat center 25%/cover;
    z-index: -2;
}

/* Desktop fix: prevent stretching/cropping by containing width */
@media (min-width: 768px) {
    .bg {
        /* Center the image with max-width to preserve quality/aspect */
        background-size: contain;
        background-position: center top;
        /* Optional: add a blurred background or solid color for the sides */
        background-color: #ffdae5;
    }

    /* Advanced: Use a pseudo-element for a blurred fill if desired, 
       but for now simple contain/color is safer to avoid "stretching" */
}

/* ==== Noise Texture (Film Grain) ==== */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}


/* ==== Overlay con blur ==== */
.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    /* Move content down: push to bottom then add padding */
    justify-content: space-between;
    /* Space between logo and content */
    align-items: center;
    text-align: center;
    color: #fff;
    /* Subtle gradient overlay */
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
    padding: 2rem;
    padding-bottom: 8vh;
    z-index: 10;
}

/* Logo Styles */
.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

/* Content wrapper to re-enable pointer events on text/buttons */
.content-wrapper {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3rem 4rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
}

/* Texto principal */
.overlay h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(to bottom right, #ffffff, #ffe0e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.overlay p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Botón de descarga - iOS Glassmorphism Enhanced */
.download-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    /* Slightly larger */
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* For shine effect */
}

/* Shine effect */
.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.3);
}

.download-btn:active {
    transform: translateY(0) scale(0.98);
    background: rgba(255, 255, 255, 0.3);
}

/* Button Group */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: center;
}

/* Instagram Button Variant */
.download-btn.instagram {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
}

.download-btn.instagram:hover {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 15px 45px 0 rgba(255, 105, 180, 0.2);
    /* Pinkish glow */
}

/* ==== Responsividad ==== */
@media (max-width: 600px) {
    .content-wrapper {
        padding: 2rem;
    }

    .overlay h1 {
        font-size: 2rem;
    }
}