:root {
    --ink: #eef7ff;
    --muted: rgba(220, 234, 246, 0.68);
    --blue: #bfefff;
    --blue-soft: #d8f6ff;
    --glass: rgba(12, 18, 24, 0.36);
    --line: rgba(220, 238, 250, 0.72);
    --pill: #d7e8f3;
    --black: #030506;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--black);
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: var(--black);
    color: var(--ink);
    font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.has-lightbox {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

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

button {
    color: inherit;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
}

.fixed-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #020304;
    pointer-events: none;
}

.portrait,
.shade {
    position: absolute;
    inset: 0;
}

.portrait {
    background-image: url("/assets/hero/nicolas-demade-bg.png");
    background-position: left center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.012);
    animation: portrait-in 1400ms var(--ease) both;
    transition: filter 460ms var(--ease), opacity 460ms var(--ease);
}

body.has-scrolled-content .portrait {
    filter: blur(4px) brightness(0.72);
}

.shade {
    background:
        radial-gradient(circle at 72% 44%, rgba(25, 125, 190, 0.08), transparent 22rem),
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0 38%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.48) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.22) 70%, rgba(0, 0, 0, 0.78) 100%);
}

.top-nav {
    position: fixed;
    z-index: 30;
    top: 2.25rem;
    right: 4.6rem;
    display: flex;
    align-items: center;
    gap: 3.2rem;
    padding: 1.08rem 2.35rem;
    border: 1.5px solid rgba(220, 238, 250, 0.68);
    border-radius: 999px;
    background: rgba(14, 19, 24, 0.26);
    backdrop-filter: blur(22px) saturate(1.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 54px rgba(0, 0, 0, 0.28);
    opacity: 0;
    animation: nav-in 900ms var(--ease) 550ms both;
    transition: opacity 240ms ease, transform 360ms var(--ease);
}

.top-nav.is-collapsed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 2.5rem));
}

.top-nav a {
    color: rgba(228, 239, 248, 0.78);
    font-size: 1.16rem;
    font-weight: 600;
    line-height: 1;
    transition: color 180ms ease, transform 180ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    color: #ffffff;
    transform: translateY(-1px);
}

.site-shell {
    position: relative;
    z-index: 2;
}

.hero {
    position: relative;
    min-height: 100svh;
}

.brand-lockup {
    position: absolute;
    top: 25svh;
    right: 10vw;
    width: min(38.5vw, 651px);
    display: grid;
    justify-items: center;
    gap: 1.65rem;
    text-align: center;
    animation: lockup-in 1300ms var(--ease) 350ms both;
}

.liquid-logo {
    position: relative;
    width: 11.2rem;
    aspect-ratio: 1;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transform: translateZ(0);
}

.liquid-logo::after {
    display: none;
}

.metal-sheet,
.metal-depth {
    display: none;
}

.metal-sheet {
    z-index: 1;
    inset: -18%;
    background-image: url("/assets/brand/chromatic-metal-blue.png");
    background-position: 35% 44%;
    background-size: 178% 178%;
    filter: url("#liquid-warp") saturate(1.42) contrast(1.08) brightness(1.22);
    will-change: transform, background-position;
    animation:
        metal-flow 21s linear infinite,
        metal-drift 13s ease-in-out infinite alternate;
}

.metal-depth {
    z-index: 2;
    background:
        radial-gradient(circle at 27% 22%, rgba(96, 211, 255, 0.16), transparent 19%),
        radial-gradient(circle at 72% 72%, rgba(4, 26, 65, 0.2), transparent 33%),
        linear-gradient(140deg, rgba(70, 195, 255, 0.1), transparent 35%, rgba(0, 21, 48, 0.18) 82%);
    mix-blend-mode: soft-light;
    opacity: 0.72;
}

.house-mark {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0.18rem 0.38rem rgba(0, 25, 48, 0.25));
}

.brand-copy {
    display: grid;
    justify-items: center;
    gap: 1.45rem;
    width: 100%;
}

.wordmark {
    width: min(100%, 850px);
}

.trade-mark {
    width: min(70%, 610px);
}

.baseline-mark {
    width: min(43%, 410px);
    opacity: 0.94;
}

.content-section {
    position: relative;
    min-height: 100svh;
    padding: 8rem 5vw 8rem 48vw;
}

.floating-content,
.services-shell {
    width: min(46vw, 860px);
}

.floating-content {
    position: relative;
    padding-left: 2.25rem;
    border-left: 3px solid var(--blue);
}

.section-kicker {
    margin: 0 0 1rem;
    color: var(--blue);
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
}

.floating-content h1,
.floating-content h2,
.services-intro h2,
.service-copy h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0;
}

.floating-content h1,
.floating-content h2 {
    font-size: clamp(2.2rem, 4vw, 4.5rem);
}

.services-intro h2 {
    font-size: clamp(1.32rem, 2.4vw, 2.7rem);
}

.floating-content p:not(.section-kicker),
.service-copy p:not(.service-index) {
    color: var(--blue-soft);
    font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    line-height: 1.32;
}

.floating-content p:not(.section-kicker) {
    font-size: 1.2rem;
}

.service-copy p:not(.service-index) {
    font-size: 1rem;
}

.quiet-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.quiet-metrics span,
.contact-actions a {
    min-height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 1.1rem;
    border-radius: 999px;
    background: var(--pill);
    color: #101820;
    font-size: 0.92rem;
    font-weight: 600;
}

.services-section {
    padding-top: 7rem;
}

.service-tabs {
    position: sticky;
    z-index: 32;
    top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 4.7rem;
    padding: 0.55rem;
    border: 1.2px solid rgba(220, 238, 250, 0.42);
    border-radius: 999px;
    background: rgba(14, 19, 24, 0.28);
    backdrop-filter: blur(22px) saturate(1.16);
    box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.24);
    transition: transform 280ms var(--ease);
}

.service-tabs.is-main-menu-visible {
    transform: translateY(5.35rem);
}

.service-tab {
    min-height: 2.55rem;
    padding: 0.2rem 1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(232, 243, 250, 0.72);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.service-tab:hover,
.service-tab:focus-visible {
    color: #ffffff;
    transform: translateY(-1px);
}

.service-tab.is-active {
    background: var(--pill);
    color: #101820;
}

.services-intro {
    margin-bottom: 5.5rem;
}

.service-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.9fr);
    gap: 2.4rem;
    align-items: start;
    min-height: 78svh;
    padding: 3.5rem 0;
    scroll-margin-top: 8rem;
}

.service-panel::before {
    content: "";
    position: absolute;
    top: 3.5rem;
    bottom: 3.5rem;
    left: -2rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), rgba(38, 168, 255, 0.18));
    box-shadow: 0 0 1.7rem rgba(38, 168, 255, 0.28);
}

.service-index {
    margin: 0 0 0.9rem;
    color: rgba(124, 207, 255, 0.5);
    font-size: 0.88rem;
    font-weight: 800;
}

.service-copy h3 {
    margin-bottom: 1.4rem;
    font-size: clamp(1.35rem, 2.4vw, 2.88rem);
    font-style: italic;
}

.brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.brand-row img {
    width: auto;
    max-width: 10rem;
    max-height: 3.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(238, 247, 255, 0.92);
    object-fit: contain;
}

.service-carousel {
    align-self: center;
    min-width: 0;
}

.carousel-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(8, 12, 16, 0.52);
    box-shadow: 0 1.6rem 4.5rem rgba(0, 0, 0, 0.28);
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-y;
}

.carousel-viewport::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    height: clamp(21rem, 39vw, 33rem);
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    cursor: zoom-in;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.carousel-button {
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(220, 238, 250, 0.58);
    border-radius: 999px;
    background: rgba(14, 19, 24, 0.28);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    backdrop-filter: blur(16px);
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.carousel-button:hover,
.carousel-button:focus-visible {
    background: var(--pill);
    color: #101820;
    transform: translateY(-1px);
}

.carousel-count {
    min-width: 3.4rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}

.carousel-dots {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    min-height: 0.45rem;
    margin-top: 0.75rem;
}

.carousel-dot {
    width: 0.42rem;
    height: 0.42rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(220, 238, 250, 0.36);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

.carousel-dot.is-active {
    width: 1.4rem;
    background: var(--blue);
}

.service-carousel.is-static .carousel-controls,
.service-carousel.is-static .carousel-dots {
    display: none;
}

.lightbox {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 2rem);
    padding: clamp(1rem, 4vw, 4rem);
    background: rgba(2, 5, 8, 0.94);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-figure {
    width: min(100%, 78rem);
    max-height: calc(100svh - 5rem);
    display: grid;
    justify-self: center;
    gap: 0.9rem;
    margin: 0;
}

.lightbox-figure img {
    width: 100%;
    max-height: calc(100svh - 7.5rem);
    display: block;
    object-fit: contain;
}

.lightbox-figure figcaption {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
}

.lightbox-close,
.lightbox-arrow {
    display: grid;
    place-items: center;
    border: 1px solid rgba(220, 238, 250, 0.62);
    border-radius: 999px;
    background: rgba(12, 18, 24, 0.56);
    color: var(--ink);
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(16px);
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
    background: var(--pill);
    color: #101820;
    transform: translateY(-1px);
}

.lightbox-close {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.75rem;
    line-height: 1;
}

.lightbox-arrow {
    width: 3.1rem;
    height: 3.1rem;
    font-size: 1.45rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-actions a {
    font-size: 1rem;
    transition: transform 180ms ease, background 180ms ease;
}

.contact-actions a:hover,
.contact-actions a:focus-visible {
    background: #ffffff;
    transform: translateY(-1px);
}

.certifications {
    position: fixed;
    z-index: 25;
    right: 4.7rem;
    bottom: 2.9rem;
    display: flex;
    align-items: end;
    gap: 2.35rem;
    opacity: 0;
    transform: translateY(0.75rem);
    pointer-events: none;
    transition: opacity 320ms ease, transform 420ms var(--ease);
}

.certifications.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.certifications a {
    display: block;
    transition: transform 180ms ease;
}

.certifications a:hover,
.certifications a:focus-visible {
    transform: translateY(-2px);
}

.certifications img {
    display: block;
    width: auto;
    max-height: 7.4rem;
    object-fit: contain;
}

.certifications a:first-child img {
    max-height: 6.7rem;
}

.reveal {
    opacity: 0;
    transform: translateY(2.6rem);
    transition:
        opacity 900ms ease,
        transform 900ms var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes portrait-in {
    from {
        opacity: 0;
        transform: scale(1.04);
    }
    to {
        opacity: 1;
        transform: scale(1.012);
    }
}

@keyframes nav-in {
    to {
        opacity: 1;
    }
}

@keyframes lockup-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes certs-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes metal-flow {
    0% {
        background-position: 32% 43%;
        transform: translate3d(-3%, -2%, 0) scale(1.12) rotate(0deg);
    }
    25% {
        background-position: 62% 34%;
        transform: translate3d(2%, -4%, 0) scale(1.17) rotate(5deg);
    }
    50% {
        background-position: 74% 67%;
        transform: translate3d(4%, 3%, 0) scale(1.14) rotate(11deg);
    }
    75% {
        background-position: 38% 74%;
        transform: translate3d(-2%, 4%, 0) scale(1.18) rotate(6deg);
    }
    100% {
        background-position: 32% 43%;
        transform: translate3d(-3%, -2%, 0) scale(1.12) rotate(0deg);
    }
}

@keyframes metal-drift {
    from {
        border-radius: 48% 52% 50% 50%;
    }
    to {
        border-radius: 52% 48% 49% 51%;
    }
}

@media (max-width: 1360px) {
    .top-nav {
        right: 2.5rem;
    }

    .brand-lockup {
        right: 5vw;
        width: min(39.2vw, 532px);
    }

    .liquid-logo {
        width: 9.1rem;
    }

    .floating-content,
    .services-shell {
        width: min(49vw, 760px);
    }

    .service-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .carousel-slide {
        height: min(62vw, 34rem);
    }
}

@media (max-width: 980px) {
    .fixed-scene {
        position: fixed;
    }

    .portrait {
        background-position: left center;
        opacity: 1;
    }

    .shade {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82)),
            linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.46));
        opacity: 0;
        transition: opacity 460ms var(--ease);
    }

    body.has-scrolled-content .shade {
        opacity: 1;
    }

    .top-nav {
        top: calc(0.75rem + env(safe-area-inset-top));
        left: 50%;
        right: auto;
        width: min(86vw, 29rem);
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.82rem 1rem;
        transform: translateX(-50%);
    }

    .top-nav.is-collapsed {
        transform: translate(-50%, calc(-100% - 2rem));
    }

    .top-nav a {
        font-size: 0.9rem;
    }

    .brand-lockup {
        top: 20svh;
        left: 50%;
        right: auto;
        width: min(76vw, 29.4rem);
        transform: translateX(-50%);
    }

    .liquid-logo {
        width: 7.4rem;
    }

    .trade-mark {
        width: min(82%, 31rem);
    }

    .baseline-mark {
        width: min(58%, 22rem);
    }

    .content-section {
        min-height: auto;
        padding: 6.5rem 1rem 5rem;
    }

    .floating-content,
    .services-shell {
        width: 100%;
    }

    .floating-content {
        padding-left: 1rem;
    }

    .floating-content h1,
    .floating-content h2 {
        font-size: 2.15rem;
    }

    .services-intro h2 {
        font-size: 1.29rem;
    }

    .floating-content p:not(.section-kicker),
    .service-copy p:not(.service-index) {
        font-size: 1.03rem;
    }

    .service-copy p:not(.service-index) {
        font-size: 0.95rem;
    }

    .service-tabs {
        top: 4.9rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-right: -1rem;
        margin-bottom: 2.5rem;
        padding: 0.45rem;
        border-radius: 1.15rem;
        scrollbar-width: none;
    }

    .service-tabs.is-main-menu-visible {
        transform: none;
    }

    .service-tabs::-webkit-scrollbar {
        display: none;
    }

    .service-tab {
        flex: 0 0 auto;
    }

    .service-panel {
        gap: 1.25rem;
        min-height: auto;
        padding: 2.25rem 0 3.5rem 1rem;
    }

    .service-panel::before {
        left: 0;
        top: 2.25rem;
        bottom: 3.5rem;
    }

    .service-copy h3 {
        font-size: 1.53rem;
    }

    .carousel-slide {
        height: min(88vw, 27rem);
    }

    .brand-row img {
        max-width: 8rem;
    }

    .certifications {
        right: 0.85rem;
        bottom: 0.85rem;
        gap: 0.65rem;
    }

    .certifications img {
        max-height: 3.25rem;
    }

    .certifications a:first-child img {
        max-height: 3rem;
    }
}

@media (max-width: 560px) {
    .top-nav {
        width: min(82vw, 24rem);
        gap: 0.3rem;
    }

    .top-nav a {
        font-size: 0.82rem;
    }

    .brand-lockup {
        top: 53svh;
        width: min(82vw, 25rem);
    }

    .liquid-logo {
        width: 6.2rem;
    }

    .brand-copy {
        gap: 0.8rem;
    }

    .content-section {
        padding-top: 6rem;
    }

    .entreprise-section {
        padding-top: 7.5rem;
    }

    .services-section {
        padding-top: 5.25rem;
    }

    .floating-content h1,
    .floating-content h2 {
        font-size: 1.85rem;
        line-height: 1.08;
    }

    .floating-content p:not(.section-kicker) {
        font-size: 1rem;
        line-height: 1.45;
    }

    .services-intro {
        margin-bottom: 3.25rem;
    }

    .services-intro h2 {
        font-size: 1.18rem;
        line-height: 1.25;
    }

    .service-tabs {
        top: 4.55rem;
        margin-left: -1rem;
        margin-bottom: 2.25rem;
    }

    .service-tab {
        min-height: 2.4rem;
        padding: 0.2rem 0.85rem;
        font-size: 0.84rem;
    }

    .service-copy h3 {
        margin-bottom: 1rem;
        font-size: 1.42rem;
    }

    .service-copy p:not(.service-index) {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .service-panel {
        padding-bottom: 3rem;
    }

    .carousel-slide {
        height: min(96vw, 24rem);
    }

    .carousel-controls {
        justify-content: space-between;
    }

    .carousel-dots {
        justify-content: center;
        overflow-x: auto;
        padding: 0.2rem 0;
    }

    .quiet-metrics span,
    .contact-actions a {
        width: 100%;
    }

    .lightbox {
        display: block;
        padding: 1rem;
    }

    .lightbox-figure {
        height: 100%;
        display: grid;
        align-content: center;
    }

    .lightbox-arrow {
        position: absolute;
        top: 50%;
        width: 2.6rem;
        height: 2.6rem;
        transform: translateY(-50%);
    }

    .lightbox-arrow--previous {
        left: 0.7rem;
    }

    .lightbox-arrow--next {
        right: 0.7rem;
    }
}

@media (max-height: 760px) and (min-width: 981px) {
    .top-nav {
        top: 1.25rem;
    }

    .brand-lockup {
        top: 21svh;
        gap: 1.05rem;
    }

    .liquid-logo {
        width: 8.4rem;
    }

    .certifications img {
        max-height: 5.6rem;
    }

    .certifications a:first-child img {
        max-height: 5.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
