* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: #FEFEFE;
    color: #181918;
    overflow-x: hidden;
}

body > #hero,
body > #gallery,
body > footer {
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.loaded > #hero,
body.loaded > #gallery,
body.loaded > footer {
    opacity: 1;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FEFEFE;
    transition: opacity 1s ease;
}

.loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-title {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
    color: #181918;
}

.loader-title .loader-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.3em);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.loader-title .loader-word.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll indicator animation */
@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.scroll-indicator {
    animation: scrollDown 2s ease-in-out infinite;
}

#scroll-indicator {
    transition: opacity 0.4s ease;
}

#scroll-indicator.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.mouse-icon {
    width: 24px;
    height: 38px;
    border: 1.5px solid #181918;
    border-radius: 12px;
    position: relative;
    opacity: 0.4;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: #181918;
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

/* Gallery item hover */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img,
.gallery-item video {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0,0,0,0.15);
}

.gallery-icon {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: white;
}

.gallery-item:hover .gallery-icon {
    opacity: 1;
    transform: scale(1);
}

/* Divider line */
.divider-line {
    width: 60px;
    height: 3px;
    background: #181918;
    margin: 1.5rem 0;
}

.divider-line--grow {
    width: 0;
}

body.loaded .divider-line--grow {
    animation: dividerGrow 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards;
}

@keyframes dividerGrow {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Hero interactive box */
.hero-box {
    background-color: #181918;
    transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

.hero-box:hover {
    background-color: #232523;
    transform: scale(1.015);
}

.hero-box-text {
    width: 100%;
    text-align: left;
    padding: 0;
    font-size: 4rem;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.hero-box-text .rotating-word {
    display: inline;
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Contact links */
.contact-link {
    transition: opacity 0.3s ease;
}
.contact-link:hover {
    opacity: 0.6;
}

.text-secondary {
    color: rgba(24, 25, 24, 0.6);
}

/* Aspect ratio square */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Fancybox custom */
.fancybox__container {
    --fancybox-bg: rgba(254, 254, 254, 0.95);
    --fancybox-color: #181918;
}

.fancybox__toolbar {
    --f-button-bg: transparent;
    --f-button-color: #181918;
}

.fancybox__nav {
    --f-button-bg: transparent;
    --f-button-color: #181918;
}
