/* Written with love by Enguerrand Quilliard (Tricotou) */
/* See more at tricotools.com */

/* ------------------------------------------------------------------ Fonts */
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ----------------------------------------------------------------- Tokens */
:root {
    --bg: #05060d;
    --bg-soft: #0b0e1a;
    --panel: rgba(11, 14, 24, 0.78);
    --panel-solid: #0c0f1a;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --text: #eef0f5;
    --muted: #aab0bf;
    --accent: #f5a524;
    --accent-ink: #171004;
    --ok: #5fd39a;
    --error: #ff8f7a;

    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --radius: 14px;
    --gutter: 20px;
    --max: 1160px;
    --header-h: 64px;
}

/* ------------------------------------------------------------------- Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Also the whole background when WebGL is unavailable */
    background:
        radial-gradient(90% 60% at 78% 0%, rgba(245, 165, 36, 0.09) 0%, transparent 60%),
        radial-gradient(120% 90% at 20% 10%, #121830 0%, #080a14 55%, var(--bg) 100%) fixed;
    background-color: var(--bg);
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
blockquote {
    margin: 0;
}
ul,
ol {
    padding: 0;
    list-style: none;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
a {
    color: inherit;
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}
.skip:focus {
    transform: none;
}
.todo {
    padding: 1px 6px;
    border: 1px dashed var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.85em;
    white-space: nowrap;
}

/* ------------------------------------------------------- Still backdrop */
/* A layer of its own rather than background-attachment: fixed, which phones handle badly. The veil keeps the text readable */
.page-home::before,
.page-simple::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    background:
        linear-gradient(rgba(5, 6, 13, var(--veil)), rgba(5, 6, 13, var(--veil))),
        url("/imgs/backdrop-wide.webp") center / cover no-repeat;
    --veil: 0.72;
    pointer-events: none;
}
@media (orientation: portrait) {
    .page-home::before,
    .page-simple::before {
        background-image: linear-gradient(rgba(5, 6, 13, var(--veil)), rgba(5, 6, 13, var(--veil))), url("/imgs/backdrop-tall.webp");
    }
}

/* --------------------------------------------------------- 3D background */
#scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
/* On the home page the scene belongs to the hero : it leaves the screen with it */
.page-home #scene {
    position: absolute;
    height: 100vh;
    height: 100svh;
    /* Its lower edge melts into the still backdrop */
    -webkit-mask-image: linear-gradient(#000 80%, transparent);
    mask-image: linear-gradient(#000 80%, transparent);
}
/* Not quite 0 while the scene gets ready : a canvas at 0 is not composited at all, and its first real frame would freeze the fade */
#scene {
    display: block;
    opacity: 0.004;
    transition: opacity 1.4s ease;
    outline: none;
}
#scene.ready {
    opacity: 1;
}
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

/* Grab the background to orbit the scene (js/engine/grab.js). Text keeps its normal cursor. */
html.can-grab .page-home .hero {
    cursor: grab;
}
html.can-grab .page-home .hero :is(h1, h2, h3, h4, p, li, dl, blockquote) {
    cursor: auto;
}
html.can-grab .page-home .hero :is(a, button) {
    cursor: pointer;
}
html.grabbing,
html.grabbing * {
    cursor: grabbing !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* While the visitor orbits the scene, the page fades out. It fades back on release */
:root {
    --focus-fade: 0.5s;
}
.site-header,
main,
.site-footer {
    transition: opacity var(--focus-fade) ease-in-out;
}
html.scene-focus :is(.site-header, main, .site-footer) {
    opacity: 0;
}

/* ----------------------------------------------------------------- Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    border-bottom: 1px solid transparent;
    transition:
        opacity var(--focus-fade) ease-in-out,
        background-color 0.3s ease,
        border-color 0.3s ease;
}
.site-header.scrolled,
.page-simple .site-header,
html:not(.js) .site-header {
    background: rgba(5, 6, 13, 0.86);
    border-bottom-color: var(--line);
}
@supports (backdrop-filter: blur(1px)) {
    .site-header.scrolled {
        background: rgba(5, 6, 13, 0.66);
        backdrop-filter: blur(14px) saturate(1.2);
    }
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--max);
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 650;
    font-size: 17px;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.logo {
    flex: none;
}
.nav {
    display: none;
    margin-left: auto;
}
.nav ul {
    display: flex;
    gap: 4px;
}
.nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14.5px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav a:hover,
.nav a[aria-current="true"] {
    color: var(--text);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s ease;
}
.lang:hover {
    border-color: var(--accent);
}

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}
.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
}
.btn-primary:hover {
    background: #ffb840;
}
.btn-ghost {
    border-color: var(--line-strong);
    background: rgba(5, 6, 13, 0.45);
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--text);
}
.btn-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13.5px;
}
.btn-success {
    background: transparent;
    border-color: var(--ok);
    color: var(--ok);
    cursor: default;
}
.btn:active {
    transform: translateY(1px);
}
.btn[hidden] {
    display: none;
}
/* The header CTA would crowd small phones : the hero and contact CTAs do the job there */
.header-actions .btn {
    display: none;
}

/* ------------------------------------------------------------------- Hero */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 24px) var(--gutter) 28px;
}
/* Scrim : keeps the headline readable whatever the 3D scene shows */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(5, 6, 13, 0.55) 0%, rgba(5, 6, 13, 0) 22%, rgba(5, 6, 13, 0.35) 48%, rgba(5, 6, 13, 0.94) 100%);
    /* Fades out with the scene, so that the hero ends on the still backdrop without a line */
    -webkit-mask-image: linear-gradient(#000 80%, transparent);
    mask-image: linear-gradient(#000 80%, transparent);
}
.hero-inner {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
}
.eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.eyebrow span {
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid var(--line-strong);
    color: var(--muted);
}
/* The company name above the headline : the same label, larger */
.eyebrow-brand {
    font-size: clamp(20px, 2.4vw, 26px);
}
h1 {
    max-width: 17ch;
    font-size: clamp(2.1rem, 8.4vw, 4.4rem);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -0.035em;
    text-wrap: balance;
}
.hero-sub {
    max-width: 54ch;
    margin-top: 18px;
    color: #d4d8e2;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    text-wrap: pretty;
}
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.scene-indicator {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: var(--max);
    margin: 32px auto 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12.5px;
}
/* It is in the page before the 3D is : without scripts there is no scene to switch, without WebGL it keeps its room */
html:not(.js) .scene-indicator {
    display: none;
}
.scene-indicator.is-off {
    visibility: hidden;
}
.scene-label {
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.scene-list {
    display: grid;
    /* One column per tableau, however many there are */
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 12px;
}
/* One scene : its name (a button), the link to its page at the end, the progress bar underneath */
.scene-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    min-height: 44px;
    padding: 6px 0 0;
    color: var(--muted);
    transition: color 0.2s ease;
}
.scene-item:hover,
.scene-item.is-current {
    color: var(--text);
}
.scene-name {
    min-height: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* The whole item switches the scene, bar included ; the link stays on top of it */
.scene-name::after {
    content: "";
    position: absolute;
    inset: 0;
}
.scene-open {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 28px;
    height: 28px;
    color: var(--muted);
    opacity: 0.75;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}
.scene-open:hover {
    color: var(--accent);
    opacity: 1;
}
.scene-bar {
    grid-column: 1 / -1;
    display: block;
    height: 2px;
    margin-top: 8px;
    background: var(--line);
    overflow: hidden;
    transition: background-color 0.2s ease;
}
.scene-item:hover .scene-bar {
    background: var(--line-strong);
}
.scene-bar span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}
/* Static scene (prefers-reduced-motion) : no countdown, the current scene is simply underlined */
.scene-indicator.is-static .scene-item.is-current .scene-bar span {
    transform: none !important;
}

/* "Loading the demo" with a turning cube, then (desktop, mouse only, until the first grab) the hand that invites to grab the scene */
/* Phones : centred in the free room above the headline (a flex item of the hero, taking no room of its own) */
.grab-hint {
    order: -1;
    flex: 1 1 0;
    min-height: 0;
    place-content: center;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.9));
    display: grid;
    color: #fff;
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.hint-loading,
.hint-grab {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.5s ease,
        visibility 0s 0.5s;
}
/* Phones : no grab hint, the room above the headline only says the scene is coming */
.hint-grab {
    display: none;
}
html.scene-loading .hint-loading,
html.scene-ready.can-grab .hint-grab {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease 0.3s;
}
.site-header.scrolled ~ main .grab-hint,
html.has-grabbed .grab-hint {
    opacity: 0;
}
@media (min-width: 960px) {
    .grab-hint {
        position: absolute;
        right: 36px;
        top: 50%;
        transform: translateY(-50%);
    }
    .hint-loading,
    .hint-grab {
        justify-self: end;
    }
    .hint-grab {
        display: flex;
    }
    html.scene-ready.can-grab .hint-grab svg {
        animation: grab-hint 2.6s ease-in-out infinite;
    }
}
/* A phone held sideways : the headline fills the screen */
@media (max-width: 959px) and (max-height: 520px) {
    .grab-hint {
        display: none;
    }
}
@keyframes grab-hint {
    0%,
    100% {
        transform: translateX(-9px) rotate(-7deg);
    }
    50% {
        transform: translateX(9px) rotate(7deg);
    }
}
/* Wireframe cube : six bordered faces in CSS 3D, turned on the compositor (it keeps turning while the scene is being built) */
.load-cube {
    --side: 20px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    perspective: 140px;
}
.load-cube > span {
    position: relative;
    width: var(--side);
    height: var(--side);
    transform-style: preserve-3d;
    transform: rotateX(-28deg) rotateY(45deg);
    animation: load-cube 2.8s linear infinite;
}
.load-cube i {
    position: absolute;
    inset: 0;
    border: 1.5px solid currentColor;
}
.load-cube i:nth-child(1) {
    transform: translateZ(calc(var(--side) / 2));
}
.load-cube i:nth-child(2) {
    transform: rotateY(180deg) translateZ(calc(var(--side) / 2));
}
.load-cube i:nth-child(3) {
    transform: rotateY(90deg) translateZ(calc(var(--side) / 2));
}
.load-cube i:nth-child(4) {
    transform: rotateY(-90deg) translateZ(calc(var(--side) / 2));
}
.load-cube i:nth-child(5) {
    transform: rotateX(90deg) translateZ(calc(var(--side) / 2));
}
.load-cube i:nth-child(6) {
    transform: rotateX(-90deg) translateZ(calc(var(--side) / 2));
}
@keyframes load-cube {
    from {
        transform: rotateX(-28deg) rotateY(45deg);
    }
    to {
        transform: rotateX(-28deg) rotateY(405deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    html.scene-ready.can-grab .grab-hint svg,
    .load-cube > span {
        animation: none;
    }
}

/* --------------------------------------------------------------- Sections */
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px var(--gutter) 0;
}
.section:last-of-type {
    padding-bottom: 88px;
}
.section-head {
    margin-bottom: 18px;
}
h2 {
    max-width: 22ch;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.section-lead {
    max-width: 62ch;
    margin-bottom: 28px;
    color: #cfd3de;
    font-size: 1.06rem;
    text-wrap: pretty;
}
.grid {
    display: grid;
    gap: 16px;
}

/* Panel : semi-opaque, lightly blurred where it is cheap enough (see the media query below) */
.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.card h3 {
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.015em;
}
.card p {
    color: var(--muted);
}
.list-label {
    margin: 18px 0 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------------- Offers */
.offer {
    scroll-margin-top: calc(var(--header-h) + 24px);
    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}
.offer:target,
.offer.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
    outline: none;
}
.offer-index {
    margin-bottom: 18px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
}
.offer h3 {
    font-size: 1.6rem;
    letter-spacing: -0.025em;
}
.card .offer-title {
    margin: 4px 0 12px;
    color: var(--text);
    font-weight: 500;
}
.ticks li {
    position: relative;
    padding: 7px 0 7px 22px;
    border-top: 1px solid var(--line);
    color: #d4d8e2;
    font-size: 0.95rem;
    line-height: 1.45;
}
.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 8px;
    height: 2px;
    background: var(--accent);
}

/* ---------------------------------------------------------------- Founder */
.founder {
    display: grid;
    gap: 16px;
}
.founder-card img {
    width: 224px;
    height: 224px;
    margin-bottom: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    object-fit: cover;
}
.founder-card h3 {
    font-size: 1.5rem;
}
.card .founder-role {
    margin: 2px 0 14px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13.5px;
}
.founder-card p + p {
    margin-top: 10px;
}
.figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.figures div {
    display: flex;
    flex-direction: column-reverse;
}
.figures dd {
    font-size: 2.2rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.04em;
}
.figures dt {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}
.tl-title {
    margin-bottom: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}
.timeline li {
    display: grid;
    gap: 2px 20px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.card .tl-dates {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
    white-space: nowrap;
}
.story li > p:last-child {
    font-size: 0.98rem;
    line-height: 1.6;
}
.story-cv {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* -------------------------------------------------------------- Expertise */
.expertise h3 {
    margin-bottom: 12px;
    font-size: 1.05rem;
}
.expertise li {
    padding: 6px 0;
    border-top: 1px solid var(--line);
    color: #d4d8e2;
    font-family: var(--mono);
    font-size: 13.5px;
}

/* --------------------------------------------------------------- Projects */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.filters[hidden] {
    display: none;
}
.chip {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(5, 6, 13, 0.6);
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}
.chip:hover {
    color: var(--text);
    border-color: var(--text);
}
.chip[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}
.card.project {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.project[hidden] {
    display: none;
}
.thumb {
    position: relative;
    aspect-ratio: 3 / 2;
    background: var(--bg-soft);
    overflow: hidden;
}
.thumb img,
.thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb video {
    opacity: 0;
    transition: opacity 0.35s ease;
}
.thumb video.playing {
    opacity: 1;
}
.card .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.project h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}
.project-body > p {
    font-size: 0.94rem;
    line-height: 1.5;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 16px;
}
.tags li {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11.5px;
}
.tags .tag-cat {
    border-color: rgba(245, 165, 36, 0.45);
    color: var(--accent);
}
.project-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-top: auto;
}
.link-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.link-cta span[aria-hidden] {
    transition: transform 0.2s ease;
}
.link-cta:hover span[aria-hidden] {
    transform: translateX(4px);
}
.link-quiet {
    color: var(--muted);
    font-size: 0.9rem;
    text-underline-offset: 3px;
}
.link-quiet:hover {
    color: var(--text);
}

/* ------------------------------------------------------------- References */
.reference .list-label {
    margin-top: 0;
}
.reference h3 {
    font-size: 1.5rem;
}
.card .reference-sector {
    margin: 2px 0 12px;
    font-family: var(--mono);
    font-size: 13px;
}
.reference p + p {
    margin-top: 14px;
}
.reference blockquote {
    margin-top: 16px;
    padding-left: 16px;
    border-left: 2px solid var(--accent);
}
.reference blockquote footer {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}
.reference-yours {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-style: dashed;
    border-color: var(--line-strong);
    background: rgba(11, 14, 24, 0.55);
}
.reference-yours h3 {
    margin-bottom: 8px;
}

/* ---------------------------------------------------------------- Contact */
.contact-card {
    display: grid;
    gap: 28px;
    padding: 28px 24px;
    border-color: rgba(245, 165, 36, 0.35);
}
.contact-card .section-lead {
    margin: 14px 0 24px;
}
.contact-list div {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.contact-list dt {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.contact-list dd {
    margin-top: 2px;
    font-size: 1.05rem;
}
.contact-list a {
    text-underline-offset: 4px;
    text-decoration-color: var(--line-strong);
}
.contact-list a:hover {
    color: var(--accent);
}

/* ----------------------------------------------------------------- Footer */
.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 6, 13, 0.9);
}
.footer-inner {
    display: grid;
    gap: 20px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 36px var(--gutter) 40px;
    color: var(--muted);
    font-size: 0.9rem;
}
.footer-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 650;
    font-size: 1rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}
.footer-links a {
    display: inline-block;
    padding: 6px 0;
    color: var(--text);
    text-underline-offset: 4px;
    text-decoration-color: var(--line-strong);
}
.footer-links a:hover {
    color: var(--accent);
}

/* --------------------------------------- Simple pages (contact, legal notice) */
.simple {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--header-h) + 40px) var(--gutter) 72px;
}
.simple h1 {
    max-width: none;
    margin-bottom: 14px;
    font-size: clamp(1.9rem, 6vw, 2.8rem);
}
.simple .card {
    padding: 28px 24px;
}
.prose h2 {
    margin: 32px 0 10px;
    font-size: 1.3rem;
    letter-spacing: -0.015em;
}
.prose p {
    margin-bottom: 12px;
    color: #cfd3de;
}
.prose a {
    text-underline-offset: 3px;
}
.details div {
    display: grid;
    gap: 2px 16px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.details dt {
    color: var(--muted);
    font-size: 0.92rem;
}
.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 600;
}
.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(5, 6, 13, 0.7);
    color: var(--text);
    font: inherit;
}
.field textarea {
    min-height: 150px;
    resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
    color: #7d8496;
}
.field input:focus-visible,
.field textarea:focus-visible {
    outline-offset: 0;
    border-color: var(--accent);
}
.field input:disabled,
.field textarea:disabled {
    opacity: 0.55;
}
#captchaCode {
    width: auto;
    max-width: 100%;
    font-family: var(--mono);
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    text-align: center;
    user-select: none;
}
.card .help {
    margin: 8px 0;
    font-size: 0.88rem;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 6px 0 26px;
}
.status {
    font-size: 0.94rem;
}
.card .status.error,
.status.error {
    color: var(--error);
}
.status.ok {
    color: var(--ok);
}

/* ----------------------------------------------------------------- Reveal */
/* Only with JavaScript, and only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition:
            opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
            transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
        transition-delay: var(--reveal-delay, 0ms);
    }
    html.js .reveal.in {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ------------------------------------------------------------ Breakpoints */
@media (min-width: 420px) {
    .header-actions .btn {
        display: inline-flex;
    }
}
@media (min-width: 640px) {
    :root {
        --gutter: 32px;
    }
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    .timeline li {
        grid-template-columns: 110px 1fr;
    }
    .details div {
        grid-template-columns: 220px 1fr;
    }
    .card {
        padding: 28px;
    }
    .simple .card {
        padding: 40px;
    }
    .footer-inner {
        grid-template-columns: 1fr auto;
    }
    .footer-copy {
        grid-column: 1 / -1;
    }
}
@media (min-width: 960px) {
    .nav {
        display: block;
    }
    .header-actions {
        margin-left: 12px;
    }
    .hero {
        justify-content: center;
        padding-bottom: 40px;
    }
    /* Desktop : the scene lives on the right, the headline on the left */
    .hero::before {
        background:
            linear-gradient(90deg, rgba(5, 6, 13, 0.9) 0%, rgba(5, 6, 13, 0.62) 38%, rgba(5, 6, 13, 0) 68%),
            linear-gradient(180deg, rgba(5, 6, 13, 0.5) 0%, rgba(5, 6, 13, 0) 20%, rgba(5, 6, 13, 0) 72%, rgba(5, 6, 13, 0.9) 100%);
    }
    .hero-inner {
        margin-top: auto;
    }
    .scene-indicator {
        grid-template-columns: max-content minmax(0, 560px);
        justify-content: start;
        align-items: center;
        gap: 28px;
        margin-top: auto;
        margin-bottom: 28px;
    }
    /* Room between the link that ends a scene and the name of the next one */
    .scene-list {
        gap: 24px;
    }
    .scene-item {
        padding-top: 0;
    }
    .section {
        padding-top: 112px;
    }
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    /* Five cards : 3 + 2, until there is room for one row */
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    .founder {
        grid-template-columns: 5fr 7fr;
        align-items: start;
    }
    .contact-card {
        grid-template-columns: 7fr 5fr;
        align-items: center;
        gap: 48px;
        padding: 48px;
    }
    /* Light blur behind the panels : desktop only, it is too costly over a live canvas on phones */
    @supports (backdrop-filter: blur(1px)) {
        .page-home .card {
            background: rgba(11, 14, 24, 0.66);
            backdrop-filter: blur(12px);
        }
    }
}
@media (min-width: 1200px) {
    .grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ------------------------------------------------------------------ Scene selection */
.scene-card,
.scene-card-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}
.scene-card.is-on,
.scene-card-link.is-on {
    opacity: 1;
}
.scene-card {
    min-width: 230px;
    max-width: 300px;
    padding: 12px 14px 13px;
    border: 1px solid var(--line-strong);
    border-left: 2px solid var(--accent);
    border-radius: 10px;
    background: rgba(9, 11, 20, 0.86);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    font: 12px/1.45 var(--mono);
    color: var(--text);
    will-change: transform;
}
.scene-card strong {
    display: block;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--accent);
}
.scene-card span {
    display: block;
    margin-bottom: 9px;
    font-family: var(--sans);
    font-size: 13px;
}
.scene-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 14px;
    margin: 0;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}
.scene-card dt {
    color: var(--muted);
}
.scene-card dd {
    margin: 0;
    text-align: right;
}
.scene-card-link {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.scene-card-link line {
    stroke: var(--accent);
    stroke-width: 1.25;
}
.scene-card-link circle {
    fill: var(--accent);
    stroke: rgba(245, 165, 36, 0.35);
    stroke-width: 6;
}

/* ------------------------------------------------------------------ Scene page */
.page-scene {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: none;
}
html.can-grab .page-scene {
    cursor: grab;
}
html.can-grab .page-scene :is(h1, p) {
    cursor: auto;
}
.viewer-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
    padding: 0 var(--gutter);
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
    /* Keeps the brand readable over a bright part of the scene */
    background: linear-gradient(180deg, rgba(5, 6, 13, 0.7) 0%, rgba(5, 6, 13, 0) 100%);
}
.viewer-bar .header-actions {
    margin-left: auto;
}
.viewer-bar .header-actions .btn {
    display: inline-flex;
}
/* The caption. Like the home page, it fades out while the visitor orbits (html.scene-focus main) */
.page-scene .viewer-info {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 72px var(--gutter) max(22px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(5, 6, 13, 0) 0%, rgba(5, 6, 13, 0.82) 70%);
    /* Only its texts and links stop the pointer : the scene is grabbed through the rest */
    pointer-events: none;
}
.viewer-info > * {
    max-width: 62ch;
    pointer-events: auto;
}
.viewer-info .eyebrow {
    margin-bottom: 8px;
}
.viewer-info h1 {
    max-width: none;
    font-size: clamp(1.5rem, 4.4vw, 2.3rem);
    letter-spacing: -0.025em;
}
.viewer-text {
    margin-top: 8px;
    color: #d4d8e2;
    font-size: 15px;
    text-wrap: pretty;
}
.viewer-hint {
    max-width: none;
    margin-top: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12.5px;
}
.hint-mouse {
    display: none;
}
@media (hover: hover) and (pointer: fine) {
    .hint-mouse {
        display: inline;
    }
    .hint-touch {
        display: none;
    }
}
.viewer-scenes {
    margin-top: 16px;
}
.viewer-scenes ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.viewer-scenes a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(5, 6, 13, 0.6);
    color: var(--muted);
    font-size: 13.5px;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}
.viewer-scenes a:hover {
    border-color: var(--text);
    color: var(--text);
}
.viewer-scenes a[aria-current="page"] {
    border-color: var(--accent);
    color: var(--accent);
}
/* "Loading", then nothing ; or why there is no scene. Without JavaScript the <noscript> one shows. */
.viewer-status {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    padding: 0 var(--gutter);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}
.viewer-status[hidden],
html:not(.js) #viewer-status {
    display: none;
}
@media (max-height: 520px) {
    /* A phone held sideways : the scene first */
    .viewer-text {
        display: none;
    }
}
