/* --- GLOBAL RESET --- */
    ::selection {
        background: #141414;
        color: #EAEAEA;
    }
    ::-moz-selection {
        background: #141414;
        color: #EAEAEA;
    }
    *,
    *::before,
    *::after {
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        margin: 0;
        padding: 0;
        background: #FFFFFF;
        font-family: 'Google Sans Flex', sans-serif;
        -webkit-font-smoothing: antialiased;
        color: #111;
        overflow-x: hidden;
    }
      
    img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    /* --- HEADER INTEGRATION STYLES --- */
    /* This ensures your header stays on top if it's sticky, 
       and reserves space so it doesn't overlap content immediately */
    #header-container {
        width: 100%;
        position: relative; 
        z-index: 999;
    }

    /* --- PAGE CONTAINER --- */
    .page-work {
    width: 100%;
       padding: 5rem clamp(1.5rem, 3.6vw, 2.75rem) 6rem;
       margin: 0 auto;
    }
    

    .page-inner {
        margin-left: auto;
        margin-right: auto;
        max-width: 98rem;
        width: 100%;
    }

    .work-page-header {
        margin: clamp(2rem, 4vw, 3rem) 0 3rem 0;
        padding-top: clamp(1rem, 2.2vw, 1.6rem);
    }

    .work-page-title {
        margin: 0;
        font-family: 'Nebulica', sans-serif;
        font-weight: 700;
        font-size: clamp(3.2rem, 8.4vw, 7.2rem);
        line-height: 0.9;
        letter-spacing: -0.03em;
        text-transform: uppercase;
        color: #111;
    }

    .work-page-title--reveal {
        max-width: max-content;
    }

    .work-page-title__stack {
        display: grid;
        grid-template-areas: "title";
        position: relative;
        max-width: 100%;
    }

    .work-page-title__layer {
        grid-area: title;
        display: block;
        opacity: 1;
        pointer-events: none;
        white-space: nowrap;
        transform: translateZ(0);
    }

    .work-page-title__word {
        display: inline-block;
        opacity: 1;
        overflow: hidden;
        vertical-align: baseline;
        transform: translate3d(0, 1.05em, 0);
        transform-origin: 50% 100%;
        clip-path: inset(0 0 100% 0);
        animation: workTitleWordReveal 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
        animation-delay: var(--work-title-word-delay, 0ms);
        will-change: transform, clip-path;
    }

    .work-page-title__word + .work-page-title__word {
        margin-left: 0.16em;
    }

    .work-page-title__stack.is-intro-complete .work-page-title__word {
        animation: none;
        overflow: hidden;
        transform: translate3d(0, 0, 0);
        clip-path: inset(0 0 0 0);
        will-change: auto;
    }

    @keyframes workTitleWordReveal {
        0% {
            transform: translate3d(0, 1.05em, 0);
            clip-path: inset(0 0 100% 0);
        }

        100% {
            transform: translate3d(0, 0, 0);
            clip-path: inset(0 0 0 0);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .work-page-title__word {
            animation: none;
            transform: none;
            clip-path: inset(0 0 0 0);
        }
    }

    .work-page-subtitle {
        margin: 0.9rem 0 0;
        max-width: 44rem;
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 500;
        font-size: clamp(1rem, 1.35vw, 1.2rem);
        line-height: 1;
        letter-spacing: -0.01em;
        color: rgba(0, 0, 0, 0.62);
    }

    .work-page-divider {
        margin: 1.1rem 0 0;
        border: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.14);
        width: 100%;
    }

    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* --- GRID LAYOUT --- */
    .work-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        column-gap: clamp(1rem, 2vw, 2rem);
        row-gap: clamp(2.5rem, 4vw, 3rem);
        width: 100%;
        margin-bottom: 0;
        align-items: start;
    }

    .work-item {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        color: inherit;
        position: relative;
        min-width: 0;
    }

    .work-item[hidden] {
        display: none !important;
    }

    /* --- IMAGE STYLING --- */
    .work-media {
        position: relative;
        width: 100%;
        margin-bottom: 0.9rem;
        overflow: hidden;
        border-radius: 0;
        background-color: #e0e0e0;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .work-media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .work-media > img,
    .work-media > picture {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .work-media > picture {
        display: block;
    }

    .work-item[href]:hover .work-media img,
    .work-item[href]:focus-visible .work-media img {
        transform: scale(1.025);
    }

    .work-item[href]:focus-visible {
        outline: 2px solid #000;
        outline-offset: 4px;
    }

    .work-item--static {
        cursor: default;
    }

    .page-work img {
        border-radius: 0 !important;
    }

    /* --- RESPONSIVE GRID LOGIC --- */
    @media (min-width: 768px) {
        .work-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (min-width: 1024px) {
        .work-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .work-item:nth-child(1) { grid-column: span 2; }
        .work-item:nth-child(2) { grid-column: span 1; }

        .work-item:nth-child(1) .work-media {
            height: clamp(24rem, 38vw, 32rem);
            aspect-ratio: auto;
        }

        .work-item:nth-child(n + 2) .work-media {
            height: auto;
            aspect-ratio: 16 / 9;
        }
    }

    @media (min-width: 768px) and (max-width: 1180px) {
        .page-work {
            padding-left: 1rem;
            padding-right: 1rem;
        }

        .work-grid {
            column-gap: 1rem;
            row-gap: 3rem;
        }

    }

    .work-info {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title tags"
            "description description";
        align-items: start;
        column-gap: 1rem;
        row-gap: 0.55rem;
    }

    .work-info h2 {
        grid-area: title;
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 500;
        font-size: clamp(1.25rem, 1.2vw, 1.5rem);
        color: #0b0b0b;
        margin: 0;
        letter-spacing: -0.02em;
        line-height: 1.15;
    }

    .work-info p {
        grid-area: description;
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 400;
        font-size: clamp(0.875rem, 0.8vw, 1rem);
        color: rgba(0, 0, 0, 0.6);
        margin: 0;
        line-height: 1.45;
        max-width: 38rem;
    }

    .work-categories {
        grid-area: tags;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .category-tag {
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 400;
        font-size: clamp(0.65rem, 0.58vw, 0.75rem);
        line-height: 1.2;
        background-color: rgba(0, 0, 0, 0.06);
        padding: 0.3rem 0.55rem;
        border-radius: 4px;
        color: rgba(0, 0, 0, 0.64);
        white-space: nowrap;
    }

    @media (min-width: 1024px) {
        .work-info h2 {
            font-size: clamp(1.1rem, 1vw, 1.3rem);
        }

        .work-info p {
            font-size: clamp(0.72rem, 0.62vw, 0.8rem);
        }

        .work-item:nth-child(1) .work-info p {
            max-width: 30rem;
        }

        .work-item:not(:nth-child(1)) .work-info p {
            max-width: 80%;
        }
    }

    /* --- DECADE SECTOR --- */
    .decade-section {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 4rem;
        overflow: hidden;
    }

    .decade-text {
        flex: 1;
        z-index: 2;
    }

    .decade-text h3 {
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 500;
        font-size: 2.25rem;
        margin: 0 0 0.8rem 0;
        letter-spacing: -0.03em;
        line-height: 1;
        color: #000;
    }

    .decade-text p {
        font-family: 'Google Sans Flex', sans-serif;
        font-weight: 400;
        font-size: 1rem;
        color: #8F8F8F;
        margin: 0;
        line-height: 1.5;
    }

    .decade-text a {
        color: #8F8F8F;
        text-decoration: none;
        border-bottom: 1px solid rgba(143, 143, 143, 0.4);
        transition: color 0.3s, border-color 0.3s;
    }
    .decade-text a:hover {
        color: #000;
        border-color: #000;
    }

    .carousel-wrapper {
        flex: 1;
        overflow: hidden;
        position: relative;
        mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
        -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
    }

    .carousel-track {
        display: flex;
        gap: 16px;
        width: max-content;
        animation: scrollLoop 40s linear infinite;
        will-change: transform;
    }
      
    .carousel-item {
        aspect-ratio: 1.52427 / 1;
        height: var(--framer-aspect-ratio-supported, 131px);
        position: relative;
        width: 200px;
        flex-shrink: 0;
        border-radius: 0;
        overflow: hidden;
        background: #eee;
    }

    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    @keyframes scrollLoop {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }

    .carousel-track:hover {
        animation-play-state: paused;
    }

    /* --- MOBILE RESPONSIVE --- */
    @media (max-width: 767px) {
        .page-work { padding: 2rem 1rem; }

        .work-page-divider { margin: 0.55rem 0 0; }

        .work-page-subtitle {
            font-size: 4vw;
            font-weight: 500;
            line-height: 1;
        }

        .work-grid {
            gap: 3rem;
            margin-bottom: 0;
        }

        .work-info {
            grid-template-columns: minmax(0, 46%) minmax(0, 54%);
            grid-template-areas:
                "title tags"
                "description description";
            column-gap: 0.75rem;
            row-gap: 0.6rem;
        }

        .work-categories {
            justify-content: flex-end;
            align-self: start;
            min-width: 0;
            text-align: right;
        }

        .decade-section {
            flex-direction: column;
            align-items: flex-start;
            gap: 1.5rem;
        }

        .decade-text {
            flex: auto;
            width: 100%;
            margin-bottom: 1rem;
        }

        .decade-text h3 { font-size: 2rem; }
    }

  /* Hidden sections per request: work */
  .decade-section {
    display: none !important;
  }


    @media (max-width: 767px) {
      main > .page-inner,
      main > .contact-inner {
        padding-left: 0 !important;
        padding-right: 0 !important;
      }
    }

    /* Mobile: show Ortho before Le Gourmet */
    @media (max-width: 486px) {
        .work-item:nth-child(1) { order: 1; }
        .work-item:nth-child(2) { order: 2; }
        .work-item:nth-child(4) { order: 3; }
        .work-item:nth-child(3) { order: 4; }
        .work-item:nth-child(5) { order: 5; }
        .work-item:nth-child(6) { order: 6; }
        .work-item:nth-child(7) { order: 7; }
    }
