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

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    background: #ffffff;
    color: #0a0a0a;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

/* ── Top nav ── */

#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 1.2rem 2.5rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    transition: background 0.8s ease, border-color 0.8s ease;
}

body.client-active #top-nav {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

#nav-main {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #0a0a0a;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

#nav-main:hover        { color: rgba(10, 10, 10, 0.35); }
#nav-main:focus        { outline: none; }
body.client-active #nav-main       { color: #ffffff; }
body.client-active #nav-main:hover { color: rgba(255, 255, 255, 0.35); }

.nav-links {
    display: contents;
}

.nav-links a {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #0a0a0a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover   { color: rgba(10, 10, 10, 0.35); }
.nav-links a:visited { color: #0a0a0a; }
.nav-links a:focus   { outline: none; }
body.client-active .nav-links a       { color: #ffffff; }
body.client-active .nav-links a:hover { color: rgba(255, 255, 255, 0.35); }

/* ── Sub-pages ── */

.page-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 0 12vw;
}

.nav-active {
    opacity: 1 !important;
}

.section-label {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.3;
    margin-bottom: 3rem;
}

.team {
    display: flex;
    gap: 6rem;
}

.member-name {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.member-role {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.35;
}

.section-body {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: #0a0a0a;
    text-decoration: none;
    opacity: 0.7;
}

a.section-body:hover {
    opacity: 1;
}

/* ── Background layers ── */

#parallax-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.8s ease;
}

#slideshow {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

#slideshow .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

#slideshow .slide.active {
    opacity: 1;
}

#slideshow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* ── Client active state ── */

#slideshow-nav {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.client-active #slideshow-nav {
    opacity: 1;
}

#slideshow-nav button {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.8rem 1.1rem;
    pointer-events: auto;
    overflow: hidden;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
}

#slideshow-nav button svg {
    max-width: 48px;
    opacity: 1;
    flex-shrink: 0;
    transition: max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

#slideshow-nav button:hover svg {
    max-width: 0;
    opacity: 0;
}

.slide-label {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    font-size: 0.45rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    transition: max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease 0.15s;
}

#slideshow-nav button:hover .slide-label {
    max-width: 200px;
    opacity: 1;
}

#slideshow-nav button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

#prev-slide:hover {
    transform: translateX(-4px);
}

#next-slide:hover {
    transform: translateX(4px);
}

body.client-active #slideshow        { opacity: 1; }
body.client-active #parallax-container { opacity: 0; }
body.client-active .hero-logo        { filter: invert(1); cursor: pointer; }
body.client-active .hero-tagline     { opacity: 0; }
body.client-active .clients-title    { color: #ffffff; opacity: 0.4; }
body.client-active .client-logo img  { filter: invert(1); }
body.client-active .client-label     { color: #ffffff; }

/* ── Parallax symbols ── */

.parallax-symbol {
    position: absolute;
    transform-origin: center center;
    will-change: transform;
    filter: none;
    user-select: none;
    pointer-events: none;
}

/* ── Layout ── */

main {
    position: relative;
    z-index: 1;
}

.hero {
    height: 100vh;
    position: relative;
}

/* ── Hero center ── */

.hero-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.logo-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.5s ease;
}

.hero-logo {
    width: clamp(210px, 31vw, 286px);
    transition: filter 0.8s ease;
    display: block;
    margin-bottom: clamp(-11px, -0.8vw, -5px);
}

.hero-tagline {
    position: absolute;
    bottom: calc(50% - 90px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    white-space: nowrap;
    background: linear-gradient(
        90deg,
        rgba(10,10,10,0.3) 0%,
        rgba(10,10,10,0.3) 35%,
        rgba(10,10,10,0.75) 50%,
        rgba(10,10,10,0.3) 65%,
        rgba(10,10,10,0.3) 100%
    );
    background-size: 250% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: tagline-wake 6s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

@keyframes tagline-wake {
    0%   { background-position: 150% center; }
    50%  { background-position: -50% center; }
    100% { background-position: 150% center; }
}

/* ── Active client display ── */

.active-separator {
    font-size: 1.1rem;
    line-height: 1;
    color: #ffffff;
    opacity: 0;
    font-weight: 200;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    pointer-events: none;
}

.active-client-logo {
    width: clamp(100px, 15vw, 200px);
    height: auto;
    object-fit: contain;
    filter: invert(1);
    display: block;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-top: 0.3rem;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease;
    pointer-events: none;
}

body.client-active .active-separator {
    opacity: 0.3;
    max-height: 50px;
    pointer-events: auto;
}

body.client-active .active-client-logo {
    opacity: 1;
    max-height: 200px;
    pointer-events: auto;
}

/* ── Clients row ── */

.clients {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1.5rem 2.5rem;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    transition: background 0.8s ease, backdrop-filter 0.8s ease, border-color 0.8s ease;
}

body.client-active .clients {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-color: rgba(255, 255, 255, 0.1);
}

.clients-title {
    text-align: center;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    opacity: 0.3;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    transition: color 0.8s ease, opacity 0.4s ease;
}

.clients-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    padding: 0.5rem 0;
}

.client-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.client-logo img {
    height: 28px;
    width: auto;
    opacity: 0.4;
    transition: transform 0.3s ease, opacity 0.3s ease, filter 0.8s ease;
    display: block;
    animation: logo-idle 3s ease-in-out infinite;
}

.client-logo:nth-child(1) img { animation-delay: 0s; }
.client-logo:nth-child(2) img { animation-delay: 0.4s; }
.client-logo:nth-child(3) img { animation-delay: 0.8s; }
.client-logo:nth-child(4) img { animation-delay: 1.2s; }
.client-logo:nth-child(5) img { animation-delay: 1.6s; }

@keyframes logo-idle {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.65; }
}

.client-label {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    color: #0a0a0a;
}

.client-logo:hover img {
    opacity: 1;
    transform: scale(1.1);
    animation: none;
}

.client-logo:hover .client-label {
    opacity: 0.5;
    transform: translateY(0);
}

body.client-active .client-label { color: #ffffff; }

/* ── Mobile ── */

@media (max-width: 768px) {
    #slideshow-nav {
        align-items: flex-end;
        justify-content: center;
        gap: 1.5rem;
        padding: 0 0 13rem 0;
    }

    #prev-slide:hover { transform: none; }
    #next-slide:hover { transform: none; }

    .clients {
        bottom: 2rem;
    }

    .clients-row {
        gap: 1.8rem;
        padding: 0 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .client-logo img {
        height: clamp(16px, 3.5vw, 24px);
    }
}
