:root {
    --header-h: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #000000;
    background: #ffffff;
    overflow-x: hidden;

    padding-top: var(--header-h);
}

body.menu-open {
    overflow: hidden;
}

img,
video {
    max-width: 100%;
}

a {
    color: currentColor;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}


/* ========================================
   HEADER
======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    height: var(--header-h);

    padding: 10px 140px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 3;
}

.header::before,
.header::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -1;

    transition: opacity .5s ease;
}

.header::before {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.7) 55%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 1;
}

.header::after {

    background-color: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);

    opacity: 0;
}

.header.is-scrolled::before {
    opacity: 0;
}

.header.is-scrolled::after {
    
    opacity: 1;
}

.logo {
    position: relative;
    z-index: 2;

    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 7.1vw;
}

.nav a {
    font-size: 16px;
    font-weight: 500;
}

/* Bouton burger : caché sur ordinateur */
.nav-toggle {
    display: none;

    position: relative;
    z-index: 2;

    width: 44px;
    height: 44px;

    padding: 0;
    border: 0;

    background: none;
    color: inherit;

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
    position: absolute;
    left: 10px;
    right: 10px;

    height: 2px;

    background: currentColor;

    transition: transform .3s ease, top .3s ease;
}

.nav-toggle span:nth-child(1) {
    top: 17px;
}

.nav-toggle span:nth-child(2) {
    top: 25px;
}

.header.menu-open .nav-toggle span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.header.menu-open .nav-toggle span:nth-child(2) {
    top: 21px;
    transform: rotate(-45deg);
}

.nav-toggle:focus-visible,
.nav a:focus-visible,
.logo:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
}


/* ========================================
   HERO
======================================== */

.hero {
    position: relative;

    padding: 0 19px;

    min-height: clamp(
        420px,
        calc(100vh - var(--header-h)),
        1000px
    );
}

.ripple-bg {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 1500px;
    height: 750px;

    border: 1px solid #777;

    background-image: url('../images/sea.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    overflow: hidden;

    z-index: 0;
}

.ripple-bg canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Підпис автора фото — у куті самого зображення моря */
.hero-credit {
    position: absolute;

    left: 45%;
    top: 97%;

    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);

    z-index: 1;

    pointer-events: none;
}

.hero-text {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    text-align: center;

    z-index: 1;
}

.hero-text h1 {
    font-size: clamp(28px, 3.6vw, 56px);
    font-weight: 700;
    line-height: 1;

    margin-bottom: 6px;
}

.hero-text p {
    font-weight: 300;
    margin-bottom: 8px;
}

.hero-text h2 {
    font-size: clamp(18px, 2.8vw, 32px);
    font-weight: 700;
}


/* ========================================
   AUDIO
======================================== */

.audio {
    position: absolute;

    left: 9.2%;
    bottom: 9%;

    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 14px;

    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;

    z-index: 2;
}

.audio:focus-visible {
    outline: 2px solid #000;
    outline-offset: 6px;
}

.audio-label {
    line-height: 1;
}

.audio-icon {
    width: 20px;
    height: 20px;

    display: inline-block;

    overflow: visible;
}

.audio-icon .bar {
    fill: #000;

    transform-origin: 50% 100%;
    transform-box: fill-box;

    animation: audio-eq 1200ms ease-in-out infinite;

    will-change: transform, opacity;
}

.audio-icon .side-left,
.audio-icon .side-right {
    animation-name: audio-side;
    animation-duration: 1400ms;

    opacity: .95;
}

.audio-icon .b1 {
    animation-delay: 0s;
}

.audio-icon .b2 {
    animation-delay: .12s;
}

.audio-icon .b3 {
    animation-delay: .24s;
}

@keyframes audio-eq {

    0% {
        transform: scaleY(.35);
    }

    25% {
        transform: scaleY(.85);
    }

    50% {
        transform: scaleY(.5);
    }

    75% {
        transform: scaleY(1.05);
    }

    100% {
        transform: scaleY(.35);
    }
}

@keyframes audio-side {

    0% {
        transform: scaleY(.6);
        opacity: .9;
    }

    30% {
        transform: scaleY(1);
        opacity: 1;
    }

    60% {
        transform: scaleY(.8);
        opacity: .95;
    }

    100% {
        transform: scaleY(.6);
        opacity: .9;
    }
}

.audio.paused .audio-icon .bar {
    animation-play-state: paused;
    opacity: .55;
}


/* ========================================
   HERO BUTTONS
======================================== */

.hero-buttons {
    position: absolute;

    right: 9.2%;
    bottom: 7%;

    display: flex;

    gap: 19px;

    z-index: 2;
}

.button-group {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    border: 1px solid #777;

    text-decoration: none;
    color: inherit;

    background: transparent;

    padding: 0;

    height: 62px;
    min-width: 206px;

    transition:
        background-color .25s ease,
        color .25s ease,
        transform .18s ease,
        box-shadow .18s ease;

    overflow: hidden;
}

.button-group .button-text {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0 14px;

    font-size: 13px;
    text-transform: uppercase;

    height: 100%;

    flex: 1 1 auto;
}

.button-group .button-arrow {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 62px;

    font-size: 24px;

    padding: 0;
}

.button-group .button-arrow svg {
    width: 18px;
    height: 18px;

    display: block;

    color: inherit;
}

/* Clavier + appui tactile */
.button-group:focus-visible,
.button-group:active {
    background-color: #000;
    color: #fff;

    outline: none;
}

/* Survol : uniquement pour les appareils qui ont une vraie souris */
@media (hover: hover) {
    .button-group:hover {
        background-color: #000;
        color: #fff;

        transform: translateY(-3px);

        outline: none;

        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    }
}


/* ========================================
   ARROW
======================================== */

.arrow {
    width: 74px;
    height: 62px;

    border: 1px solid #777;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 31px;

    transition:
        border-color .25s ease,
        color .25s ease,
        transform .18s ease;
}

.arrow:focus-visible {
    border-color: #000;
    color: #000;
}

@media (hover: hover) {
    .arrow:hover {
        border-color: #000;
        color: #000;

        transform: translateY(-3px);
    }
}


/* ========================================
   WORK
======================================== */

.work {
    position: relative;

    width: 100%;

    min-height: 1300px;

    padding-bottom: 40px;
}

.work-title {
    position: absolute;

    left: 9.25%;
    top: 175px;

    font-size: 60px;
    font-weight: 700;

    letter-spacing: -2.5px;
}

.work-wrapper {
    position: absolute;

    left: 25.65%;
    top: 175px;

    width: 65.1%;

    display: flex;

    gap: 6.25%;
}

.projects-column {
    display: flex;

    flex-direction: column;

    width: 57%;
}

.projects {
    border-left: 1px solid #777;

    padding-left: 0;
    margin: 0;
}

.project {
    display: flex;

    min-height: 125px;

    border-bottom: 1px solid #777;

    align-items: flex-start;

    padding: 0;

    cursor: pointer;

    transition: background-color .18s ease;
}

.projects .project:last-child {
    border-bottom: none;
}

.number {
    width: 88px;

    padding: 4px 0 0 19px;

    font-size: 33px;

    flex-shrink: 0;

    transition: transform .18s ease;
    transform: translateX(0);
}

.project > div {
    padding-top: 5px;
    padding-right: 15px;

    transition: transform .18s ease;

    transform: translateX(0);
}

.project:focus-visible > div,
.project:focus-visible .number {
    transform: translateX(6px);
}

@media (hover: hover) {
    .project:hover > div,
    .project:hover .number {
        transform: translateX(6px);
    }
}

.project h3 {
    font-size: 29px;
    font-weight: 400;

    line-height: 1.03;
}

.project p {
    margin-top: 20px;

    font-size: 12px;
}

.project p span {
    margin-left: 35px;
}

.all-projects {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 19px;

    margin-top: 12px;
}


/* ========================================
   WORK IMAGE
======================================== */

.work-image {
    width: 400px;
    height: 600px;

    border: 1px solid #777;

    background: #d9d9d9;

    position: relative;

    overflow: hidden;
}

.work-preview-img,
.work-preview-video {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: opacity .35s ease;

    opacity: 1;

    display: block;

    pointer-events: none;
}

.work-preview-img.loading {
    opacity: 0;
}

.work-preview-img.hidden,
.work-preview-video.hidden {
    opacity: 0;
}


/* ========================================
   CONTACT
======================================== */

.contact-page {
    min-height: calc(100vh - var(--header-h));

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 60px 9.25% 120px;
}

.contact-title {
    font-size: clamp(40px, 7vw, 96px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: .95;

    margin-bottom: 40px;
}

.contact-text {
    max-width: 540px;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: #333;

    margin-bottom: 60px;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;

    gap: 20px;
}

.contact-link {
    display: flex;
    flex-direction: column;

    gap: 8px;

    min-width: 280px;

    padding: 26px 28px;

    border: 1px solid #777;

    transition:
        background-color .25s ease,
        color .25s ease,
        transform .18s ease;
}

.contact-link:focus-visible,
.contact-link:active {
    background-color: #000;
    color: #fff;

    outline: none;
}

@media (hover: hover) {
    .contact-link:hover {
        background-color: #000;
        color: #fff;

        transform: translateY(-3px);

        outline: none;
    }
}

.contact-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    opacity: .6;
}

.contact-value {
    font-size: 20px;
    font-weight: 500;

    overflow-wrap: anywhere;
}


/* ========================================
   FOOTER
======================================== */

.footer {
    width: 100%;
}

.footer-top {
    min-height: 120px;

    padding: 20px 140px 20px;

    background: #9A76E7;

    display: flex;

    justify-content: space-between;
    align-items: flex-start;
}

.footer-name {
    font-size: 68px;
    font-weight: 700;

    line-height: 1;
}

.footer-links {
    width: 390px;

    display: flex;

    flex-direction: column;

    gap: 18px;
}

.footer-links a {
    font-size: 21px;
    font-weight: 500;

    overflow-wrap: anywhere;
}


/* ========================================
   BUTTON
======================================== */

.button {
    transition:
        background-color .25s ease,
        color .25s ease,
        transform .18s ease,
        letter-spacing .18s ease;
}

.button:focus-visible {
    background-color: #000;
    color: #fff;
}

@media (hover: hover) {
    .button:hover {
        background-color: #000;
        color: #fff;

        transform: translateY(-3px);

        letter-spacing: 0.06em;
    }
}


/* ========================================
   HIDE SCROLLBAR
======================================== */

::-webkit-scrollbar {
    display: none;
}


/* ==========================================================
   ADAPTATIF
   1200px : petit ordinateur / tablette paysage
    800px : tablette portrait (menu burger)
    600px : téléphone
========================================================== */

@media (max-width: 1200px) {

    /* Header */
    .header {
        padding: 10px 40px;
    }

    .nav {
        gap: 5vw;
    }

    .ripple-bg {
        left: 19px;
        right: 19px;
        top: 12px;
        bottom: 12px;

        width: auto;
        height: auto;

        transform: none;
    }

    .hero-text {
        width: 100%;
        padding: 0 24px;

        pointer-events: none;
    }

    .hero-text h1,
    .hero-text h2 {
        text-wrap: balance;
    }

    .audio {
        left: 6%;
    }

    .hero-buttons {
        right: 6%;
    }

    .work {
        min-height: 0;
        padding: 90px 5% 90px;
    }

    .work .work-title {
        position: static;

        font-size: 48px;

        margin-bottom: 40px;
    }

    .work-wrapper {
        position: static;

        width: 100%;
        gap: 32px;
    }

    .projects-column {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .work-image {
        flex: 0 0 38%;

        width: 38%;
        height: auto;
        aspect-ratio: 2 / 3;

        align-self: flex-start;

        position: sticky;
        top: calc(var(--header-h) + 24px);
    }

    .project {
        min-height: 100px;
    }

    .number {
        width: 64px;

        padding-left: 14px;

        font-size: 26px;
    }

    .project h3 {
        font-size: 24px;
    }

    /* Contact */
    .contact-page {
        padding: 60px 5% 100px;
    }

    .footer-top {
        padding: 24px 40px 32px;
        gap: 32px;
    }

    .footer-name {
        font-size: clamp(36px, 5.6vw, 68px);
    }

    .footer-links {
        width: auto;
        gap: 14px;
    }

    .footer-links a {
        font-size: 18px;
    }
}


@media (max-width: 800px) {

    :root {
        --header-h: 64px;
    }

    .header {
        top: 0;
        height: var(--header-h);   /* 64px */
        padding: 8px 20px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-toggle {
        display: block;

        margin-right: -10px;
    }

    .nav {
        position: fixed;
        inset: 0;

        z-index: 1;

        flex-direction: column;
        justify-content: center;
        align-items: flex-start;

        gap: 8px;

        padding: var(--header-h) 24px 40px;

        background: #fff;

        opacity: 0;
        visibility: hidden;

        transition: opacity .3s ease, visibility 0s linear .3s;
    }

    .header.menu-open .nav {
        opacity: 1;
        visibility: visible;

        transition: opacity .3s ease;
    }

    .nav a {
        padding: 6px 0;

        font-size: clamp(34px, 11vw, 56px);
        font-weight: 700;
        letter-spacing: -0.03em;
        line-height: 1.15;

        opacity: 0;
        transform: translateY(12px);

        transition: opacity .4s ease, transform .4s ease;
    }

    .header.menu-open .nav a {
        opacity: 1;
        transform: none;
    }

    .header.menu-open .nav a:nth-child(1) { transition-delay: .05s; }
    .header.menu-open .nav a:nth-child(2) { transition-delay: .10s; }
    .header.menu-open .nav a:nth-child(3) { transition-delay: .15s; }

    /* Work */
    .work {
        padding: 70px 24px 70px;
    }

    .work .work-title {
        font-size: 40px;

        margin-bottom: 28px;
    }

    .work-wrapper {
        gap: 24px;
    }

    .work-image {
        flex-basis: 36%;
        width: 36%;
    }

    /* Contact */
    .contact-page {
        padding: 40px 6% 80px;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-link {
        min-width: 0;
    }

    /* Footer */
    .footer-top {
        flex-direction: column;

        padding: 36px 24px 40px;
        gap: 28px;
    }

    .footer-name {
        font-size: clamp(28px, 8.6vw, 68px);
    }
}


@media (max-width: 600px) {

    /* Hero */
    .hero {
        padding: 0 12px;

        min-height: clamp(520px, calc(100vh - 64px), 860px);
        min-height: clamp(520px, calc(100svh - 64px), 860px);
    }

    .ripple-bg {
        left: 12px;
        right: 12px;
        top: 8px;
        bottom: 8px;
    }

    .hero-text {
        padding: 0 28px;
    }

    .hero-text h1 {
        font-size: clamp(22px, 6.4vw, 34px);
        line-height: 1.05;
    }

    .hero-text p {
        font-size: 12px;
        line-height: 1.4;
    }

    .hero-text h2 {
        font-size: clamp(16px, 4.8vw, 22px);
    }

    .hero-buttons {
        left: 28px;
        right: 28px;
        bottom: 36px;
    }

    .hero-buttons .button-group {
        width: 100%;
        height: 56px;
    }

    .audio {
        left: 28px;
        top: 28px;
        bottom: auto;
    }

    .work {
        padding: 56px 20px 56px;
    }

    .work .work-title {
        font-size: 34px;
    }

    .work-wrapper {
        flex-direction: column;
    }

    .work-image {
        display: none;
    }

    .project {
        min-height: 88px;
    }

    .number {
        width: 52px;

        padding: 6px 0 0 12px;

        font-size: 22px;
    }

    .project > div {
        padding-top: 8px;
    }

    .project h3 {
        font-size: 21px;
        line-height: 1.1;
    }

    .all-projects {
        justify-content: stretch;

        margin-top: 28px;
    }

    .all-projects .button-group {
        width: 100%;
        height: 56px;
    }

    /* Footer */
    .footer-links a {
        font-size: 17px;
    }
}


/* ---------- Réduction des animations ---------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .nav,
    .nav a,
    .nav-toggle span {
        transition: none !important;
    }
}