html {
    font-size: 100%; /* 16px */
}

:root {
    --content-max: clamp(48rem, 60vw, 80rem); /* 768px–1280px, fluid in between */
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text-light);
    position: relative;
}

/* Background with controlled overlay */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: /*linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),*/ url('public/background_light.webp') center/cover fixed;
    z-index: -1;
}

/* Header */
header {
    background-color: var(--color-bg-header);
    padding: var(--space-md) var(--space-md);
    margin-bottom: var(--space-lg);
}

header .header-container {
    max-width: min(100%, var(--content-max));
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

header .header-logo {
    height: 3rem;
    margin-right: var(--space-md);
}

header h1 {
    margin: 0;
    font-weight: 600;
    color: var(--color-text-light);
}

/* Sections */
.content {
    max-width: min(100%, var(--content-max));
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) var(--space-lg);
    min-height: 50vh;
    margin-bottom: var(--space-lg);
    background-color: var(--color-bg-section);
    /*backdrop-filter: blur(10px);*/
    /*-webkit-backdrop-filter: blur(10px);*/
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* First section with background image */
.first-section {
    background-image: url('public/sample_photo_woman.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: transparent !important; /* Override the default section background */
}

.first-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-section); /* Using the variable instead of hardcoded value */
    border-radius: 8px;
    z-index: 0; /* Ensure the overlay is above the background but below the content */
}

.first-section h1 {
    position: relative;
    z-index: 1; /* Ensure the heading is above the overlay */
}

/* Responsive adjustments for the first section background */
@media (max-width: 768px) {
    .first-section {
        background-position: top center;
    }
}

/* Second section with background image */
.second-section {
    background-image: url('public/sample_photo_man.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: transparent !important; /* Override the default section background */
}

.second-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-section); /* Using the variable instead of hardcoded value */
    border-radius: 8px;
    z-index: 0; /* Ensure the overlay is above the background but below the content */
}

.second-section div {
    position: relative;
    z-index: 1; /* Ensure the heading is above the overlay */
}

/* Responsive adjustments for the first section background */
@media (max-width: 768px) {
    .second-section {
        background-position: top center;
    }
}


.section h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* App section */
.app-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--space-lg);
    text-align: left;
}

.app-icon {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 1.25rem;
    flex-shrink: 0;
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-light);
}

.app-description {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.app-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.app-button img {
    height: 2.5rem;
    border-radius: 0;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);*/
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-button img:hover {
    transform: translateY(-2px);
    /*box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);*/
}

/* Form */
.email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-top: var(--space-lg);
}

.email-input {
    width: 100%;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}


.submit-button {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-button-success);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 8px var(--color-black-20);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--color-black-30);
    background-color: var(--color-button-success-hover);
}

.submit-button:focus,
.email-input:focus {
    outline: 3px solid var(--color-text-light);
    outline-offset: 2px;
}

/* Footer */
footer {
    padding: var(--space-lg) var(--space-md);
    background-color: var(--color-bg-header);
    /*backdrop-filter: blur(5px);*/
    /*-webkit-backdrop-filter: blur(5px);*/
    color: var(--color-white-80);
    font-size: 0.9rem;
}

footer .footer-container {
    max-width: min(100%, var(--content-max));
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

footer a {
    color: var(--color-white-90);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .app-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-icon {
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 480px) {
    footer .footer-container {
        flex-direction: column;
        align-items: flex-start; /* left-align for readability */
        text-align: left;
        gap: var(--space-sm);
    }

    /* Make each block take full width and add spacing */
    footer .footer-container > div {
        width: 100%;
        margin-bottom: var(--space-sm);
    }

    /* Wrap long email/address lines */
    footer a,
    .footer-address {
        word-break: break-word;
    }

    /* Slightly reduce padding to keep things snug */
    footer {
        padding: var(--space-md) var(--space-md);
    }
}

/* Screenshot Carousel */
.screenshots-container {
    width: 100%;
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshots-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
    font-weight: 600;
}

.carousel {
    position: relative;
    width: 100%;
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.screenshot {
    flex: 0 0 16.666%; /* 6 items per view */
    max-width: 16.666%;
    padding: var(--space-xs) var(--space-xs);
    box-sizing: border-box;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot:hover {
    transform: translateY(-3px) scale(1.05);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    /*box-shadow: 0 2px 4px var(--color-black-30);*/
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-section);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-white);
    font-size: 1.5rem;
    z-index: 10;
    border: none;
    outline: none;
    transition: background-color 0.2s ease;
}

.carousel-control:hover {
    background-color: var(--color-bg-section-hover);
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: var(--space-sm);
    gap: var(--space-xs);
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-white-50);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel-indicator.active {
    background-color: var(--color-white);
}

/* Responsive adjustments for screenshot carousel */
@media (max-width: 992px) {
    .screenshot {
        flex: 0 0 25%; /* 4 items per view */
        max-width: 25%;
    }
}

@media (max-width: 768px) {
    .screenshot {
        flex: 0 0 33.333%; /* 3 items per view */
        max-width: 33.333%;
    }
}

@media (max-width: 576px) {
    .screenshot {
        flex: 0 0 50%; /* 2 items per view */
        max-width: 50%;
    }
}

@media (max-width: 400px) {
    .screenshot {
        flex: 0 0 100%; /* 1 item per view */
        max-width: 100%;
    }
}

/* Utils */
.visually-hidden {
    position: absolute; /* take it out of normal flow */
    width: 1px; /* shrink to almost nothing */
    height: 1px;
    padding: 0;
    margin: -1px; /* push it off-screen */
    overflow: hidden; /* hide any overflow */
    clip: rect(0, 0, 0, 0); /* clip to a 1px box */
    white-space: nowrap; /* prevent line breaks */
    border: 0;
}
