
/* Global styles */

:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background-color: #171717;
    color: #ffffff;
}

a {
    color: inherit;
}


/* Site layout */

.site {
    position: relative;
    isolation: isolate;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    overflow: hidden;
}


/* Background slideshow */

.slide {
    position: absolute;
    inset: -2px;
    z-index: -3;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: none;

    transition: opacity 1.5s ease;
}

.slide.active {
    opacity: 1;
}


/* Slideshow images */

.slide:nth-child(1) {
    background-image: url("images/slika_1.webp");
    background-color: #455b67;
}

.slide:nth-child(2) {
    background-image: url("images/slika_2.webp");
    background-color: #55615c;
}

.slide:nth-child(3) {
    background-image: url("images/slika_3.webp");
    background-color: #545d54;
}

.slide:nth-child(4) {
    background-image: url("images/slika_4.webp");
    background-color: #545d54;
}

.slide:nth-child(5) {
    background-image: url("images/slika_5.webp");
    background-color: #545d54;
}

.slide:nth-child(6) {
    background-image: url("images/slika_6.webp");
    background-color: #545d54;
}


/* Background overlays */

.overlay,
.contact-backdrop {
    position: absolute;
    inset: -2px;
}


/* Full-screen frosted glass overlay */

.overlay {
    position: absolute;
    inset: -2px;
    z-index: -2;

    pointer-events: none;

    /* Dark transparent glass */
    background: rgba(0, 0, 0, 0.35);

    /* Subtle background blur */
    backdrop-filter: blur(4px) saturate(120%);
    -webkit-backdrop-filter: blur(4px) saturate(120%);
}



/* Contact popup backdrop */

.contact-backdrop {
    z-index: 2;

    background: rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
            opacity 0.4s ease,
            visibility 0.4s ease;
}

body.contact-open .contact-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Main content */

main {
    flex: 1;
    min-height: 0;

    display: grid;
    place-items: center;

    padding: 24px 24px 70px;

    overflow-y: auto;
}


/* Homepage */

.home-content {
    width: min(100%, 1100px);
    text-align: center;

    opacity: 1;
    transform: translateY(0);

    transition:
            opacity 0.35s ease,
            transform 0.35s ease;
}


/* Centered logo */

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 20px 0 0 0;
}

.hero-logo img {
    display: block;

    width: 90%;
    max-width: 800px;
    height: auto;

    object-fit: contain;
}


/* Subtitle */

.subtitle {
    margin: 35px 0 20px 0;

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 500;

    letter-spacing: 0.03em;
    line-height: 1.3;

    color: #ffffff;
    opacity: 0.95;
}


/* Contact button */

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 23px;

    background: rgba(255, 255, 255, 1);

    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);

    border: none;
    border-radius: 100px;

    color: #111111;

    font: inherit;
    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.13em;
    text-decoration: none;
    text-transform: uppercase;

    box-shadow:
            0 8px 30px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);

    cursor: pointer;
    transform: translateY(0);

    transition:
            background 0.3s ease,
            box-shadow 0.3s ease,
            transform 0.3s ease,
            color 1s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;

    box-shadow:
            0 10px 35px rgba(0, 0, 0, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);

    transform: translateY(-2px);
}

.nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}


/* Hero contact button */

.hero-contact {
    margin-top: 25px;

    padding: 14px 35px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
}


/* Contact popup */

.contact-content {
    position: fixed;

    top: 50%;
    left: 50%;
    z-index: 5;

    width: min(90%, 480px);
    max-height: 85dvh;

    padding: 55px 45px;

    background: rgba(255, 255, 255, 0.15);

    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);

    border-radius: 18px;

    box-shadow:
            0 25px 80px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);

    text-align: center;
    overflow-y: auto;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, -45%) scale(0.97);

    transition:
            opacity 0.35s ease,
            transform 0.35s ease,
            visibility 0.35s ease;
}


/* Contact popup title */

.contact-content h1 {
    margin: 0 0 25px;

    font-size: clamp(34px, 5vw, 52px);
    font-weight: 500;

    letter-spacing: -0.04em;
    line-height: 1.1;
}


/* Contact information */

.contact-details {
    margin-top: 35px;

    font-size: clamp(14px, 2vw, 17px);
    line-height: 2.2;
}

.contact-content p i {
    margin-right: 10px;
}

.contact-details a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.contact-details a:hover {
    border-color: #ffffff;
}


/* Contact popup close button */

.contact-close {
    position: absolute;

    top: 16px;
    right: 18px;

    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    cursor: pointer;
    transform: none;

    transition: background 0.25s ease;
}

.contact-close:hover {
    background: rgba(255, 255, 255, 0.22);
}


/* Close icon */

.contact-close i {
    display: block;

    width: 18px;
    height: 18px;

    font-size: 18px;
    line-height: 18px;
    text-align: center;

    transform: rotate(0deg);
    transform-origin: center;

    transition: transform 0.3s ease;
}

.contact-close:hover i {
    transform: rotate(90deg);
}


/* Popup open state */

body.contact-open .contact-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(-50%, -50%) scale(1);
}


/* Slideshow navigation */

.slideshow-controls {
    position: absolute;
    z-index: 2;

    bottom: 37px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    gap: 10px;
}

.slide-dot {
    width: 28px;
    height: 3px;

    padding: 0;
    border: 0;
    border-radius: 5px;

    background: rgba(255, 255, 255, 0.35);

    cursor: pointer;
}

.slide-dot.active {
    background: #ffffff;
}

body.contact-open .slideshow-controls {
    pointer-events: none;
}


/* Mobile styles */

@media (max-width: 600px) {

    main {
        padding: 24px 20px 64px;
    }

    .home-content {
        width: 100%;
    }

    .hero-logo {
        margin: 15px 0;
    }

    .hero-logo img {
        width: 95%;
        max-width: 400px;
    }

    .subtitle {
        font-size: 15px;
    }

    .hero-contact {
        margin-top: 20px;
        padding: 12px 30px;
    }

    .contact-content {
        width: calc(100% - 40px);
        padding: 55px 25px 40px;
    }

    .slideshow-controls {
        bottom: 28px;
    }
}


/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    .slide,
    .home-content,
    .contact-content,
    .contact-backdrop,
    .contact-close i,
    .nav-link {
        transition: none;
    }
}

@media (max-width: 600px) {
    .subtitle {
        font-size: 25px;
    }
}