/* Merged Styles from template/style.css, template/responsive.css, template/performance.css */

/* --- style.css --- */
html {
    scroll-behavior: initial;
    overflow-x: hidden;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    height: 100%;
    font-family: "Montserrat", sans-serif;
    font-weight: 300;
    font-size: 7rem;
    color: #fff;
    letter-spacing: -.1rem;
    word-spacing: 6px;
    font-style: normal;
    font-variant: small-caps;
    transition: .6s ease-in-out;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #888;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #000;
}

.top-bar,
.top-bar a,
.top-bar .link-underline,
.top-bar .dropdown {
    cursor: none;
}

.top-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 20px 16px;
    width: 97%;
    height: 95vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    color: white;
    font-size: 2rem;
    mix-blend-mode: difference;
    pointer-events: none;
}

.top-left,
.top-right,
.bottom-menu {
    pointer-events: auto;
}

.top-left {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: start;
}

.top-right {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
}

.bottom-menu {
    grid-column: 1 / span 2;
    grid-row: 3;
    display: flex;
    justify-content: space-between;
    align-self: end;
    padding: 0 16px;
}

.menu {
    display: none;
}

h1 {
    margin: 0;
    font-size: 7rem;
    font-weight: 500;
    letter-spacing: -0.8rem;
    word-spacing: 6px;
    text-decoration: none;
    font-variant: small-caps;
    color: inherit;
    transition: .6s ease-in-out;
}

a {
    text-decoration: none;
    color: inherit;
    font-weight: 900;
    cursor: pointer;
}

.dropdown {
    position: relative;
    font-size: 2rem;
    font-weight: 900;
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    background-color: white;
    color: black;
    font-size: 1.6rem;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    z-index: 10000;
    transition: all .6s ease;
    pointer-events: none;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.link-underline {
    position: relative;
    display: inline-block;
    transition: color .3s ease;
}

.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width .3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

.hero {
    height: 100vh;
    width: 100%;
    background-image: url('estudio18.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.galeria {
    margin: 120px auto 0;
    column-count: 2;
    column-gap: 20px;
    padding: 0 20px;
}

.item {
    position: relative;
    margin-bottom: 150px;
    break-inside: avoid;
    cursor: none
}

.item img {
    width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: filter .3s ease;
}

.caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .6);
    color: white;
    padding: 8px 14px;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    white-space: nowrap;
    user-select: none;
}

.item:hover .caption {
    opacity: 1;
    pointer-events: auto;
}

.item:hover img {
    filter: brightness(60%);
}

.item:nth-child(3n) img {
    width: 50%;
    transform: translateX(-35%);
}

.item:nth-child(4n) img {
    width: 40%;
    transform: translateX(56%);
}

.item:nth-child(5n) img {
    width: 30%;
    transform: translateX(-84%);
}

.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10010;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, .98);
    justify-content: center;
    align-items: center;
}

.modal-body {
    display: flex;
    width: auto;
    max-width: 95%;
    height: 85%;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.modal-info {
    flex: 0 0 auto;
    max-width: 250px;
    text-align: left;
    color: #fff;
    position: relative;
}

.modal-info h2 {
    font-family: "Newsreader", serif;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-divider {
    width: 0.5px;
    height: 10px;
    background: #fff;
    margin-bottom: 20px;
}

.modal-info p {
    font-family: "Montserrat", sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.8;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    max-width: 70vw;
}

.gallery-modal img {
    animation: zoomIn .4s forwards;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.close-gallery-modal {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10100;
    transition: opacity 0.3s;
}

.close-gallery-modal:hover {
    opacity: 0.7;
}

.prev-photo,
.next-photo {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3.5rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s;
}

.prev-photo:hover {
    transform: translateY(-50%) translateX(-5px);
}

.next-photo:hover {
    transform: translateY(-50%) translateX(5px);
}

.prev-photo {
    left: 20px;
}

.next-photo {
    right: 20px;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn .4s forwards;
    width: 100%;
    height: 100%;
}

.modal-content img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

.autoshow {
    animation: autoShowAnimation both;
    animation-timeline: view(100% 5%);
}

@keyframes autoShowAnimation {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.95)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes zoomIn {
    from {
        transform: scale(.8);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1
    }

    to {
        transform: scale(.8);
        opacity: 0
    }
}

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: white;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 100000;
    transition: transform .1s ease;
    border-radius: 50%;
}

.follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, .08);
    pointer-events: none;
    z-index: 9999;
    transition: transform .15s ease-out;
    border-radius: 0;
}

.gallery-modal.show {
    display: flex;
    animation: zoomIn .4s forwards;
}

.gallery-modal.hide {
    animation: zoomOut .3s forwards;
}

.cursor.triangulo {
    width: 0;
    height: 0;
    background: none;
    border-radius: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid white;
}

/* --- performance.css --- */
.gallery-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 40px 0;
}

.load-more {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more[hidden] {
    display: none;
}

.load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.load-more:not(:disabled):hover {
    background: transparent;
    color: #ffffff;
}

.empty-state {
    color: #ffffff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    text-align: center;
}

.gallery-actions .empty-state {
    margin-top: 8px;
}

/* --- responsive.css --- */
@media screen and (max-width: 968px) {
    body {
        font-size: 4rem;
        background: #000000;
        align-items: center;
        justify-items: center;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        width: 100vw;
        height: 100vh
    }

    .top-bar {
        padding: 16px 12px;
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin-bottom: 0;
        font-size: 1rem;
        box-sizing: border-box;
    }

    h1 {
        font-size: 4rem;
        letter-spacing: -0.5rem;
        margin: 0;
    }

    .top-left {
        grid-column: 1;
    }

    .top-right {
        grid-column: 2;
    }

    .dropdown {
        font-size: 1.5rem;
    }

    .dropdown-content {
        font-size: 1.2rem;
        padding: 8px;
    }

    .bottom-menu {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 12px;
    }

    .galeria {
        column-count: 2;
        column-gap: 15px;
        padding: 0 15px;
        margin-top: 100px;
        max-width: 100vw;
        box-sizing: border-box;
        margin: 0 auto
    }

    .item {
        margin-bottom: 80px;
        break-inside: avoid;
    }

    .item img {
        width: 100%;
        transform: none !important;
        margin: 0 auto;
        display: block;
        max-width: 100%;
        height: auto
    }

    .item:nth-child(3n) img,
    .item:nth-child(4n) img,
    .item:nth-child(5n) img {
        width: 100%;
        transform: none !important;
    }

    .gallery-modal img {
        max-width: 90vw;
        max-height: 85vh;
        margin: 0 40px;
    }

    .close-gallery-modal {
        top: 20px;
        right: 20px;
        font-size: 2.2rem;
    }

    .prev-photo,
    .next-photo {
        font-size: 2.5rem;
        padding: 8px 14px;
    }

    .prev-photo {
        left: 10px;
    }

    .next-photo {
        right: 10px;
    }

    .caption {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

/* Mobile (até 768px) */
@media screen and (max-width: 768px) {

    html,
    body {
        cursor: auto;
        overflow-x: hidden;
    }

    .cursor {
        display: none;
    }

    body {
        font-size: 2.5rem;
    }

    .top-bar {
        padding: 12px 10px;
        width: 100%;
        height: auto;
        position: relative;
        min-height: auto;
    }

    h1 {
        font-size: 2.5rem;
        letter-spacing: -0.3rem;
        word-spacing: 3px;
    }

    .top-left {
        grid-column: 1;
        grid-row: 1;
    }

    .top-right {
        grid-column: 2;
        grid-row: 1;
    }

    .dropdown {
        font-size: 1.2rem;
    }

    .dropdown-content {
        font-size: 1rem;
        padding: 6px;
        left: auto;
        right: 0;
    }

    .bottom-menu {
        grid-column: 1 / span 2;
        grid-row: 2;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 10px;
        margin-top: 12px;
    }

    .menu-link {
        font-size: 1.1rem;
    }

    .galeria {
        column-count: 1;
        column-gap: 0;
        padding: 0 10px;
        margin-top: 20px;
    }

    .item {
        margin-bottom: 30px;
        break-inside: avoid;
    }

    .item img {
        width: 100%;
        max-width: 100%;
        height: auto;
        transform: none !important;
        display: block;
    }

    .item:nth-child(3n) img,
    .item:nth-child(4n) img,
    .item:nth-child(5n) img {
        width: 100%;
        transform: none !important;
    }

    .caption {
        font-size: 0.9rem;
        padding: 5px 10px;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }

    .gallery-modal {
        padding: 0;
    }

    .modal-body {
        flex-direction: column;
        width: 100%;
        height: 100%;
        gap: 20px;
        padding: 60px 20px 20px;
        box-sizing: border-box;
    }

    .modal-info {
        flex: 0 0 auto;
        width: 100%;
        padding-right: 0;
        text-align: center;
        order: 2;
        /* Texto embaixo no mobile? Ou em cima? No mobile geralmente é melhor em cima ou embaixo. Vou colocar embaixo (order 2) */
    }

    .modal-info h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .modal-divider {
        height: 1px;
        width: 40px;
        margin: 10px auto;
    }

    .modal-info p {
        font-size: 0.9rem;
    }

    .modal-image-container {
        width: 100%;
        height: 60vh;
        order: 1;
    }

    .gallery-modal img {
        max-width: 100%;
        max-height: 100%;
        margin: 0;
    }

    .close-gallery-modal {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }

    .prev-photo,
    .next-photo {
        font-size: 2.5rem;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
    }

    .prev-photo {
        left: 10px;
    }

    .next-photo {
        right: 10px;
    }

    .gallery-actions {
        margin: 30px 0;
        padding: 0 10px;
    }

    .load-more {
        padding: 10px 24px;
        font-size: 0.9rem;
        letter-spacing: 0.2rem;
        width: 100%;
        max-width: 300px;
    }

    .empty-state {
        font-size: 0.95rem;
        letter-spacing: 0.1rem;
    }

    .modal-content img {
        max-width: 95%;
        max-height: 95%;
    }
}

/* Mobile Pequeno (até 480px) */
@media screen and (max-width: 480px) {
    body {
        font-size: 2rem;
    }

    .top-bar {
        padding: 10px 8px;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: -0.2rem;
    }

    .top-left,
    .top-right {
        font-size: 0.9rem;
    }

    .dropdown {
        font-size: 1rem;
    }

    .dropdown-content {
        font-size: 0.9rem;
        padding: 5px;
    }

    .bottom-menu {
        padding: 10px 8px;
    }

    .menu-link {
        font-size: 1rem;
    }

    .galeria {
        padding: 0 8px;
        margin-top: 15px;
    }

    .item {
        margin-bottom: 20px;
    }

    .caption {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .gallery-modal img {
        max-width: 98vw;
        max-height: 92vh;
    }

    .close-gallery-modal {
        top: 5px;
        right: 5px;
        font-size: 1.8rem;
    }

    .prev-photo,
    .next-photo {
        font-size: 1.8rem;
        padding: 5px 10px;
    }

    .load-more {
        padding: 8px 20px;
        font-size: 0.85rem;
        letter-spacing: 0.15rem;
    }

    .empty-state {
        font-size: 0.85rem;
    }
}

/* Landscape Mobile (orientação horizontal) */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .top-bar {
        height: auto;
        min-height: auto;
    }

    .galeria {
        column-count: 2;
        margin-top: 80px;
    }

    .item {
        margin-bottom: 40px;
    }

    .gallery-modal img {
        max-height: 95vh;
    }
}

/* Ajustes para telas muito grandes (acima de 1400px) */
@media screen and (min-width: 1400px) {
    .galeria {
        column-count: 3;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Touch devices - melhorar área de toque */
@media (hover: none) and (pointer: coarse) {

    .prev-photo,
    .next-photo,
    .close-gallery-modal,
    .load-more {
        min-height: 44px;
        min-width: 44px;
    }

    .dropdown {
        padding: 8px 0;
    }

    .link-underline {
        padding: 4px 0;
    }
}