

:root {
    --shadow-panel-outer: inset 4px 4px 4px -1px rgba(54, 54, 54, 0.1),
                          inset -4px -4px 6px -1px rgba(255, 255, 255, 0.9),
                          inset -3px -2px 2px -1px rgba(0, 0, 0, 1);
    --shadow-panel-inner: inset -4px -4px 2px -1px rgba(0, 0, 0, 0.2),
                          inset 4px 4px 4px -1px rgba(255, 255, 255, 1);
    --shadow-pill: inset -2px -2px 2px 0px rgba(0, 0, 0, 0.2),
                   inset 4px 4px 4px -1px rgba(255, 255, 255, 1);
}

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

body {

    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    font-family: "joly-text", sans-serif;
    line-height: 1.4;
    overflow-x: hidden;
    background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(222, 222, 222) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* iOS fix for background attachment */
@media screen and (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

main {
    margin: 40px 40px 0;
    padding: 0;
}
footer {
    margin: 0 40px;
}

/* --- HEADER GROUP: ABOUT | CLIENTS --- */

.top-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.top-row > .about {
    flex: 2;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.top-row > .clients {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover, a:focus, a:active {
    color: inherit;
    text-decoration: none;
}

/* Focus styles for accessibility */
a:focus, button:focus, .contact-button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* --- GENERAL --- */
h1, h2 {
    font-family: "joly-headline", sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 24px;
    color: #595959;
    text-align: center;
    font-synthesis: none;
}

.titles {
    padding: 2px 20px;
    margin: 4px 10px;
}

/* --- SHARED PANEL STYLES --- */

.section-panel {
    margin: 10px auto;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #c0c0c0;
    box-shadow: var(--shadow-panel-outer);
    display: flex;
    flex-direction: column;
}

.inner-panel {
    padding: 10px 16px;
    margin: 0 10px 10px;
    overflow: hidden;
    background-color: #f6f6f6;
    box-shadow: var(--shadow-panel-inner);
    flex: 1;
}


.pill {
    padding: 0.2rem 0.6rem;
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    color: #000;
    box-shadow: var(--shadow-pill);
    transition: 0.8s ease;
}

/* —— CLEAN SLIDER ——*/

.image-slider {
    position: relative;
    overflow: hidden;
    --slider-img-width: 800px;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.slider-track {
    display: flex;
    align-items: center;
    will-change: transform;
}

.slider-img {
    padding: 10px 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-img img,
.slider-img video {
    max-width: 100%;
    height: auto;
    max-height: calc((var(--slider-img-width) - 20px) * 9 / 16);
    object-fit: contain;
    transform: translate3d(0, 0, 0);
    cursor: pointer;
}

/* --- RESPONSIVE BREAKPOINTS --- */

@media (max-width: 1199px) {
    main, footer { margin-left: 100px; margin-right: 100px; }
}

@media (max-width: 991px) {
    main, footer { margin-left: 50px; margin-right: 50px; }
}

@media (max-width: 767px) {
    main, footer { margin-left: 20px; margin-right: 20px; }
}

@media (max-width: 575px) {
    main, footer { margin-left: 10px; margin-right: 10px; }
    main { margin-top: 10px; }
    .top-row {
        flex-direction: column;
    }

    h1, h2 {
        font-style: italic;
        font-weight: 700;
        font-size: 18px;
    }

    .titles {
        padding: 10px 20px;
        margin: 2px 10px;
    }

    .section-panel { max-width: 555px; }

    .inner-panel {
        padding: 12px;
        margin: 0 10px 10px;
    }


    .pill { font-size: 14px; padding: 0.4rem 0.8rem; }

    .image-slider { --slider-img-width: 550px; }
    .slider-img { padding: 8px; margin-bottom: 4px; }
}

@media (max-width: 319px) {
    main, footer { margin-left: 8px; margin-right: 8px; }
    main { margin-top: 8px; }

    h1, h2 { font-size: 18px; font-style: italic; font-weight: 700; }

    .titles {
        padding: 8px 20px;
        margin: 2px 8px;
    }

    .section-panel {
        max-width: 320px;
        margin: 8px auto;
    }

    .inner-panel {
        padding: 10px;
        margin: 0 8px 8px;
    }


    .pill { font-size: 14px; padding: 0.2rem 0.4rem; }

    .image-slider { --slider-img-width: 400px; }
    .slider-img { padding: 6px; }
}

/* --- LIGHTBOX --- */

#lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

#lightbox-overlay.lightbox-visible {
    opacity: 1;
}

#lightbox-img,
#lightbox-video {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    cursor: default;
}

#lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: #fff;
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-pill);
    transition: transform 0.2s ease;
}

#lightbox-close:hover {
    transform: scale(1.08);
}

#lightbox-prev,
#lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: #fff;
    border: none;

    color: #000;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-pill);
    transition: transform 0.2s ease;
}

#lightbox-prev { left: 24px; }
#lightbox-next { right: 24px; }

#lightbox-prev:hover,
#lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}
