/* =============================================
   SIDEV CONCEPT - Styles
   Charte : encre marine, orange « métal en fusion », patine de bronze
   ============================================= */

/* Variables */
:root {
    --ink: #0f1e33;
    --ink-2: #15283f;
    --ink-line: rgba(238, 241, 244, 0.14);
    --paper: #eef1f4;
    --paper-line: rgba(15, 30, 51, 0.16);
    --patina: #1d3b3c;
    --patina-light: #9cc7bb;

    --text-on-ink: #eef1f4;
    --muted-on-ink: #a9b6c6;
    --muted-on-patina: #c5d6d1;
    --text-on-paper: #0f1e33;
    --muted-on-paper: #4a5b70;

    --molten: #ff8a1f;
    --molten-hot: #ffa552;
    --molten-ink: #9c4300; /* orange lisible sur fond clair */

    --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --wrap: 1240px;
    --gutter: clamp(16px, 4vw, 48px);
    --nav-h: 64px; /* mis à jour par main.js selon la hauteur réelle */
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-on-ink);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

p {
    max-width: 62ch;
    text-wrap: pretty;
}

h1, h2, h3 {
    font-weight: 750;
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 1.2rem + 3.4vw, 3.75rem);
    font-stretch: 118%;
}

h3 {
    font-size: 1.5rem;
    font-stretch: 112%;
}

.lede {
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
    line-height: 1.45;
}

:focus-visible {
    outline: 2px solid var(--molten);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--molten);
    color: var(--ink);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(72px, 11vw, 144px);
}

.paper {
    background: var(--paper);
    color: var(--text-on-paper);
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
    background: rgba(15, 30, 51, 0.95);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 1px 0 var(--ink-line);
}

.nav {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    font-weight: 800;
    font-stretch: 125%;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-on-ink);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
}

.nav-links a {
    display: inline-block;
    padding: 10px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted-on-ink);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current] {
    color: var(--text-on-ink);
}

.nav-links a[aria-current] {
    text-decoration: underline;
    text-decoration-color: var(--molten);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

/* =============================================
   BUTTONS & LINKS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
    background: var(--molten);
    color: var(--ink);
}

.btn-primary:hover {
    background: var(--molten-hot);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(238, 241, 244, 0.35);
    color: var(--text-on-ink);
}

.btn-ghost:hover {
    border-color: var(--text-on-ink);
}

.text-link {
    display: inline-block;
    margin-top: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--molten);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.text-link:hover {
    color: var(--molten-ink);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--molten);
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.18);
}

.paper .status {
    color: var(--molten-ink);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding-block: calc(var(--nav-h) + 48px) clamp(40px, 7vw, 88px);
}

.hero .wrap {
    width: 100%;
}

.hero-title {
    position: relative;
    font-size: clamp(2.5rem, 13vw, 10.75rem);
    font-weight: 850;
    font-stretch: 125%;
    line-height: 0.86;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: clamp(32px, 5vw, 64px);
}

.build {
    display: block;
    color: var(--text-on-ink);
}

/* Lignes de couche visibles dans les lettres, comme une pièce imprimée */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .build {
        color: transparent;
        background: repeating-linear-gradient(
            to bottom,
            var(--text-on-ink) 0 0.05em,
            rgba(238, 241, 244, 0.6) 0.05em 0.06em
        );
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* Le seul moment animé de la page : le titre se construit couche par couche,
   la buse (ligne orange) monte avec lui puis refroidit. */
@media (prefers-reduced-motion: no-preference) {
    .build {
        animation: build 2.4s steps(32, end) 0.25s both;
    }

    .hero-title::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3px;
        border-radius: 2px;
        background: var(--molten);
        box-shadow: 0 0 12px 2px rgba(255, 138, 31, 0.7), 0 0 40px 8px rgba(255, 138, 31, 0.22);
        pointer-events: none;
        animation:
            nozzle 2.4s steps(32, end) 0.25s both,
            cool 0.8s ease-out 2.75s forwards;
    }
}

@keyframes build {
    from { clip-path: inset(100% 0 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

@keyframes nozzle {
    from { bottom: 0; }
    to   { bottom: 100%; }
}

@keyframes cool {
    to { opacity: 0; }
}

.hero-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 24px clamp(32px, 6vw, 96px);
    align-items: start;
    padding-top: clamp(24px, 3vw, 36px);
    border-top: 1px solid var(--ink-line);
}

.hero-tagline {
    font-size: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.15;
    color: var(--molten);
}

.hero-intro p {
    max-width: 46ch;
    margin-bottom: 28px;
    font-size: 1.125rem;
    color: var(--muted-on-ink);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* =============================================
   EXPERTISES
   ============================================= */
.paper .section-head p {
    color: var(--muted-on-paper);
}

/* Mosaïque 12 colonnes : 7 + 5, puis 5 + 7 */
.bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 460px;
    padding: clamp(28px, 3.2vw, 48px);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
}

.tile h3 {
    margin-bottom: 14px;
    font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem);
    font-stretch: 118%;
}

.tile-dev,
.tile-words {
    grid-column: span 7;
}

.tile-app,
.tile-print {
    grid-column: span 5;
}

/* Développement : l'encre */
.tile-dev {
    background: var(--ink);
    color: var(--text-on-ink);
}

.tile-dev p {
    color: var(--muted-on-ink);
}

.tile-dev .tags {
    margin-bottom: 28px;
}

.tile-dev .tags a:hover {
    color: var(--molten);
}

.tile .service-note {
    margin-top: auto;
    padding-left: 16px;
    border-left: 3px solid var(--molten);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-on-ink);
}

/* CentralPrint : la patine, et l'application qui sort du bas de la tuile */
.tile-app {
    padding-bottom: 0;
    background: var(--patina);
    color: var(--text-on-ink);
}

.tile-app p {
    color: var(--muted-on-patina);
}

.tile .status {
    margin-bottom: 18px;
    color: var(--molten);
}

.tile-app .text-link:hover,
.tile-print .text-link:hover {
    color: var(--molten);
}

.tile-device {
    align-self: center;
    width: min(260px, 80%);
    height: 170px;
    margin-top: auto;
    padding-top: 0;
    object-fit: cover;
    object-position: top;
    border: 1px solid rgba(238, 241, 244, 0.18);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
}

.tile-app .text-link {
    margin-bottom: 36px;
}

/* Impression 3D : la photo d'une vraie pièce en plein cadre */
.tile-print {
    justify-content: flex-end;
    min-height: 580px;
    color: var(--text-on-ink);
    background: #000;
}

.tile-photo {
    position: absolute;
    inset: 0 0 auto;
    z-index: -2;
    width: 100%;
    height: 60%;
    object-fit: cover;
    object-position: 50% 42%;
}

/* La photo se fond dans le noir : le texte reste toujours sur fond uni */
.tile-print::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 22%, #000 58%);
}

.tile-print h3 {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.tile-print p {
    color: rgba(238, 241, 244, 0.86);
}

/* Communication : l'orange, et le guillemet comme signe */
.tile-words {
    min-height: 580px;
    justify-content: flex-end;
    background: var(--molten);
    color: var(--ink);
}

.tile-words p {
    color: rgba(15, 30, 51, 0.86);
}

.tile-words .tags li::before {
    background: var(--ink);
}

.tile-quote {
    position: absolute;
    top: clamp(8px, 2vw, 24px);
    right: clamp(20px, 3vw, 48px);
    font-size: clamp(9rem, 6rem + 10vw, 17rem);
    font-weight: 800;
    font-stretch: 125%;
    line-height: 1;
    color: var(--ink);
    opacity: 0.92;
}

@media (prefers-reduced-motion: no-preference) {
    .tile-photo,
    .tile-device {
        transition: transform 0.7s var(--ease-out);
    }

    .tile-print:hover .tile-photo {
        transform: scale(1.04);
    }

    .tile-app:hover .tile-device {
        transform: translateY(-10px);
    }
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 18px;
    font-size: 0.9375rem;
    font-weight: 500;
}

.tags a {
    text-decoration: underline;
    text-decoration-color: var(--molten);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.tags a:hover {
    color: var(--molten-ink);
}

/* Petit carré orange : une couche, un dépôt de matière */
.tags li,
.checks li {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.tags li::before,
.checks li::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    background: var(--molten);
    transform: translateY(-2px);
}

/* =============================================
   PORTEUSE DE JARRE
   ============================================= */
.feature {
    background: var(--patina);
}

.feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 48px clamp(40px, 6vw, 96px);
    align-items: center;
}

.feature-photo {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 4px;
    overflow: hidden;
    background: var(--ink);
}

.feature-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Règle graduée : 36 graduations de 10 cm, une marque forte par mètre.
   Elle va du socle (68,7 %) au sommet de la jarre (2,2 %) sur la photo. */
.ruler {
    position: absolute;
    top: 2.2%;
    height: 66.5%;
    right: 7%;
    width: 16px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    background:
        repeating-linear-gradient(to top, #fff 0 2px, transparent 2px 27.7778%) right / 16px 100% no-repeat,
        repeating-linear-gradient(to top, rgba(255, 255, 255, 0.85) 0 1px, transparent 1px 2.7778%) right / 8px 100% no-repeat;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
}

.ruler span {
    position: absolute;
    right: 24px;
    bottom: calc(var(--at) * 27.7778%);
    transform: translateY(50%);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.ruler .ruler-top {
    bottom: 100%;
    padding: 2px 7px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--molten);
    border-radius: 3px;
    text-shadow: none;
}

.feature-text .lede {
    margin: 18px 0 28px;
    color: var(--patina-light);
}

.feature-text p {
    color: var(--muted-on-patina);
}

.feature-text p + p {
    margin-top: 16px;
}

.feature-text strong {
    color: var(--text-on-ink);
    font-weight: 600;
}

/* Cartel de musée, comme la plaque au pied de la statue */
.cartel {
    max-width: 560px;
    margin-top: 40px;
    padding: 24px 28px;
    background: var(--paper);
    color: var(--text-on-paper);
    border-radius: 4px;
}

.cartel .cartel-title {
    margin-bottom: 16px;
    font-size: 1.125rem;
    font-weight: 700;
    font-stretch: 112%;
    color: var(--text-on-paper);
}

.cartel dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.cartel dt {
    font-size: 0.8125rem;
    color: var(--muted-on-paper);
}

.cartel dd {
    font-weight: 600;
}

/* =============================================
   GALERIE
   ============================================= */
.gallery-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--ink);
}

.gallery-section > .wrap {
    position: relative;
}

/* Carrousel de fond : chaque photo reste 6 s à 18 % puis cède la place à la suivante */
.gallery-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gallery-backdrop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.gallery-backdrop img:first-child {
    opacity: 0.18;
}

@media (prefers-reduced-motion: no-preference) {
    .gallery-backdrop img,
    .gallery-backdrop img:first-child {
        opacity: 0;
        animation: backdrop-fade 24s linear infinite;
    }

    .gallery-backdrop img:nth-child(2) { animation-delay: 6s; }
    .gallery-backdrop img:nth-child(3) { animation-delay: 12s; }
    .gallery-backdrop img:nth-child(4) { animation-delay: 18s; }
}

@keyframes backdrop-fade {
    0%   { opacity: 0; transform: scale(1.06); }
    6%   { opacity: 0.18; }
    25%  { opacity: 0.18; }
    31%  { opacity: 0; transform: scale(1); }
    100% { opacity: 0; transform: scale(1); }
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px 48px;
    align-items: end;
    margin-bottom: clamp(40px, 5vw, 72px);
}

.section-head p {
    font-size: 1.125rem;
    color: var(--muted-on-ink);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.gallery li:nth-child(even) {
    margin-top: clamp(32px, 6vw, 96px);
}

.shot {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    cursor: zoom-in;
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.shot:hover img {
    transform: scale(1.03);
}

.gallery figcaption {
    padding-top: 14px;
}

.gallery figcaption strong {
    display: block;
    font-size: 1.0625rem;
    font-weight: 650;
}

.gallery figcaption span {
    display: block;
    font-size: 0.9375rem;
    color: var(--muted-on-ink);
}

.gallery-cta {
    margin-top: clamp(48px, 6vw, 80px);
}

/* =============================================
   CENTRALPRINT
   ============================================= */
.software {
    background: var(--ink-2);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px clamp(40px, 7vw, 112px);
    align-items: center;
}

.split-text h2,
.alpha-content h2 {
    margin-top: 16px;
}

.split-text .lede,
.alpha-content .lede {
    margin: 16px 0 24px;
}

.split-text p:not(.lede):not(.status),
.alpha-content p:not(.lede):not(.status) {
    color: var(--muted-on-ink);
}

.alpha-content p + p:not(.lede) {
    margin-top: 16px;
}

.checks {
    display: grid;
    gap: 12px;
    margin: 28px 0 36px;
}

.device {
    justify-self: center;
    width: 100%;
    max-width: 300px;
}

.device img {
    border: 1px solid var(--ink-line);
    border-radius: 28px;
    box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.65);
}

/* =============================================
   PROJECT ALPHA
   ============================================= */
.alpha {
    background: var(--ink);
}

.alpha-grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 48px clamp(40px, 7vw, 112px);
    align-items: center;
}

.alpha-content .btn {
    margin-top: 32px;
}

.alpha-viewer {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at 50% 42%, #1f3a5c 0%, #12233b 62%, #0c1828 100%);
    border: 1px solid var(--ink-line);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
}

.alpha-viewer:active {
    cursor: grabbing;
}

.alpha-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.alpha-reset {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(15, 30, 51, 0.8);
    border: 1px solid var(--ink-line);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.alpha-reset:hover {
    border-color: var(--molten);
    color: var(--molten);
}

.alpha-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    max-width: none;
    padding: 0 16px;
    font-size: 0.8125rem;
    text-align: center;
    color: var(--muted-on-ink);
    pointer-events: none;
}

.alpha-fallback {
    display: none;
}

.alpha-viewer-error {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.alpha-viewer-error .alpha-reset,
.alpha-viewer-error .alpha-hint {
    display: none;
}

.alpha-viewer-error .alpha-fallback {
    display: block;
    padding: 30px;
    text-align: center;
    color: var(--muted-on-ink);
}

/* =============================================
   À PROPOS & CLIENTS
   ============================================= */
.about {
    background: var(--molten);
    color: var(--ink);
}

.about :focus-visible {
    outline-color: var(--ink);
}

.about-title {
    margin-bottom: clamp(20px, 3vw, 32px);
    font-size: 1.125rem;
    font-weight: 700;
    font-stretch: 100%;
}

.about-quote {
    max-width: 19em;
    font-size: clamp(1.85rem, 0.9rem + 3.6vw, 4.25rem);
    font-weight: 750;
    font-stretch: 115%;
    line-height: 1.04;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.about-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px clamp(32px, 5vw, 72px);
    margin-top: clamp(40px, 5vw, 64px);
    font-size: 1.125rem;
}

.about-cols p {
    color: rgba(15, 30, 51, 0.86);
}

.about-cols a {
    font-weight: 600;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.about-cols a:hover {
    text-decoration-thickness: 4px;
}

/* Valeurs : trois couches empilées, la plus large en bas comme sur un plateau d'impression */
.values-stack {
    display: grid;
    gap: 6px;
    margin-top: clamp(56px, 7vw, 96px);
}

.layer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 28ch);
    align-items: center;
    gap: 12px 40px;
    padding: clamp(20px, 2.4vw, 32px) clamp(20px, 3vw, 40px);
    background: var(--ink);
    color: var(--text-on-ink);
    border-radius: 4px;
}

.layer:nth-child(1) { width: 82%; background: #1a3150; }
.layer:nth-child(2) { width: 91%; background: #142740; }

.layer dt {
    font-size: clamp(1.6rem, 0.8rem + 3.4vw, 3.75rem);
    font-weight: 850;
    font-stretch: 125%;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Mêmes lignes de couche que le titre du hero */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .layer dt {
        color: transparent;
        background: repeating-linear-gradient(
            to bottom,
            var(--text-on-ink) 0 0.05em,
            rgba(238, 241, 244, 0.6) 0.05em 0.06em
        );
        -webkit-background-clip: text;
        background-clip: text;
    }
}

.layer dd {
    color: var(--muted-on-ink);
}

/* Impression des couches au défilement : la base d'abord, puis vers le haut */
@media (prefers-reduced-motion: no-preference) {
    .values-stack.will-reveal .layer {
        clip-path: inset(0 100% 0 0);
        transition: clip-path 0.9s var(--ease-out);
    }

    .values-stack.will-reveal .layer:nth-child(2) { transition-delay: 0.18s; }
    .values-stack.will-reveal .layer:nth-child(1) { transition-delay: 0.36s; }

    .values-stack.is-revealed .layer {
        clip-path: inset(0 0 0 0);
    }
}

.clients {
    margin-top: clamp(72px, 9vw, 128px);
}

.clients h3 {
    margin-bottom: 20px;
    font-size: 1.125rem;
    font-weight: 700;
    font-stretch: 100%;
}

.client-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 24px;
    border-top: 2px solid var(--ink);
}

.client-list li {
    padding-top: 24px;
}

.client-name {
    display: block;
    font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    font-weight: 750;
    font-stretch: 118%;
    line-height: 1.1;
}

.client-desc {
    display: block;
    margin-top: 6px;
    font-size: 0.9375rem;
    color: rgba(15, 30, 51, 0.82);
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
    background: var(--ink);
}

.contact-sub {
    margin-top: 16px;
    font-size: 1.125rem;
    color: var(--muted-on-ink);
}

.contact-email {
    display: inline-block;
    max-width: 100%;
    margin-top: clamp(40px, 6vw, 72px);
    font-size: clamp(1.3rem, 0.3rem + 5vw, 4.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: var(--molten);
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.16em;
    transition: color 0.2s;
}

.contact-email:hover {
    color: var(--molten);
}

.contact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 32px;
}

.copy-status {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--patina-light);
}

.copy-status:empty {
    display: none;
}

.contact-location {
    color: var(--muted-on-ink);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding-block: 32px;
    background: var(--ink);
    border-top: 1px solid var(--ink-line);
}

.footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 32px;
    font-size: 0.875rem;
    color: var(--muted-on-ink);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    margin: auto;
    padding: 0;
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    border: 0;
    background: transparent;
    color: var(--text-on-ink);
    overflow: visible;
    cursor: zoom-out;
}

.lightbox::backdrop {
    background: rgba(8, 15, 26, 0.94);
}

.lightbox img {
    width: auto;
    max-width: 100%;
    max-height: 82vh;
    margin-inline: auto;
    border-radius: 4px;
}

.lightbox-caption {
    max-width: none;
    margin-top: 14px;
    font-weight: 600;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--ink-line);
    border-radius: 6px;
    cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.25s var(--ease-out);
    }
}

@keyframes lightbox-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
    .feature-grid,
    .split,
    .alpha-grid,
    .about-cols,
    .section-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .tile-dev,
    .tile-words,
    .tile-app,
    .tile-print {
        grid-column: 1 / -1;
    }

    .tile {
        min-height: 0;
    }

    .tile-print {
        min-height: 520px;
    }

    .tile-words {
        padding-top: clamp(150px, 24vw, 220px);
    }

    .layer {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-photo {
        max-width: 520px;
    }

    .alpha-viewer {
        margin-inline: auto;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
}

@media (max-width: 720px) {
    .hero {
        align-items: center;
    }

    .nav {
        justify-content: center;
        padding-block: 4px;
    }

    .nav .wordmark {
        display: none;
    }

    .nav-links {
        justify-content: center;
        gap: 0 18px;
    }

    .nav-links a {
        font-size: 0.875rem;
    }

    .hero-foot {
        grid-template-columns: minmax(0, 1fr);
    }

    .layer:nth-child(1) { width: 88%; }
    .layer:nth-child(2) { width: 94%; }

    .cartel dl {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Galerie en bandeau horizontal au doigt */
    .gallery {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        margin-inline: calc(-1 * var(--gutter));
        padding-inline: var(--gutter);
        padding-bottom: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        overscroll-behavior-x: contain;
    }

    .gallery li {
        scroll-snap-align: start;
    }

    .gallery li:nth-child(even) {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .client-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .shot img {
        transition: none;
    }
}
