:root {
    --paper: #F7F4F5;
    --paper-2: #EFE8EC;
    --ink: #26141D;
    --muted: #5E4A55;
    --wine-950: #2E0A1B;
    --wine-900: #46102A;
    --wine-800: #5F1637;
    --wine-700: #781C45;
    --wine-600: #8C2250;
    --wine-500: #A63A68;
    --teal: #2B97A3;
    --teal-ink: #1B6A74;
    --teal-light: #6CCBD4;
    --line: rgba(70, 16, 42, .16);
    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --wrap: 1180px;
    --gut: clamp(1.25rem, 4vw, 2.5rem);
    --head: 4.75rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--head) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 300;
    margin: 0;
    text-wrap: balance;
}

p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--wine-900);
    color: #fff;
    padding: .75rem 1rem;
    z-index: 100;
}

.skip:focus {
    left: 0;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gut);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 244, 245, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--head);
}

.logo {
    display: block;
    line-height: 0;
}

.logo img {
    height: 3.75rem;
    width: auto;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 2.1rem;
}

.nav a {
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    text-underline-offset: .4em;
}

.nav a:not(.nav-cta):hover {
    text-decoration: underline;
    text-decoration-color: var(--teal);
    text-decoration-thickness: 2px;
}

.nav-cta {
    background: var(--wine-700);
    color: #fff;
    padding: .6rem 1.15rem;
    border-radius: 2px;
    transition: background .2s;
}

.nav-cta:hover {
    background: var(--wine-900);
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 2.75rem;
    height: 2.75rem;
    cursor: pointer;
    color: var(--wine-900);
    position: relative;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
    position: absolute;
    left: .7rem;
    right: .7rem;
    height: 2px;
    background: currentColor;
    content: "";
    transition: transform .25s, opacity .25s;
}

.nav-toggle .bars {
    top: 50%;
    margin-top: -1px;
    left: .7rem;
}

.nav-toggle .bars::before {
    left: 0;
    right: 0;
    top: -7px;
}

.nav-toggle .bars::after {
    left: 0;
    right: 0;
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .bars::before {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bars::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.35rem, 5.2vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -.02em;
    color: var(--wine-900);
}

.hero .lead {
    margin-top: 1.6rem;
    max-width: 34rem;
    font-size: 1.15rem;
    color: var(--muted);
}

.where {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .95rem;
    color: var(--teal-ink);
    font-weight: 500;
}

.where::before {
    content: "";
    width: .55rem;
    height: .55rem;
    background: var(--teal);
    transform: rotate(45deg);
    flex: none;
}

.actions {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
}

.btn {
    display: inline-block;
    font: 500 1rem/1 var(--sans);
    text-decoration: none;
    padding: 1rem 1.6rem;
    border-radius: 2px;
    border: 1px solid var(--wine-700);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.btn-solid {
    background: var(--wine-700);
    color: #fff;
}

.btn-solid:hover {
    background: var(--wine-900);
    border-color: var(--wine-900);
}

.btn-line {
    background: transparent;
    color: var(--wine-700);
}

.btn-line:hover {
    background: var(--wine-700);
    color: #fff;
}

/* Cube 3D (canvas WebGL, image de secours) */
.stage {
    position: relative;
    height: clamp(240px, 32vw, 380px);
    display: grid;
    place-items: center;
}

.stage::after {
    content: "";
    position: absolute;
    bottom: 8%;
    left: 28%;
    right: 28%;
    height: 22px;
    background: radial-gradient(ellipse at center, rgba(46, 10, 27, .28), transparent 70%);
    filter: blur(6px);
}

.cube-canvas {
    display: none;
    position: relative;
    z-index: 1;
    width: clamp(200px, 26vw, 320px);
    aspect-ratio: 1;
}

.cube-img {
    position: relative;
    z-index: 1;
    width: clamp(150px, 19vw, 250px);
    height: auto;
}

.stage.is-3d .cube-canvas {
    display: block;
}

.stage.is-3d .cube-img {
    display: none;
}

/* Sections */
.sec {
    padding-block: clamp(4rem, 9vw, 7.5rem);
}

.sec h2 {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    line-height: 1.12;
    letter-spacing: -.015em;
    color: var(--wine-900);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.sticky {
    position: sticky;
    top: calc(var(--head) + 2rem);
}

/* Presentation */
.about {
    border-top: 1px solid var(--line);
}

.about .intro {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    line-height: 1.4;
    color: var(--ink);
}

.about .more {
    margin-top: 1.4rem;
    color: var(--muted);
    max-width: 40rem;
}

.facts {
    margin: 2.6rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
}

.facts div {
    border-top: 2px solid var(--teal);
    padding-top: .9rem;
}

.facts dt {
    font-size: .9rem;
    color: var(--teal-ink);
    font-weight: 600;
}

.facts dd {
    margin: .35rem 0 0;
    color: var(--ink);
}

/* Domaines */
.domains {
    background: var(--paper-2);
}

.domains .sub {
    margin-top: 1.3rem;
    color: var(--muted);
    max-width: 26rem;
}

.rows li {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1rem 2rem;
    padding-block: 1.7rem;
    border-top: 1px solid var(--line);
    transition: border-color .2s;
}

.rows li:last-child {
    border-bottom: 1px solid var(--line);
}

.rows li:hover {
    border-top-color: var(--teal);
}

.rows h3 {
    font-size: 1.4rem;
    line-height: 1.25;
    font-weight: 400;
    color: var(--wine-800);
}

.rows p {
    color: var(--muted);
}

/* Champs */
.reach {
    background: var(--wine-900);
    color: #F1E7EC;
}

.reach h2 {
    color: #fff;
}

.reach .sub {
    margin-top: 1.3rem;
    color: #D8C5CF;
    max-width: 30rem;
}

.reach-list li {
    padding-block: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 300;
    color: #fff;
}

.reach-list li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.reach-list li::before {
    content: "";
    width: .5rem;
    height: .5rem;
    background: var(--teal-light);
    transform: rotate(45deg);
    flex: none;
}

/* Contact */
.contact .sub {
    margin-top: 1.3rem;
    color: var(--muted);
    max-width: 26rem;
}

.contact-info {
    margin-top: 2rem;
    display: grid;
    gap: .9rem;
}

.contact-info a {
    color: var(--wine-700);
    text-underline-offset: .3em;
}

.contact-info .lbl {
    display: block;
    font-size: .9rem;
    color: var(--teal-ink);
    font-weight: 600;
}

.form {
    display: grid;
    gap: 1.15rem;
}

.field label {
    display: block;
    font-size: .92rem;
    font-weight: 500;
    margin-bottom: .4rem;
}

.field .opt {
    color: var(--muted);
    font-weight: 400;
}

.field input,
.field textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(70, 16, 42, .28);
    border-radius: 2px;
    padding: .85rem 1rem;
}

.field textarea {
    min-height: 9rem;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
    border-color: var(--teal);
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.notice {
    padding: 1rem 1.2rem;
    border-radius: 2px;
    border: 1px solid;
    font-size: .98rem;
}

.notice.ok {
    background: #E6F3F4;
    border-color: var(--teal);
    color: #0F4A52;
}

.notice.err {
    background: #F8E7EE;
    border-color: var(--wine-500);
    color: var(--wine-900);
}

.notice ul {
    padding-left: 1.1rem;
    list-style: disc;
}

.form .btn {
    justify-self: start;
}

/* Footer */
.site-footer {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    padding-block: 2.2rem;
}

.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem 2rem;
}

.foot img {
    height: 3.5rem;
    width: auto;
}

.foot small {
    color: var(--muted);
    font-size: .9rem;
}

.foot ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    font-size: .92rem;
}

.foot a {
    text-decoration: none;
}

.foot a:hover {
    text-decoration: underline;
    text-decoration-color: var(--teal);
}

/* Responsive design */
@media (max-width: 980px) {
    .split {
        grid-template-columns: 1fr;
    }

    .sticky {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
    }

    .nav.open {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 0 1rem;
    }

    .nav a {
        display: block;
        padding: .95rem var(--gut);
    }

    .nav-cta {
        margin: .6rem var(--gut) 0;
        text-align: center;
        padding: .95rem 1rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .stage {
        order: -1;
        height: clamp(210px, 52vw, 290px);
    }

    .cube-canvas {
        width: clamp(170px, 46vw, 240px);
    }

    .cube-img {
        width: clamp(140px, 36vw, 200px);
    }
}

@media (max-width: 640px) {
    .rows li {
        grid-template-columns: 1fr;
    }

    .facts,
    .two {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }

    .form .btn {
        justify-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}