/* ==========================================================================
   Pix-up FX — stijl voor de interactieve belevingslaag (js/fx.js)
   Additief: raakt geen bestaande selectors aan.
   ========================================================================== */

/* --- reveal --------------------------------------------------------------
   REGEL: content wordt NOOIT verstopt achter JavaScript.

   Dit stond eerder op `opacity: 0` voor elk [data-fx-reveal], zichtbaar gemaakt
   door een IntersectionObserver. Vuurt die observer niet of te laat — een
   achtergrondtab, terug-navigatie uit bfcache, een trage telefoon, JS dat faalt —
   dan kijkt de bezoeker naar een lege pagina. Dat is precies wat er gebeurde.

   Nu: alleen wanneer fx.js daadwerkelijk draait (html.fx-anim) wordt er iets
   verborgen, en fx.js zet zelf een veiligheidstimer die alles alsnog toont.
   Zonder JS, of als JS breekt, is de pagina gewoon volledig zichtbaar.
   -------------------------------------------------------------------------- */
.fx-anim [data-fx-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
    will-change: opacity, transform;
}

.fx-anim [data-fx-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* --- tilt / magnetic ---------------------------------------------------- */
[data-fx-tilt] {
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
    transform-style: preserve-3d;
}

[data-fx-magnetic] {
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   1. Studio — het interactieve 3D-canvas
   ========================================================================== */
.fx-studio {
    position: relative;
    background: linear-gradient(135deg, #0E0020 0%, #1A0050 45%, #001540 100%);
    color: #fff;
    overflow: hidden;
    padding: 88px 24px;
}

.fx-studio::before {
    /* fijn blauwdruk-raster over de donkere achtergrond */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 45%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 45%, #000 30%, transparent 78%);
    pointer-events: none;
}

.fx-studio-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 52px;
    align-items: center;
}

@media (max-width: 900px) {
    .fx-studio {
        padding: 64px 20px;
    }

    .fx-studio-inner {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

.fx-studio .fx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #FF2680;
    background: rgba(255, 38, 128, .12);
    border: 1px solid rgba(255, 38, 128, .28);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.fx-studio h2 {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.035em;
    margin: 0 0 16px;
}

.fx-studio h2 .g {
    background: linear-gradient(135deg, #FFD000 0%, #FF6B35 30%, #FF2680 60%, #9B2FFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fx-studio p.lead {
    font-size: 16.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .72);
    margin: 0 0 26px;
    max-width: 46ch;
}

/* scene-knoppen */
.fx-scenes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.fx-scene {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.fx-scene:hover {
    background: rgba(255, 255, 255, .085);
    transform: translateX(2px);
}

.fx-scene:focus-visible {
    outline: 2px solid #FF2680;
    outline-offset: 2px;
}

.fx-scene .sw,
.fx-scene img {
    width: 42px;
    height: 30px;
    border-radius: 7px;
    flex: 0 0 auto;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset;
}

/* Kleurvlakjes die de sfeer van de scene samenvatten */
.fx-scene .s-studio { background: linear-gradient(135deg, #e9ecef, #b9c0c7); }
.fx-scene .s-werf   { background: linear-gradient(135deg, #f6c368, #c9752a); }
.fx-scene .s-life   { background: linear-gradient(135deg, #9fb0be, #55606c); }
.fx-scene .s-edit   { background: linear-gradient(135deg, #3a3a44, #101015); }

.fx-scene .tx {
    min-width: 0;
}

.fx-scene .tx b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
}

.fx-scene .tx span {
    display: block;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .58);
    line-height: 1.3;
}

.fx-scene.is-active {
    border-color: rgba(255, 38, 128, .75);
    background: rgba(255, 38, 128, .13);
    box-shadow: 0 6px 26px rgba(255, 38, 128, .2);
}

.fx-hint {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* het beeldvlak
   GEEN min-height naast aspect-ratio: die combinatie laat de min-height de BREEDTE
   meebepalen, waardoor het vlak op smalle schermen buiten zijn kolom groeit. */
.fx-stage {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .13);
    background: #0b0118;
    aspect-ratio: 900 / 1157;
}

.fx-stage:focus-visible {
    outline: 2px solid #FF2680;
    outline-offset: 3px;
}

/* Alle scenes liggen op elkaar; alleen de actieve is zichtbaar.
   Ze hebben exact hetzelfde canvasformaat, dus het onderwerp springt niet. */
.fx-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity .55s ease;
}

.fx-slide.is-active {
    opacity: 1;
}

.fx-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Zonder JS krijgt geen enkele slide .is-active van buitenaf; de eerste staat al
   in de HTML op is-active, dus er is altijd beeld. */

/* zoekerhoeken over het beeld */
.fx-stage .vf {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, .45);
    pointer-events: none;
    z-index: 2;
}

.fx-stage .vf.tl { top: 13px; left: 13px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.fx-stage .vf.tr { top: 13px; right: 13px; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.fx-stage .vf.bl { bottom: 13px; left: 13px; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.fx-stage .vf.br { bottom: 13px; right: 13px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

/* Het bijschrift loopt over de volle breedte van het beeldvlak, met een verloop dat
   hoog genoeg begint om de tekst altijd leesbaar te houden — ook op de lichte
   studio-scene, waar witte tekst anders wegvalt. */
.fx-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
    padding: 56px 16px 16px;
    background: linear-gradient(to top,
            rgba(6, 0, 16, .88) 0%,
            rgba(6, 0, 16, .62) 45%,
            transparent 100%);
}

.fx-caption .cl b {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #fff;
}

.fx-caption .cl span {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

.fx-caption .num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .7);
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .16);
    padding: 4px 9px;
    border-radius: 100px;
    white-space: nowrap;
}
/* ==========================================================================
   2. Scrollytelling
   ========================================================================== */
.fx-scrolly {
    position: relative;
    background: #F8FAFC;
    padding: 0 24px;
}

.fx-scrolly-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: start;
}

@media (max-width: 900px) {
    .fx-scrolly-inner {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.fx-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .fx-sticky {
        height: 62vh;
        top: 0;
        background: #F8FAFC;
        z-index: 2;
        padding: 12px 0;
    }
}

.fx-visual {
    position: relative;
    width: 100%;
    max-height: 70vh;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #0E0020;
    box-shadow: 0 18px 60px rgba(14, 0, 32, .18);
    border: 1px solid var(--border, #E5E7EB);
}

.fx-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* laag 2: het AI-resultaat, onthuld met een veeg */
.fx-visual .fx-after {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(.65, 0, .35, 1);
}

.fx-visual.is-step-2 .fx-after,
.fx-visual.is-step-3 .fx-after {
    clip-path: inset(0 0 0 0);
}

/* koperen/magenta veeglijn */
.fx-visual .fx-wipe {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    left: 0;
    background: linear-gradient(180deg, transparent, #FF2680 20%, #9B2FFF 80%, transparent);
    box-shadow: 0 0 22px rgba(255, 38, 128, .8);
    opacity: 0;
    transition: left 1s cubic-bezier(.65, 0, .35, 1), opacity .4s ease;
}

.fx-visual.is-step-2 .fx-wipe {
    left: 100%;
    opacity: 1;
}

/* laag 1: regie-overlay */
.fx-visual .fx-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}

.fx-visual.is-step-1 .fx-overlay {
    opacity: 1;
}

.fx-visual .fx-box {
    position: absolute;
    border: 1.5px solid rgba(255, 38, 128, .9);
    border-radius: 6px;
    box-shadow: 0 0 18px rgba(255, 38, 128, .35);
}

/* Los annotatielabel zonder kader, voor de lege marges naast het product. */
.fx-visual .fx-tag {
    position: absolute;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9.5px;
    letter-spacing: .1em;
    color: #fff;
    background: #FF2680;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(255, 38, 128, .4);
}

.fx-visual .fx-box::after {
    content: attr(data-label);
    position: absolute;
    top: -11px;
    left: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9.5px;
    letter-spacing: .1em;
    color: #fff;
    background: #FF2680;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

/* laag 3: varianten */
.fx-visual .fx-variants {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    background: #0E0020;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .55s ease, transform .55s cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
}

.fx-visual.is-step-3 .fx-variants {
    opacity: 1;
    transform: none;
}

.fx-visual .fx-variants figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
}

.fx-visual .fx-variants img {
    position: absolute;
    inset: 0;
}

.fx-visual .fx-variants figcaption {
    position: absolute;
    left: 6px;
    bottom: 6px;
    z-index: 2;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: .1em;
    color: #fff;
    background: rgba(14, 0, 32, .72);
    padding: 3px 7px;
    border-radius: 100px;
}

/* de stappen rechts */
/* De stappenkolom bepaalt de scrollhoogte van het verhaal. Boven een halve
   viewport zodat stap 1 rustig binnenkomt; onder net genoeg om stap 4 volledig
   te laten landen. Meer onderruimte laat een leeg wit gat achter, omdat de
   sticky visual dan al is losgelaten. */
.fx-steps {
    padding: 24vh 0 10vh;
}

@media (max-width: 900px) {
    .fx-steps {
        padding: 6vh 0 6vh;
    }
}

.fx-step {
    padding: 22px 0 22px 22px;
    border-left: 2px solid var(--border, #E5E7EB);
    opacity: .38;
    transform: translateX(-4px);
    transition: opacity .45s ease, transform .45s ease, border-color .45s ease;
    margin-bottom: 6vh;
}

.fx-step.is-active {
    opacity: 1;
    transform: none;
    border-left-color: #FF2680;
}

.fx-step .n {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: .16em;
    color: #FF2680;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.fx-step h3 {
    font-size: clamp(20px, 2.6vw, 27px);
    font-weight: 800;
    letter-spacing: -.025em;
    margin: 0 0 10px;
    color: var(--ink, #0A1F44);
}

.fx-step p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-muted, #4B5563);
    margin: 0;
    max-width: 44ch;
}

/* voortgangsrail */
.fx-rail {
    display: flex;
    gap: 6px;
    margin-top: 16px;
}

.fx-rail > span {
    height: 3px;
    flex: 1;
    background: var(--border, #E5E7EB);
    border-radius: 100px;
    transition: background .4s ease;
}

.fx-rail > span.is-done {
    background: linear-gradient(90deg, #FF2680, #9B2FFF);
}

/* ==========================================================================
   3. Filmstrip
   ========================================================================== */
.fx-marquee {
    display: flex;
    overflow: hidden;
    gap: 14px;
    padding: 26px 0;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.fx-marquee [data-fx-track] {
    display: flex;
    gap: 14px;
    flex: 0 0 auto;
}

/* Draait standaard. Pauzeren gebeurt door een class TOE te voegen, niet door er
   een te missen — zo staat de strip nooit stil omdat een observer niet vuurde. */
.fx-marquee [data-fx-track] {
    animation: fx-scroll 42s linear infinite;
}

.fx-marquee.is-paused [data-fx-track],
.fx-marquee:hover [data-fx-track] {
    animation-play-state: paused;
}

@keyframes fx-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% - 14px)); }
}

.fx-marquee figure {
    position: relative;
    margin: 0;
    flex: 0 0 auto;
    width: 208px;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, #E5E7EB);
    background: #fff;
}

.fx-marquee img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fx-marquee figcaption {
    position: absolute;
    left: 8px;
    bottom: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: .1em;
    color: #fff;
    background: rgba(14, 0, 32, .72);
    padding: 3px 8px;
    border-radius: 100px;
}

/* ==========================================================================
   Toegankelijkheid: alles uit bij reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    [data-fx-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .fx-marquee [data-fx-track] {
        animation: none !important;
    }

    .fx-visual .fx-after {
        clip-path: inset(0 0 0 0) !important;
        transition: none !important;
    }

    .fx-visual .fx-wipe {
        display: none;
    }

    .fx-step {
        opacity: 1;
        transform: none;
    }

    .fx-sticky {
        position: static;
        height: auto;
    }

    .fx-steps {
        padding: 24px 0;
    }
}
