/* Studio reel: scroll-driven reveal to a true full-screen frame. */
.hero-reel {
    position: relative;
    min-height: 220svh;
    margin: 0 !important;
    background: #000;
}
.hero-reel__sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: #000;
    isolation: isolate;
}
.hero-reel__frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
    opacity: var(--reel-opacity, .55);
    clip-path: inset(
        var(--reel-inset-y, 10vh)
        var(--reel-inset-x, 8vw)
        round var(--reel-radius, 1.5rem)
    );
    transform: scale(var(--reel-scale, .96));
    transform-origin: center;
    will-change: clip-path, transform, opacity;
}
.hero-reel__video {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    background: #000;
    opacity: 0;
    transition: opacity .45s ease;
}
.hero-reel.is-ready .hero-reel__video { opacity: 1; }
.hero-reel__fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color: rgba(255,255,255,.65);
    background: #080808;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hero-reel.is-error .hero-reel__fallback { display: grid; }
.hero-reel__label {
    position: absolute;
    z-index: 2;
    top: max(1.25rem, env(safe-area-inset-top));
    left: var(--page-gutter);
    right: var(--page-gutter);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255,255,255,.82);
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    mix-blend-mode: difference;
    pointer-events: none;
}

/* Buttons replacing former project-page links. */
.featured-project__media {
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
}

/* Full-screen project carousel. Vertical scrolling drives horizontal media. */
.project-carousel {
    position: fixed;
    z-index: 1600;
    inset: 0;
    visibility: hidden;
    overflow: hidden;
    opacity: 0;
    background: #000;
    color: #fff;
    transition: opacity .35s ease, visibility 0s .35s;
}
.project-carousel.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}
.project-carousel__scroller {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.project-carousel__scroller::-webkit-scrollbar { display: none; }
.project-carousel__scroll-space {
    position: relative;
    min-height: 100%;
    height: var(--carousel-scroll-height, 100dvh);
}
.project-carousel__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: #000;
}
.project-carousel__track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    gap: clamp(1rem, 2vw, 2.5rem);
    width: max-content;
    padding: clamp(4.5rem, 7vh, 6rem) clamp(1rem, 4vw, 4rem) clamp(8rem, 15vh, 10rem);
    transform: translate3d(var(--carousel-x, 0px), 0, 0);
    will-change: transform;
}
.project-carousel__slide {
    position: relative;
    flex: 0 0 min(86vw, 96rem);
    height: 100%;
    overflow: hidden;
    border-radius: clamp(.65rem, 1.25vw, 1.25rem);
    background: #080808;
}
.project-carousel__slide img,
.project-carousel__slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #080808;
}
.project-carousel__slide video { outline: 0; }
.project-carousel__slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 20%;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.22));
    pointer-events: none;
}
.project-carousel__close,
.project-carousel__previous,
.project-carousel__next {
    position: absolute;
    z-index: 5;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 999px;
    color: #fff;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.project-carousel__close {
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    min-width: 4.5rem;
    min-height: 2.75rem;
    padding: .6rem 1rem;
}
.project-carousel__previous,
.project-carousel__next {
    top: 50%;
    width: 3rem;
    height: 3rem;
    overflow: hidden;
    text-indent: -999px;
    transform: translateY(-50%);
}
.project-carousel__previous { left: 1rem; }
.project-carousel__next { right: 1rem; }
.project-carousel__previous::before,
.project-carousel__next::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: .72rem;
    height: .72rem;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}
.project-carousel__previous::before { transform: translate(-35%,-50%) rotate(-135deg); }
.project-carousel__next::before { transform: translate(-65%,-50%) rotate(45deg); }
.project-carousel__close:hover,
.project-carousel__previous:hover,
.project-carousel__next:hover { background: rgba(255,255,255,.12); }
.project-carousel__meta {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem var(--page-gutter) max(1.75rem, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.88));
    pointer-events: none;
}
.project-carousel__identity { min-width: 0; pointer-events: auto; }
.project-carousel__identity p { margin: 0; }
.project-carousel__identity h2 {
    margin: 0;
    max-width: 15ch;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.2vw, 5rem);
    font-weight: 400;
    line-height: .92;
    letter-spacing: -.045em;
}
.project-carousel__description {
    margin: .7rem 0 0 !important;
    max-width: 54ch;
    color: rgba(255,255,255,.72);
    font-size: .82rem;
    line-height: 1.45;
}
.project-carousel__description a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: .18em;
    pointer-events: auto;
}
.project-carousel__status {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: .4rem;
    align-items: center;
    min-width: min(15rem, 28vw);
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .08em;
}
.project-carousel__status i {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    height: 1px;
    overflow: hidden;
    background: rgba(255,255,255,.28);
}
.project-carousel__status b {
    display: block;
    width: var(--carousel-progress, 0%);
    height: 100%;
    background: #fff;
}

@media (max-width: 700px) {
    .hero-reel { min-height: 190svh; }
    .hero-reel__label { top: max(5.5rem, env(safe-area-inset-top)); }
    .project-carousel__track {
        gap: 1rem;
        padding: 4.5rem 1rem 9.5rem;
    }
    .project-carousel__slide {
        flex-basis: calc(100vw - 2rem);
        border-radius: .75rem;
    }
    .project-carousel__previous,
    .project-carousel__next { display: none; }
    .project-carousel__meta {
        align-items: end;
        gap: 1rem;
        padding: 1.5rem 1rem max(1.25rem, env(safe-area-inset-bottom));
    }
    .project-carousel__identity h2 { font-size: clamp(2rem, 10vw, 3.5rem); }
        .project-carousel__status { min-width: 5.75rem; justify-items: end; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-reel { min-height: 100svh; }
    .hero-reel__frame {
        opacity: 1;
        clip-path: none;
        transform: none;
    }
    .project-carousel { transition: none; }
}


/* V9 - always-live, directly interactive external website previews. */
.website-stage {
    min-height: var(--website-scroll-height, 700svh);
}
.website-stage__sticky {
    isolation: isolate;
}
.website-project {
    transition: none;
    will-change: opacity, transform;
}
.website-project__copy {
    position: relative;
    z-index: 2;
}
.website-project__copy > p:not(.eyebrow):not(.muted) {
    max-width: 35rem;
}
.website-project__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.75rem;
}
.website-project__visit {
    width: fit-content;
}
.website-project__visit span {
    display: inline-block;
    margin-left: .35rem;
    transition: transform .25s ease;
}
.website-project__visit:hover span,
.website-project__visit:focus-visible span {
    transform: translate(.16rem, -.16rem);
}
.browser-frame {
    min-width: 0;
}
.browser-frame__bar {
    position: relative;
    padding-right: 1rem;
}
.browser-frame__url {
    position: absolute;
    left: 50%;
    max-width: calc(100% - 8rem);
    overflow: hidden;
    color: rgba(255,255,255,.62);
    font-family: var(--font-mono);
    font-size: .62rem;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
}
.browser-frame__viewport {
    position: relative;
    overflow: hidden;
    background: #f4f4f1;
}
.browser-frame__loading {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(0,0,0,.48);
    background: #f4f4f1;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: opacity .3s ease;
}
.browser-frame__viewport.is-loaded .browser-frame__loading {
    opacity: 0;
    pointer-events: none;
}
.browser-frame__live {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    background: #fff;
    pointer-events: auto;
}
.browser-frame__live:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: -3px;
}

@media (max-width: 900px) {
    .website-stage {
        min-height: auto !important;
    }
    .website-stage__sticky {
        display: block;
        overflow: visible;
    }
    .website-project,
    .website-project.is-active,
    .website-project.is-next,
    .website-project.is-previous {
        grid-area: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4.5rem 0;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
    .website-project + .website-project {
        border-top: 1px solid rgba(255,255,255,.12);
    }
    .browser-frame__viewport {
        height: min(70svh, 46rem);
        aspect-ratio: auto;
    }
    .website-progress {
        display: none;
    }
}

@media (max-width: 600px) {
    .website-project,
    .website-project.is-active,
    .website-project.is-next,
    .website-project.is-previous {
        padding: 3.75rem 0;
    }
    .website-project__copy h3 {
        font-size: clamp(2.65rem, 13vw, 4.7rem);
    }
    .browser-frame {
        margin-inline: calc(var(--page-gutter) * -.45);
        border-radius: .85rem;
    }
    .browser-frame__bar {
        height: 2rem;
    }
    .browser-frame__url {
        max-width: calc(100% - 6.5rem);
        font-size: .56rem;
    }
    .browser-frame__viewport {
        height: 68svh;
        min-height: 30rem;
    }
    .website-project__visit {
        width: 100%;
        justify-content: center;
    }
}


/* V10 - eight-project portrait portfolio and source-ratio project details. */
.featured-stage {
    min-height: var(--featured-scroll-height, 800vh);
}
.featured-project__media {
    width: auto;
    height: min(76svh, 52rem);
    max-width: 100%;
    aspect-ratio: 4 / 5;
    justify-self: end;
}
.featured-project__media img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
}
.project-carousel__slide {
    flex: 0 0 var(--slide-width, min(86vw, 96rem));
    width: var(--slide-width, min(86vw, 96rem));
    max-width: 92vw;
}
.project-carousel__slide img,
.project-carousel__slide video {
    object-fit: contain;
}

/* Clear human-controlled AI workflow. */
.hybrid-flow {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, auto));
    align-items: stretch;
    gap: clamp(.45rem, .9vw, .85rem);
    overflow-x: auto;
    padding: .75rem 0 1rem;
    scrollbar-width: thin;
}
.hybrid-step {
    display: grid;
    align-content: start;
    gap: .7rem;
    width: clamp(13rem, 15vw, 16rem);
    min-height: 15rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #090909;
}
.hybrid-step span {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hybrid-step h3 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 400;
    line-height: 1.05;
}
.hybrid-step p {
    margin: 0;
    color: var(--text-muted);
    font-size: .84rem;
    line-height: 1.55;
}
.hybrid-step.is-human {
    border-color: rgba(255,255,255,.32);
}
.hybrid-step.is-system {
    border-color: rgba(83,142,255,.55);
    box-shadow: inset 0 0 2.5rem rgba(0,102,255,.06);
}
.hybrid-step.is-output {
    border-color: var(--red-light);
}
.hybrid-flow__arrow {
    display: grid;
    place-items: center;
    color: var(--red-light);
    font-size: 1.3rem;
}

@media (max-width: 900px) {
    .featured-project__media {
        width: min(100%, 38rem);
        height: auto;
        justify-self: start;
    }
    .hybrid-flow {
        grid-template-columns: 1fr;
        overflow: visible;
    }
    .hybrid-step {
        width: 100%;
        min-height: auto;
    }
    .hybrid-flow__arrow {
        transform: rotate(90deg);
        min-height: 2rem;
    }
}

@media (max-width: 700px) {
    .project-carousel__slide {
        flex-basis: min(var(--slide-width, calc(100vw - 2rem)), calc(100vw - 2rem));
        width: min(var(--slide-width, calc(100vw - 2rem)), calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
    }
}

/* V13 - full-resolution portfolio grid, original image ratios and decorative motion tiles. */
.portfolio-masonry {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: clip;
    background: #000;
}
.portfolio-masonry__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2px, .18vw, 4px);
    width: 100%;
    padding: 0;
    background: #000;
}
.portfolio-masonry__item,
.portfolio-masonry__video {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #050505;
    isolation: isolate;
}
.portfolio-masonry__item {
    display: block;
    aspect-ratio: 4 / 5;
    padding: 0;
    color: inherit;
    appearance: none;
    cursor: pointer;
}
.portfolio-masonry__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: none;
    transition: filter .3s ease;
}
.portfolio-masonry__item::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    border: 1px solid transparent;
    background: transparent;
    pointer-events: none;
    transition: border-color .25s ease, background-color .25s ease;
}
.portfolio-masonry__item:hover img,
.portfolio-masonry__item:focus-visible img {
    filter: brightness(.92);
}
.portfolio-masonry__item:hover::after,
.portfolio-masonry__item:focus-visible::after {
    border-color: rgba(255,255,255,.42);
    background: rgba(0,0,0,.035);
}
.portfolio-masonry__item:focus-visible {
    outline: 2px solid var(--red-light);
    outline-offset: -2px;
}
.portfolio-masonry__video {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 7;
    pointer-events: none;
}
.portfolio-masonry__video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 900px) {
    .portfolio-masonry__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px;
    }
    .portfolio-masonry__video { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
    .portfolio-masonry__grid { grid-template-columns: minmax(0, 1fr); }
    .portfolio-masonry__video { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-masonry__item img { transition: none; }
    .portfolio-masonry__video video { display: none; }
}

/* The AI process always fits its container; it never creates horizontal scrolling. */
.ai-shell {
    min-width: 0;
    max-width: 100%;
    overflow: clip;
}
.hybrid-flow {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 1.25rem
        minmax(0, 1fr) 1.25rem
        minmax(0, 1fr) 1.25rem
        minmax(0, 1fr) 1.25rem
        minmax(0, 1fr) 1.25rem
        minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(.35rem, .65vw, .75rem);
    width: 100%;
    max-width: 100%;
    padding: .75rem 0 1rem;
    overflow: visible;
    scrollbar-width: none;
}
.hybrid-flow::-webkit-scrollbar {
    display: none;
}
.hybrid-step {
    width: auto;
    min-width: 0;
    min-height: 15rem;
    padding: clamp(.85rem, 1.35vw, 1.2rem);
}
.hybrid-step h3,
.hybrid-step p {
    overflow-wrap: anywhere;
}
.hybrid-flow__arrow {
    min-width: 0;
}

@media (max-width: 1180px) {
    .hybrid-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        padding-top: .5rem;
    }
    .hybrid-flow__arrow {
        display: none;
    }
    .hybrid-step {
        width: 100%;
        min-height: 12rem;
    }
}


@media (max-width: 650px) {
    .hybrid-flow {
        grid-template-columns: minmax(0, 1fr);
    }
    .hybrid-step {
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .ai-shell {
        width: auto;
        max-width: none;
    }
}

/* V14 - viewport hero, clean background, editorial modal titles and reliable motion tiles. */

/* Keep the complete opening section visible when the page first loads. */
.hero {
    min-height: 100svh !important;
    height: 100svh;
    display: flex !important;
    flex-direction: column;
    padding: calc(var(--header-height) + clamp(.75rem, 1.5vh, 1.5rem)) var(--page-gutter) 0 !important;
}
.hero__content {
    min-height: 0 !important;
    flex: 1 1 auto;
    justify-content: center !important;
    padding-bottom: clamp(1rem, 2vh, 1.75rem) !important;
}
.hero__eyebrow {
    margin-bottom: clamp(.75rem, 1.4vh, 1.25rem) !important;
}
.hero__title {
    max-width: 14.5ch;
    font-size: clamp(3.25rem, min(6.2vw, 8.2vh), 7.4rem) !important;
}
.hero__description {
    gap: clamp(1.5rem, 5vw, 6rem) !important;
    margin-top: clamp(1rem, 2vh, 1.7rem) !important;
}
.hero__description .lead {
    font-size: clamp(.95rem, min(1.2vw, 1.8vh), 1.2rem);
}
.hero__actions {
    margin-top: clamp(.8rem, 1.6vh, 1.3rem) !important;
}
.client-marquee__group {
    padding-block: clamp(.65rem, 1.3vh, 1rem) !important;
}

/* The old hero image contains diagonal lines; the interactive blue background remains visible. */
.hero__media img,
.hero__media::after {
    display: none !important;
}
.hero__media {
    opacity: 1 !important;
    background: transparent !important;
}

/* Match portfolio detail titles to the serif used by the main editorial headings. */
.project-carousel__identity #project-carousel-title,
.project-carousel__identity h2 {
    font-family: "PP Editorial New", "Times New Roman", Times, Georgia, serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Decorative masonry videos must remain visible and playable. */
.portfolio-masonry__video video {
    display: block !important;
}

/* Prevent background movement while project details are open. */
html.project-carousel-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .hero {
        height: auto;
        min-height: 100svh !important;
        padding-top: calc(var(--header-height) + 1.5rem) !important;
    }
    .hero__content {
        padding-bottom: 2rem !important;
    }
    .hero__title {
        font-size: clamp(2.85rem, 12vw, 4.75rem) !important;
    }
}

/* V15 - balanced hero title and edge-aligned services label. */
.hero__content {
    position: relative;
    width: 100%;
    padding-right: 0 !important;
    padding-bottom: clamp(5.5rem, 10vh, 8rem) !important;
}

.hero__title {
    width: fit-content;
    max-width: none !important;
    font-size: clamp(3.1rem, min(5.35vw, 7.6vh), 6.65rem) !important;
    line-height: .94 !important;
    letter-spacing: -.045em !important;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.hero__line-mask {
    width: fit-content;
    max-width: 100%;
}

.hero__line {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.hero__description {
    display: block !important;
    width: min(100%, 36rem);
    margin-top: clamp(1.1rem, 2.2vh, 1.8rem) !important;
}

.hero__description > div {
    width: 100%;
}

.hero__services {
    position: absolute;
    right: 0;
    bottom: clamp(1.1rem, 2.4vh, 2rem);
    width: min(42rem, 46vw);
    max-width: none !important;
    margin: 0 !important;
    text-align: right;
    justify-self: end;
    align-self: end;
}

@media (max-width: 1100px) {
    .hero__title {
        font-size: clamp(3rem, min(6.2vw, 7.2vh), 5.5rem) !important;
    }

    .hero__services {
        width: min(34rem, 48vw);
    }
}

@media (max-width: 760px) {
    .hero {
        height: auto !important;
        min-height: 100svh !important;
        min-height: 100dvh !important;
    }

    .hero__content {
        justify-content: flex-start !important;
        padding-top: clamp(1.75rem, 5vh, 3rem);
        padding-bottom: clamp(6rem, 15vh, 8.5rem) !important;
    }

    .hero__title {
        width: 100%;
        max-width: 100% !important;
        font-size: clamp(2.75rem, 10.8vw, 4.4rem) !important;
        line-height: .96 !important;
    }

    .hero__line-mask {
        width: 100%;
    }

    .hero__line {
        white-space: normal;
        text-wrap: balance;
    }

    .hero__description {
        width: 100%;
        max-width: 34rem;
    }

    .hero__services {
        right: 0;
        bottom: max(1rem, env(safe-area-inset-bottom));
        width: min(82%, 28rem);
        font-size: clamp(.58rem, 2.25vw, .7rem);
        line-height: 1.55;
    }
}

@media (max-width: 430px) {
    .hero__title {
        font-size: clamp(2.5rem, 11vw, 3.35rem) !important;
    }

    .hero__description .lead {
        font-size: .92rem;
        line-height: 1.5;
    }

    .hero__services {
        width: 88%;
    }
}


/* V16: compact bilingual header switch and category-based FAQ. */
.language-switch {
    display: inline-grid;
    place-items: center;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0 .65rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.language-switch:hover,
.language-switch:focus-visible {
    background: var(--white);
    color: var(--black);
}
.menu-panel__language {
    display: inline-flex;
    width: fit-content;
    margin-top: 2rem;
    padding: .7rem 1rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.faq-section {
    overflow: clip;
}
.faq-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .55fr);
    gap: clamp(2rem, 6vw, 7rem);
    align-items: end;
}
.faq-intro .lead {
    max-width: 42rem;
    margin: 0;
    color: var(--text-muted);
}
.faq-category-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
    margin-top: clamp(2.25rem, 5vw, 4.5rem);
}
.faq-category-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.25rem;
    padding: .75rem .9rem;
    border: 1px solid var(--border);
    border-radius: .55rem;
    background: transparent;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    transition: border-color .25s ease, background-color .25s ease, color .25s ease, transform .25s ease;
}
.faq-category-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .83rem;
    font-weight: 600;
}
.faq-category-button small {
    flex: 0 0 auto;
    font-size: .65rem;
    letter-spacing: .08em;
}
.faq-category-button:hover,
.faq-category-button:focus-visible {
    border-color: var(--border-strong);
    color: var(--white);
    transform: translateY(-1px);
}
.faq-category-button[aria-selected="true"] {
    border-color: var(--white);
    background: var(--white);
    color: var(--black);
}
.faq-panels {
    min-height: 26rem;
    margin-top: clamp(2rem, 4vw, 3.5rem);
}
.faq-panel[hidden] {
    display: none !important;
}
.faq-panel {
    animation: faq-panel-in .38s var(--ease) both;
}
@keyframes faq-panel-in {
    from { opacity: 0; transform: translateY(.8rem); }
    to { opacity: 1; transform: none; }
}
.faq-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-strong);
}
.faq-panel__head h3 {
    margin: 0;
    font-family: "PP Editorial New", "Times New Roman", Times, Georgia, serif;
    font-size: clamp(2rem, 4.2vw, 4.8rem);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.04em;
}
.faq-panel__head span {
    color: var(--text-muted);
    font-size: .72rem;
    letter-spacing: .1em;
}
.faq-section .faq-list {
    max-width: none;
    margin: 0;
}
.faq-section .faq-list details {
    border-top: 0;
    border-bottom: 1px solid var(--border);
}
.faq-section .faq-list summary {
    position: relative;
    padding: 1.15rem 3.5rem 1.15rem 0;
    font-size: clamp(1rem, 1.3vw, 1.22rem);
    line-height: 1.35;
    list-style: none;
}
.faq-section .faq-list summary::-webkit-details-marker {
    display: none;
}
.faq-section .faq-list summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: .1rem;
    transform: translateY(-50%);
    font-size: 1.3rem;
    font-weight: 300;
    transition: transform .25s ease;
}
.faq-section .faq-list details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--ease);
}
.faq-section .faq-list details[open] .faq-answer {
    grid-template-rows: 1fr;
}
.faq-answer > p {
    overflow: hidden;
}
.faq-section .faq-list details p {
    max-width: 74ch;
    margin: 0;
    padding: 0 3.5rem 1.25rem 0;
    color: var(--text-muted);
    font-size: .98rem;
    line-height: 1.65;
}
@media (max-width: 980px) {
    .faq-category-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    .site-header {
        gap: .85rem;
    }
    .site-header .language-switch {
        margin-left: auto;
    }
    .faq-intro {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}
@media (max-width: 600px) {
    .faq-category-menu {
        display: flex;
        gap: .5rem;
        margin-inline: calc(var(--page-gutter) * -1);
        padding-inline: var(--page-gutter);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .faq-category-menu::-webkit-scrollbar {
        display: none;
    }
    .faq-category-button {
        flex: 0 0 auto;
        min-width: 10.5rem;
        scroll-snap-align: start;
    }
    .faq-panels {
        min-height: 32rem;
    }
    .faq-panel__head h3 {
        font-size: clamp(2.15rem, 11vw, 3.5rem);
    }
    .faq-section .faq-list summary {
        padding-block: 1rem;
        padding-right: 2.6rem;
        font-size: 1rem;
    }
    .faq-section .faq-list details p {
        padding-right: 0;
        font-size: .94rem;
    }
}

/* STUDIO RAGE V17 FINAL CORRECTIONS */
.consent {
    display: grid !important;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: start;
    justify-content: start;
    gap: .65rem;
    width: fit-content;
    max-width: 100%;
}
.consent input[type="checkbox"] {
    width: 1rem !important;
    min-width: 1rem;
    height: 1rem !important;
    margin: .2rem 0 0 !important;
    padding: 0;
}
.consent span { min-width: 0; }
.confidentiality-note {
    width: fit-content;
    margin-top: 1.5rem;
    padding: .85rem 1rem;
    border-left: 2px solid currentColor;
    color: var(--text-muted);
    font-size: .9rem;
}
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(2.5rem, 6vw, 5rem);
}
.education-item {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255,255,255,.025);
}
.education-item strong,
.education-item span { display: block; }
.education-item strong { margin-bottom: .45rem; line-height: 1.2; }
.education-item div > span { color: var(--text-muted); font-size: .9rem; line-height: 1.55; }
.education-icon {
    display: grid !important;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
}
.education-icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.legal-main h1,
.legal-main h2 {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    letter-spacing: -.04em;
}
.legal-main h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: .95; }
.legal-main h2 { margin-top: 2.6rem; font-size: clamp(1.7rem, 3.5vw, 3rem); line-height: 1; }
.legal-main a:not(.button):not(.wordmark):not(.language-switch) {
    text-decoration: underline;
    text-underline-offset: .18em;
}
.field input[type="number"] { appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { margin: 0; }
.form-status { min-height: 1.5em; }
.form-status:not(:empty) { margin-bottom: 1rem; }
.button[disabled] { cursor: wait; opacity: .65; }

@media (max-width: 850px) {
    .education-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .education-item { grid-template-columns: 2.4rem minmax(0, 1fr); }
    .education-icon { width: 2.4rem; height: 2.4rem; }
    .consent { gap: .55rem; }
}
/* Selected clients: taille et espacement harmonisés */

.client-marquee__group {
    align-items: center !important;
    gap: clamp(1rem, 1.8vw, 1.75rem) !important;
    padding-inline: .75rem !important;
}

.client-marquee__item {
    flex: 0 0 clamp(8rem, 10vw, 10rem) !important;
    width: clamp(8rem, 10vw, 10rem) !important;
    height: clamp(4.2rem, 5.5vw, 5rem) !important;

    display: grid !important;
    place-items: center !important;

    overflow: visible !important;
}

.client-marquee__item img {
    display: block !important;

    width: clamp(7rem, 8.5vw, 8.75rem) !important;
    height: clamp(3.3rem, 4.5vw, 4rem) !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: contain !important;
    object-position: center !important;

    transform-origin: center !important;
}

/*
Les fichiers PNG n'ont pas tous les mêmes marges transparentes.
Ces ajustements compensent leurs différences réelles.
*/

.client-marquee__item img[src$="16.png"],
.client-marquee__item img[src$="18.png"] {
    transform: scale(1.9);
}

.client-marquee__item img[src$="19.png"] {
    transform: scale(2);
}

.client-marquee__item img[src$="23.png"] {
    transform: scale(1.9);
}

.client-marquee__item img[src$="26.png"] {
    transform: scale(1.25);
}

.client-marquee__item img[src$="20.png"],
.client-marquee__item img[src$="27.png"],
.client-marquee__item img[src$="29.png"] {
    transform: scale(.92);
}

@media (max-width: 600px) {
    .client-marquee__group {
        gap: .85rem !important;
    }

    .client-marquee__item {
        flex-basis: 7.5rem !important;
        width: 7.5rem !important;
        height: 4.25rem !important;
    }

    .client-marquee__item img {
        width: 6.5rem !important;
        height: 3.25rem !important;
    }
}
/* Selected clients : défilement continu sans vide */

.client-marquee {
    width: 100%;
    overflow: hidden;
}

.client-marquee__track {
    display: flex !important;
    align-items: center;
    width: max-content !important;
    gap: 0 !important;
    will-change: transform;
    animation: clients-marquee 32s linear infinite !important;
}

.client-marquee__group {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;

    /* L’espace est intégré dans chaque groupe pour éviter une coupure */
    gap: clamp(1rem, 1.8vw, 1.75rem) !important;
    padding-right: clamp(1rem, 1.8vw, 1.75rem) !important;
}

.client-marquee__item {
    flex: 0 0 clamp(8rem, 10vw, 10rem) !important;
    width: clamp(8rem, 10vw, 10rem) !important;
    height: clamp(4.2rem, 5.5vw, 5rem) !important;

    display: grid !important;
    place-items: center !important;
}

.client-marquee__item img {
    display: block !important;
    width: clamp(7rem, 8.5vw, 8.75rem) !important;
    height: clamp(3.3rem, 4.5vw, 4rem) !important;
    object-fit: contain !important;
    object-position: center !important;
    transform-origin: center center !important;
}

/* Correction spécifique du logo Xemantic, normalement 15.png */
.client-marquee__item img[src$="15.png"] {
    transform: scale(1.18) translateY(-1px) !important;
    width: 8.25rem !important;
    height: 3.4rem !important;
}

/* Conserve aussi les compensations précédentes */
.client-marquee__item img[src$="16.png"],
.client-marquee__item img[src$="18.png"] {
    transform: scale(1.9);
}

.client-marquee__item img[src$="19.png"] {
    transform: scale(2);
}

.client-marquee__item img[src$="23.png"] {
    transform: scale(1.9);
}

.client-marquee__item img[src$="26.png"] {
    transform: scale(1.25);
}

.client-marquee__item img[src$="20.png"],
.client-marquee__item img[src$="27.png"],
.client-marquee__item img[src$="29.png"] {
    transform: scale(.92);
}

@keyframes clients-marquee {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@media (max-width: 600px) {
    .client-marquee__track {
        animation-duration: 24s !important;
    }

    .client-marquee__group {
        gap: .85rem !important;
        padding-right: .85rem !important;
    }

    .client-marquee__item {
        flex-basis: 7.5rem !important;
        width: 7.5rem !important;
        height: 4.25rem !important;
    }

    .client-marquee__item img {
        width: 6.5rem !important;
        height: 3.25rem !important;
    }

    .client-marquee__item img[src$="15.png"] {
        width: 7rem !important;
        height: 3rem !important;
    }
}
/* Marquee en pleine largeur de l’écran */

.client-marquee {
    width: calc(
        100% + var(--page-gutter) + var(--page-gutter)
    ) !important;

    max-width: none !important;

    margin-left: calc(0px - var(--page-gutter)) !important;
    margin-right: calc(0px - var(--page-gutter)) !important;

    align-self: stretch !important;
    overflow: hidden !important;
}

.client-marquee__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
}

.client-marquee__group {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
}
